Which model to use in Claude Code: slots, prices and the index
Claude Code takes its models from several environment variables. Here's what to put in each slot by price and index, and what a session costs.
6 min · · IDE · экономия
Claude Code doesn't use just one model but several: a main one for the session and separate ones for the opus, sonnet and haiku aliases and for background tasks. If you connected it to Zukko and kept the defaults, the "which model to use in Claude Code" question answers itself — but not necessarily in the cheapest way. Below: which slots exist, what to put in them by price and intelligence index, and what a typical session costs.
Which model slots Claude Code has
The variable names were checked against the official Claude Code documentation — the Model configuration and Environment variables pages as of October 2026.
| Variable | What it controls |
|---|---|
ANTHROPIC_MODEL | the model a session starts on; the --model flag and the /model command override it |
ANTHROPIC_DEFAULT_OPUS_MODEL | what the opus alias resolves to; opusplan also uses it while Plan Mode is active |
ANTHROPIC_DEFAULT_SONNET_MODEL | what the sonnet alias resolves to; opusplan uses it outside Plan Mode |
ANTHROPIC_DEFAULT_HAIKU_MODEL | the haiku alias and Claude Code's background tasks |
Two more variables are worth knowing. ANTHROPIC_DEFAULT_FABLE_MODEL sets the fable alias, and CLAUDE_CODE_SUBAGENT_MODEL sets the default model for subagents that aren't assigned one another way. The old ANTHROPIC_SMALL_FAST_MODEL is marked deprecated in the docs in favor of ANTHROPIC_DEFAULT_HAIKU_MODEL.
Each variable takes a full model ID. For Zukko that's an ID from the catalog: claude-sonnet-5, claude-opus-5-5, and so on.
Which model to use in Claude Code by price and index
Zukko prices in dollars per 1M tokens. The intelligence index is the Artificial Analysis Intelligence Index, an aggregate benchmark score.
| Model | Input / output | Cache read / write | Context | Index |
|---|---|---|---|---|
claude-opus-5-5 | 0.4 / 2 | 0.038 / 0.425 | 1M | 58 |
claude-sonnet-5 | 0.2 / 1.013 | 0.025 / 0.25 | 1M | no data |
claude-fable-5-1 | 3.48 / 17.4 | 0.3 / 3.663 | 1M | 53 |
gpt-6.1-sol | 0.27 / 1.32 | 0.013 / — | 1M | 52 |
gemini-3.8-flash | 0.025 / 0.088 | 0.013 / — | 1M | 41 |
deepseek-v4.1-flash | 0.013 / 0.038 | 0.013 / — | 1M | 39 |
For GPT, Gemini and DeepSeek a cache write is not charged separately: the first request is billed in full at the input price. Cache reads for Gemini and DeepSeek are counted if the provider reports them in the response.
A few non-obvious things follow from the table.
Opus slot → claude-opus-5-5. It has the highest index in the catalog (58) and is still cheaper than both claude-opus-5 (0.425 / 2.113) and Fable 5.1. There's no price reason to put older Opus versions in this slot.
Sonnet slot → claude-sonnet-5. The cheapest Claude model in the catalog: 0.2 input, 1.013 output. Sonnet 4.6 costs more (0.263 / 1.275). There is no index data for Sonnet 5, so comparing it with Opus 5.5 has to happen on your own tasks.
Haiku slot. None of the models currently available in Zukko is a Haiku, so you need to put something in this slot explicitly. The safe choice is claude-sonnet-5. The cheap choice is gemini-3.8-flash or deepseek-v4.1-flash: the gateway accepts any model in the Anthropic format and converts the request itself. But these are models from another family, so after switching, work for a day and make sure background tasks behave normally.
Fable 5.1. It costs 3.48 / 17.4 versus 0.4 / 2 for Opus 5.5, while its index in the table is lower (53 vs 58). If you use it, do so based on results on your own tasks, not catalog numbers.
Non-Anthropic models in the main slots. Technically possible: for example, gpt-6.1-sol with an index of 52 is cheaper than claude-opus-5-5 on both input and output. Note the caveat from the Claude Code docs: for IDs that don't start with claude-, it may assume a context window different from the real one. The CLAUDE_CODE_MAX_CONTEXT_TOKENS variable exists for this; details are in the gateway section of the Model configuration page. This matters most for GLM 5.3 with its 128K context.
A ready-made configuration
A good starting point: day-to-day work on Sonnet 5, hard tasks on Opus 5.5 via /model opus or opusplan.
export ANTHROPIC_BASE_URL=https://api.zukko.pro
export ANTHROPIC_AUTH_TOKEN=fetch_your_key
export ANTHROPIC_MODEL=claude-sonnet-5
export ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-5-5
export ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-5
export ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-sonnet-5The address has no /v1: Claude Code adds it itself. The key goes in ANTHROPIC_AUTH_TOKEN. You can put the same variables into the env block of ~/.claude/settings.json so you don't have to export them in every terminal:
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.zukko.pro",
"ANTHROPIC_AUTH_TOKEN": "fetch_your_key",
"ANTHROPIC_MODEL": "claude-sonnet-5",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-sonnet-5"
}
}Step-by-step setup is in the Claude Code guide.
What a session costs and why caching matters
Claude Code sends the model the whole session context on every step, and most of that input repeats. Claude Code turns on prompt caching by itself, and it works in the Anthropic format (/v1/messages) — the format in which the gateway sees how much input came from cache and bills it at the cache read price.
An example session: 3M input tokens, of which 2.7M are cache reads, 0.15M cache writes, 0.15M fresh input; output is 0.1M.
Formula: fresh input × input price + cache reads × read price + cache writes × write price + output × output price.
claude-sonnet-5: 0.15 × 0.2 + 2.7 × 0.025 + 0.15 × 0.25 + 0.1 × 1.013 = 0.03 + 0.0675 + 0.0375 + 0.1013 = $0.236.claude-opus-5-5: 0.15 × 0.4 + 2.7 × 0.038 + 0.15 × 0.425 + 0.1 × 2 = 0.06 + 0.1026 + 0.0638 + 0.2 = $0.426.claude-fable-5-1: 0.15 × 3.48 + 2.7 × 0.3 + 0.15 × 3.663 + 0.1 × 17.4 = 0.522 + 0.81 + 0.549 + 1.74 = $3.62.
For comparison: if all of Sonnet 5's input were billed at the input price, as happens with Claude in the OpenAI format, the same session would cost 3 × 0.2 + 0.1 × 1.013 = $0.70. So don't disable caching (Claude Code has a DISABLE_PROMPT_CACHING variable for that), and don't route Claude models through OpenAI-compatible layers where you can work in the Anthropic format directly. The token split in the example is illustrative — check your own in the dashboard. A step-by-step session calculation with a growing context is in the article on what a Claude Code agent costs. More on reducing spend is in the article on saving tokens in Claude Code.
How to check your choice in practice
- For a week, work with Sonnet 5 as the main model and hand hard tasks to Opus 5.5 via
/modeloropusplan. - In the Usage section of the dashboard, see how much went to each model.
- Note the tasks where Sonnet 5 fell short and you had to switch. If there are many, try Opus 5.5 as the main model: by the estimate above, a session on it costs about $0.19 more for the same token volume.
Current models and prices: GET https://api.zukko.pro/v1/models or the Models page in the dashboard. Create a key for Claude Code under API keys.
FAQ
Do I need to add /v1 to ANTHROPIC_BASE_URL?
No. Claude Code appends the /v1/messages path itself, so the address is https://api.zukko.pro. With /v1 the requests go to the wrong place.
Can I put a non-Anthropic model in the Haiku slot?
Yes, the gateway converts the format. But after the change, check that background tasks work as before. If in doubt, keep claude-sonnet-5.
What if the model in a slot stops responding?
A 503 error with the model_disabled code means the model is temporarily off. Pick another one from GET https://api.zukko.pro/v1/models and change the variable.
Where can I see what a session cost?
In the Usage section of the dashboard — in the per-request spending history. Compare the amount with the formula above: if it's close to the no-cache figure, check that caching isn't disabled.
zukko
Pay 25×
less
for Claude Code & ChatGPT
One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.
Related articles
- Claude Code with Qwen, GLM and DeepSeek models through one keyClaude Code is not tied to Claude: the model is set by a variable. A configuration for Qwen, GLM and DeepSeek, a session calculated, and how to keep Opus for the hard parts.
- How much Cline costs: the extension is free, you pay for tokens — a calculationWith your own key Cline sells no model subscription: you pay for tokens. A workday on several models, calculated, and how to stay within budget.
- opencode agents: setting up roles, models and toolsA custom agent in opencode is a role, a model and a set of permissions. A working config where a cheap model handles routine work and a stronger one edits code.
- Plan mode in Claude Code: plan first, then edit the codeIn plan mode Claude Code reads your code and proposes a plan but edits nothing until you agree. How to enable it, use it and what it costs.