An open API service indexing awesome lists of open source software.

https://github.com/sandbox0-ai/llmproxy

Protocol-translating LLM proxy for agents
https://github.com/sandbox0-ai/llmproxy

anthropic-api claude-compatible llm-proxy openai-agents openai-responses-api

Last synced: 1 day ago
JSON representation

Protocol-translating LLM proxy for agents

Awesome Lists containing this project

README

          

# llmproxy

Protocol-translating LLM proxy for coding agents.

The first supported mode is `claude2codex`: clients speak OpenAI Responses API
and upstream providers speak Anthropic Messages API. This lets Codex and
OpenAI Agents use Claude-compatible providers.

## Run

```bash
go run ./cmd/llmproxy
```

The service listens on `:8080` by default. Override with `PORT` or
`LLMPROXY_ADDR`.

## URL Shape

Take the provider's Anthropic-compatible base URL:

```text
https://api.z.ai/api/anthropic
```

Put `https://llmproxy.sandbox0.ai/claude2codex/` in front of it:

```text
https://llmproxy.sandbox0.ai/claude2codex/https://api.z.ai/api/anthropic
```

The proxy service handles protocol routes only. Hosted marketing pages and
public ingress can be managed by a separate website deployment that forwards
proxy paths to this service.

## Environment

| Variable | Description |
| --- | --- |
| `PORT` | HTTP port when `LLMPROXY_ADDR` is unset. |
| `LLMPROXY_ADDR` | Full listen address, for example `:8080`. |

## Current Status

Implemented:

- `claude2codex` for Anthropic-compatible base URLs
- OpenAI Responses text input to Anthropic Messages
- Function tool call and tool result conversion
- OpenAI `web_search` tool to Anthropic `web_search_20260318` server tool conversion
- OpenAI-compatible `web_fetch` tool extension to Anthropic `web_fetch_20260318`
- Anthropic hosted web search/fetch calls and citations back to OpenAI Responses web call/annotation shapes
- Anthropic Messages text/tool output to OpenAI Responses
- SSE response shape for streaming clients
- SSRF hardening for dynamic upstream URLs

Planned:

- `codex2claude`
- `/responses/compact`
- richer multimodal mapping
- persisted usage logging and per-key policy