Claude Code's cheap open-source stunt double
A Go proxy that tricks Claude Code into using $5/month open models through OpenCode instead of Anthropic's API.

What it does
oc-go-cc is a local proxy server written in Go that intercepts Claude Code’s Anthropic API requests, translates them to OpenAI, Responses, or Gemini format, and forwards them to OpenCode’s endpoints. Claude Code runs unchanged; the models underneath swap from Anthropic to whatever OpenCode Go or Zen provides.
The interesting bit
The translation layer is bidirectional and stateful enough to handle streaming SSE, tool calling (tool_use ↔ function calling), and token counting with tiktoken. It also builds in operational niceties usually found in production gateways: circuit breakers, fallback chains, and model health tracking. For a personal coding tool, that’s unusually paranoid — in a good way.
Key highlights
- Transparent format translation: Anthropic ↔ OpenAI/Responses/Gemini with full streaming support
- Dual provider routing: OpenCode Go ($5/month flat) or OpenCode Zen (pay-as-you-go)
- Automatic model selection by context: default, thinking, long-context, or background tasks
- Fallback chains with circuit breaker — skips failing models instead of hanging
- Hot config reload, background daemon mode, and macOS auto-start via launchd
- JSON config with
${VAR}interpolation and environment overrides
Caveats
- AGPL-3.0 license, which may complicate commercial redistribution or embedding
- Token counting uses
cl100k_base(OpenAI’s tokenizer) as a proxy for Anthropic’s actual tokenization; accuracy depends on how well the vocabularies align - The README claims “no patches, no forks” but you do need to set two environment variables and run a persistent local proxy — not quite plug-and-play
Verdict
Worth a look if you’re already paying for Claude Code and want to experiment with cheaper open models without leaving the interface. Skip it if you need guaranteed model parity or can’t tolerate a local proxy in your critical path.