Status: [LIVE] Endpoints found: https://docs.anthropic.com/en/api/messages Source: https://github.com/kyungw00k/anthropic-openai-proxy-go # anthropic-openai-proxy-go A zero-dependency Go library that proxies [Anthropic Messages API](https://docs.anthropic.com/en/api/messages) requests to OpenAI-compatible endpoints. Point any Anthropic SDK client ([anthropic-sdk-go](https://github.com/anthropics/anthropic-sdk-go), Claude Code, …) at Ollama, vLLM, LM Studio, or any other `chat/completions` backend. ## Features **Modes** - **Translate** — Anthropic Messages API ↔ OpenAI Chat Completions - **Passthrough** — forward Anthropic requests unchanged to an Anthropic-compatible upstream **Streaming** - Full SSE translation with thinking blocks and `signature_delta` - Spec-correct multi-line `data:` handling; keep-alive comments ignored - Idempotent close-event flush on EOF/abort — clients never hang when upstream drops without `[DONE]` - Mid-stream upstream errors become `event: error` **Content & tools** - Thinking/reasoning (`reasoning_content`/`reasoning` ↔ `thinking`), images (base64 + URL), documents, search results, and all citation types - Tool use: `tool_use` / `tool_result` (with `is_error`), every `tool_choice` shape, GLM `tool_stream` (opt-in) - Tool schemas: `$ref` / `$defs` inlined for structured-output backends (vLLM grammar, Outlines, Ollama) - Prompt caching: `cache_control` breakpoints accepted; `cached_tokens` surfaced as `cache_read_input_tokens` **Transport** - Pooled keep-alive upstream connections with HTTP/2, sized for parallel-subagent fan-out - O(n) streaming translation (no quadratic buffering on long responses) - Gzip: gzipped client request bodies decoded in translate mode; upstream bodies optionally compressed via `WithRequestGzip` **Spec fidelity** - HTTP-status-driven `error.type` mapping, full stop-reason coverage, spec-compliant `GET /v1/models` - `POST /v1/messages/count_tokens` (forwards to upstream `/tokenize` in translate mode) - Sampling params, `metadata`, and vLLM extensions (`kv_transfer_params`, `chat_template_kwargs`, `defer_loading`) forwarded ## In