Claude Code
Claude Code is Anthropic’s terminal agent. It is the only tool in this section that does not connect directly to Helmcode, and it is worth understanding why before fighting the configuration.
Warning: it is not a problem with your key. Claude Code speaks the Anthropic API format; Helmcode speaks the OpenAI format. They are two different protocols, so pointing
ANTHROPIC_BASE_URLathttps://api.helmcode.com/v1does not work — the request arrives in a shape the API does not understand.
There are two paths, and they do different things:
| Path | What you get | What it costs |
|---|---|---|
| Delegate to OpenCode | Claude Code directs; the model work runs on Helmcode through OpenCode | Installing OpenCode. Nothing else |
| Local gateway | Claude Code uses Helmcode models as if they were its own | An extra process running on your machine |
Start with the first. It is simpler and it builds no infrastructure.
Path 1 — delegate to OpenCode
Claude Code can run commands in your terminal, and OpenCode knows how to work headless. That is enough: you ask Claude Code, in plain words, to use OpenCode for a task, and the model work happens on Helmcode.
1. Configure OpenCode
Once, as its page explains.
2. Check that it answers without an interface
opencode run --agent plan -m helmcode/glm5.3-flash \
"Summarize in three lines what this repository does."
Three things about that command:
runis the headless mode: it does the task, writes the answer and exits.-mtakes the model asprovider/model, where the provider is the name you gave it in youropencode.json—helmcodeif you followed our page.--agent planleaves OpenCode in read-only mode. Without it, it starts with its default agent, which can edit files and run commands.
3. Ask Claude Code for it
Inside a Claude Code session, say it plainly:
Use `opencode run --agent plan -m helmcode/glm5.3-flash` to review
src/parser.ts and tell me which cases it is not covering.
Claude Code runs the command, reads what OpenCode answers and carries on from there. The first time, it asks for permission to run it.
This works well for what is long to read and cheap to summarize: reviewing a big file, drafting, summarizing documentation, comparing two versions. Claude Code keeps the coordination and the fine edits.
Two options that help once you get a taste for it:
-f fileattaches specific files instead of making it look for them.-ccontinues OpenCode’s last conversation, so you can follow up without explaining everything again.
Tip: write a line in your project’s
CLAUDE.mdalong the lines of “to review long files, useopencode run --agent plan -m helmcode/glm5.3-flash”. That way you do not have to repeat the command every session.
Two separate meters. What Claude Code does comes out of your Anthropic subscription; what
opencode rundoes comes out of your Helmcode key. That is exactly what you want if you are stretching the subscription, but it is worth being clear about when you look at usage figures.
Path 2 — a local gateway
If what you want is for Claude Code itself to use Helmcode models, you have to put something in the middle that translates between the two formats.
You need Claude Code installed, Python 3.10 or newer for the gateway, and your Helmcode API key in HELMCODE_API_KEY.
1. Install the gateway
LiteLLM exposes a /v1/messages endpoint in Anthropic’s format and translates it into OpenAI’s before forwarding it.
pip install "litellm[proxy]"
Warning: pin the version you install rather than tracking latest, and review the release notes before upgrading. This process holds your API key.
2. Configure the gateway
Create a litellm.config.yaml wherever suits you:
model_list:
- model_name: helmcode-coder
litellm_params:
model: openai/deepseek-v4-flash
api_base: https://api.helmcode.com/v1
api_key: os.environ/HELMCODE_API_KEY
- model_name: helmcode-fast
litellm_params:
model: openai/gemma4
api_base: https://api.helmcode.com/v1
api_key: os.environ/HELMCODE_API_KEY
general_settings:
master_key: sk-local-change-this
Warning: the GLM family does not survive this gateway.
glm5.3andglm5.3-flashanswer normally over/v1/chat/completions, but LiteLLM’s translation to Anthropic format returns them with an emptycontent, so Claude Code shows nothing at all. Checked on litellm 1.101.0, twice per model. Stick todeepseek-v4-flash,qwen3.6orgemma4on this path — they come through intact.
The openai/ prefix tells LiteLLM which format to speak to Helmcode in. What comes after the prefix is the model id exactly as it appears in Models, and model_name is the name you will see it under from Claude Code.
The master_key is a key you make up for your local gateway. It is not your Helmcode key, and it must not be: only the LiteLLM process knows that one.
3. Start the gateway
litellm --config litellm.config.yaml --port 4000
Leave it running in its own terminal.
4. Point Claude Code at the gateway
export ANTHROPIC_BASE_URL="http://localhost:4000"
export ANTHROPIC_AUTH_TOKEN="sk-local-change-this"
export ANTHROPIC_MODEL="helmcode-coder"
claude
Use ANTHROPIC_AUTH_TOKEN and not ANTHROPIC_API_KEY: it is the variable Claude Code sends as the Authorization header when the base URL is not Anthropic’s.
If you would rather pick the model per session, leave ANTHROPIC_MODEL out and start with claude --model helmcode-coder.
5. Check that it works
With the gateway up:
curl http://localhost:4000/v1/messages \
-H "Authorization: Bearer sk-local-change-this" \
-H "Content-Type: application/json" \
-d '{
"model": "helmcode-coder",
"max_tokens": 256,
"messages": [{ "role": "user", "content": "Say hello." }]
}'
If that answers, so will Claude Code. An authentication error is ambiguous here and worth reading twice: it is either the master_key you made up, or the Helmcode id inside litellm_params, because an id we do not serve also comes back as a 401 rather than as a not-found.
Keep max_tokens generous here. These models reason before they answer, and the reasoning comes out of the same budget: with a small figure you get a valid reply whose text is empty and whose stop_reason is max_tokens, which reads like a failure and is not one.
Smaller gateways dedicated to just this exist, such as claude-code-proxy. The idea is the same: a local process that receives in Anthropic format and forwards to
https://api.helmcode.com/v1.
Recommended model
It depends on the path, because the model does different jobs in each.
Delegating to OpenCode, the model receives separate, bounded errands, so deepseek-v4-flash is the right default — 1M of context and the deepest reasoning in the catalog. qwen3.6 is enough for quick summaries and comes back faster.
With the gateway, the choice is made for you: deepseek-v4-flash. It is the only 1M-context model that survives the translation to Anthropic format — the GLM family comes back empty, as the warning above explains.
Known issues
- When delegating, OpenCode’s output lands in your conversation. If you ask it to summarize something enormous, whatever it returns takes up context in Claude Code. Ask it for summaries, not dumps.
- With the gateway, the whole session goes through your machine. If you kill the process, Claude Code stops answering. It is not a service; it is something of yours that has to be switched on.
- Agent behavior depends on the model. Claude Code is tuned against Anthropic’s models, and an open model may use its tools less well. This only affects the gateway path: when delegating, Claude Code is still Claude Code.
- Features tied to the Anthropic account do not travel. Anything that depends on Anthropic’s infrastructure does not work against another base URL.
- Context fills up fast. An agent session eats tokens far quicker than a chat. Watch your key’s limits in Rate limits and your usage in the console.