Back to journal
ai JUN 29 · 2026

Run Claude Code on a $10/Month OpenCode Go Subscription

OpenCode Go is a roughly $10/month subscription that hands you a whole catalog of cheap coding models — Kimi, GLM, DeepSeek, MiniMax, Qwen, and more — behind a single API key. The catch most people assume is that you have to use OpenCode’s own client to get at them. You don’t. The Claude Code harness you already know how to drive can talk to that same subscription. You just have to repoint it.

There are two ways to do that. The first takes thirty seconds and works with a subset of the models. The second installs a small proxy and unlocks the whole catalog with stable per-model routing. Here’s both.

Way 1: Environment variables only

Claude Code speaks the Anthropic Messages API. OpenCode Go exposes some of its models through an Anthropic-compatible endpoint, so for those models you don’t need anything in the middle — you just tell Claude Code’s Anthropic client to call OpenCode Go instead of Anthropic. That’s a handful of environment variables:

export ANTHROPIC_DEFAULT_OPUS_MODEL=minimax-m3
export ANTHROPIC_DEFAULT_SONNET_MODEL=minimax-m3
export ANTHROPIC_DEFAULT_HAIKU_MODEL=minimax-m3
export CLAUDE_CODE_SUBAGENT_MODEL=minimax-m3
export ANTHROPIC_BASE_URL="https://opencode.ai/zen/go/"
export ANTHROPIC_AUTH_TOKEN=""
export ANTHROPIC_API_KEY="$OPENCODE_API_KEY"

Set those, start claude, and every Opus/Sonnet/Haiku slot — plus subagents — resolves to the OpenCode Go model you named.

The one limitation: this only works with models that ship an Anthropic-compatible interface. On OpenCode Go’s model list those are the ones with @ai-sdk/anthropic in the AI SDK column — at the moment, the MiniMax and Qwen families (minimax-m3, qwen-3.7-plus, qwen-3.7-max). Anything else needs a translation layer, which is exactly what the second method gives you. (Credit to kkovacs.eu for documenting this approach.)

Way 2: The ocgo proxy (all models, with mapping)

ocgo is a small Go CLI that runs a local compatibility proxy. It translates Claude Code’s Anthropic Messages API requests into OpenAI-style chat completions on the way out, so any OpenCode Go model works — not just the Anthropic-compatible ones — and it remembers a per-model mapping so you don’t reconfigure every session.

Install it and save your key:

brew install emanuelcasco/tap/ocgo
ocgo setup   # paste your OpenCode Go API key when prompted

Now map each Claude model name to the OpenCode Go model you actually want behind it. Three commands — one per tier:

ocgo mapping claude set claude-opus-4-8 glm-5.2
ocgo mapping claude set claude-sonnet-4-6 deepseek-v4-flash
ocgo mapping claude set claude-haiku-4-5 kimi-k2.7-code

Then launch Claude Code through the proxy:

ocgo launch claude

Under the hood, ocgo launch claude exports ANTHROPIC_BASE_URL=http://127.0.0.1:3456 and ANTHROPIC_AUTH_TOKEN=unused, then routes each Claude model name to its mapped OpenCode Go model — Opus requests go to GLM, Sonnet to DeepSeek, Haiku to Kimi — while the proxy injects your real OpenCode Go key upstream. Unmapped names pass through unchanged.

The proof is in the model picker. Ask the running session what it is and it tells you straight:

Model: kimi-k2.7-code. Claude Code session, but not running a Claude model.

That’s the Claude Code harness, your $10 subscription, and a Kimi model answering the prompt.

Which one to use

Way 1 is zero-install but limited to the Anthropic-compatible models. Way 2 is one brew install and a proxy process, but it opens the entire OpenCode Go catalog and lets you pin a different model to each tier and keep it there. Either way, you keep the harness you like and swap out the expensive backend for a ten-dollar one.

And honestly — if you can get good work done on the cheap models, you’ll have no trouble at all when you do reach for the expensive ones.

Follow Brian Porter on LinkedIn →
← Previous
Brian Porter

Written by

poornerd

CTO at an automotive data company in Munich. Co-founder of SiteForce AG. Four decades writing software and shipping production systems.

Keep reading

Related essays