In short:
- Flagship models earn their price on ambiguous, multi-step work where a wrong turn is expensive: architecture, large refactors, hard debugging, long unattended runs.
- Balanced models are the right default for most day-to-day coding.
- Fast models are ideal for the high-volume parts of agent work: searching, reading, summarising, sub-agents and background tasks.
- The best setup is usually a mix: a stronger model to plan, a cheaper one to execute and explore. Test on your own tasks rather than trusting anyone’s leaderboard, including ours.
Coding agents such as Claude Code, Codex CLI and Cline do not make one model call per task. They run a loop: read files, plan, edit, run a command, read the output, and repeat, often dozens of times. Each step is a model request that re-sends a growing context. So the model you choose affects both the quality of each decision and the number and cost of the steps. This guide gives a practical, honest framework for choosing, using the models in our catalogue as examples. We deliberately do not quote benchmark scores; they change quickly, and they rarely predict how a model behaves on your codebase.
The three tiers in our catalogue
We group models into three tiers based on their intended use and price. These are the current members of each, straight from our model data:
Flagship
- Claude Opus 5.5 (Anthropic, $4.40 in / $22 out per 1M tokens): Anthropic's most capable model for long agentic coding sessions, deep refactors and hard reasoning.
- GPT-6.1 Sol (OpenAI, $2.20 in / $11 out per 1M tokens): OpenAI's latest flagship, tuned for tool use and long-context coding with Codex.
- GPT-5.6 Sol (OpenAI, $5.50 in / $33 out per 1M tokens): High-effort GPT reasoning model for difficult multi-step problems.
- Grok 4.7 (xAI, $2.20 in / $6.60 out per 1M tokens): xAI's newest Grok, with a 500K context window, vision input and tool calling.
Balanced
- Claude Sonnet 5 (Anthropic, $2.20 in / $11 out per 1M tokens): The everyday workhorse: strong coding quality at a fraction of flagship cost.
- GPT-5.6 Terra (OpenAI, $2.20 in / $13.20 out per 1M tokens): Balanced GPT model with solid coding and writing at moderate cost.
- Grok 4.6 (xAI, $2.20 in / $6.60 out per 1M tokens): xAI's Grok with fast responses and competitive output pricing.
- Claude Sonnet 5.5 (Anthropic, $2.20 in / $11 out per 1M tokens): The newest Sonnet: near-flagship coding and agent work at the mid-range price.
- DeepSeek V4 Pro (DeepSeek, $1.32 in / $3.96 out per 1M tokens): DeepSeek's larger V4 model for harder coding and reasoning, text input only.
Fast
- Claude Haiku 4.5 (Anthropic, $1.10 in / $5.50 out per 1M tokens): Fast, low-cost Claude for sub-agents, classification and high-volume tasks.
- DeepSeek V4 Flash (DeepSeek, $0.24 in / $0.96 out per 1M tokens): Low-cost DeepSeek model with a 1M context window and optional thinking.
What one agent turn costs
To make the price differences concrete, imagine a typical mid-session turn: the agent sends about 40,000 tokens of context (instructions, tool definitions, files read, earlier steps) and writes about 2,000 tokens (reasoning, a tool call, or an edit). These are illustrative numbers; your own usage log will show your real ones.
| Model | Tier | Per turn, no cache | Per turn, 90% cached input |
|---|---|---|---|
| Claude Opus 5.5 | flagship | $0.220 | $0.070 |
| Claude Sonnet 5 | balanced | $0.110 | $0.039 |
| Claude Haiku 4.5 | fast | $0.055 | $0.019 |
| GPT-6.1 Sol | flagship | $0.110 | $0.035 |
| GPT-5.6 Sol | flagship | $0.286 | $0.108 |
| GPT-5.6 Terra | balanced | $0.114 | $0.043 |
| Grok 4.6 | balanced | $0.101 | $0.042 |
| Claude Sonnet 5.5 | balanced | $0.110 | $0.039 |
| Grok 4.7 | flagship | $0.101 | $0.042 |
| DeepSeek V4 Flash | fast | $0.012 | $0.003 |
| DeepSeek V4 Pro | balanced | $0.061 | $0.015 |
For example, on Claude Opus 5.5 one uncached turn is (40,000 × $4.40 + 2,000 × $22) / 1,000,000 = $0.220. Multiply by the number of turns in a session, and by sessions per day, and the tier choice becomes the largest single factor in your bill. Our cost estimation guide walks through a full session.
But per-turn price is only half the picture.
The hidden cost: turns and corrections
A cheaper model is not cheaper if it needs more turns, takes a wrong approach that you have to undo, or produces code you spend twenty minutes fixing. In agent work, mistakes compound: a wrong assumption in step three can waste the next twenty steps, all of which are billed.
That is the real argument for flagship models. On well-defined, local tasks, the gap between tiers is often small, and paying more buys little. On open-ended tasks, where the agent has to explore an unfamiliar codebase, weigh trade-offs or recover from its own errors, a stronger model is more likely to take a sensible path the first time. The total cost of finishing the task, including your time, is what matters.
When to use each tier
Flagship: plan, architect, untangle
Use a flagship model such as Claude Opus 5.5 when:
- The task is ambiguous or spans many files: “migrate this service from callbacks to async/await”, “design the data model for this feature”.
- You are debugging something subtle, where the agent must form and test hypotheses.
- The agent will run for a long time without supervision, so each decision carries more weight.
- A cheaper model has already failed at the task once.
Balanced: the daily driver
A balanced model such as Claude Sonnet 5 is the sensible default for most interactive coding: implementing a well-described feature, writing tests, reviewing a diff, explaining code, fixing a clear bug. You stay in the loop, so if it goes off track you notice quickly and correct it. It is reasonable to spend most sessions here and switch up only when you hit something hard.
Fast: volume work and sub-agents
Fast models such as Claude Haiku 4.5 and DeepSeek V4 Flash shine where the work is high volume and each step is simple:
- Sub-agents that search the codebase, read files and report back a summary.
- Background tasks like session titles, commit messages and short summaries.
- Mechanical edits: renames, formatting fixes, adding types or docstrings across many files.
- Batch jobs: generating test fixtures, classifying issues, triaging logs.
Because sub-agents and background tasks often consume a large share of tokens, moving them to a fast model can lower costs substantially without touching the quality of the main thread.
Mixing tiers in practice
Most agent tools let you use different models for different roles. A few verified examples:
Claude Code (Claude models only, Anthropic format):
- The
opusplanmodel alias uses the Opus model while in Plan Mode and the Sonnet model for execution. CLAUDE_CODE_SUBAGENT_MODELsets the default model for sub-agents.ANTHROPIC_DEFAULT_HAIKU_MODELsets the model behind thehaikualias, which Claude Code also uses for background work such as session titles.
Pin each alias to an exact model ID through the gateway so you know which rate applies. Our post on using Claude Code with a custom base URL shows the full settings.json. Note that Anthropic does not support using Claude Code with non-Claude models, so keep GPT, Grok and DeepSeek for OpenAI-format tools.
Cline has a setting to use different models for its Plan and Act modes, which maps neatly onto “strong planner, cheaper executor”. See the Cline setup guide.
Codex CLI, Cursor and other OpenAI-format tools can use any model in our catalogue that supports the OpenAI format, including the GPT, Grok and DeepSeek families. Setup is covered in the guides, for example Codex CLI and Cursor.
Run your own evaluation (it takes an afternoon)
Public benchmarks measure someone else’s tasks. Your codebase, languages and conventions are what matter. A lightweight evaluation:
- Pick three to five real tasks from your backlog: one small bug, one feature, one refactor, one “figure out why this is slow”.
- Run each task on two or three models from different tiers, with the same prompt and the same starting commit.
- Record four things per run: did it finish; how many turns it took; the cost, from your usage log; and how much you had to fix by hand.
- Decide per task type, not overall. You will often find that a balanced model matches the flagship on small tasks, and that the flagship wins on the refactor.
Because Relaykit uses one key and one prepaid balance for every model, switching models for a test is just a change to the model ID; you do not need separate accounts.
Signals to move up or down a tier
Move up when the agent loops (repeating the same failing fix), makes confident claims about code it has not read, ignores instructions in your project’s guidance file, or needs heavy correction on multi-file changes.
Move down when the tasks are routine and well-specified, you consistently accept the output with few edits, or most of the tokens are going to reading and searching rather than reasoning.
Practical defaults to start with
If you want a starting point and will adjust from evidence:
- Interactive coding: a balanced model as the main model.
- Hard tasks: switch to a flagship for the session, or use a plan-with-flagship, execute-with-balanced setup.
- Sub-agents and background work: a fast model.
- Every model: keep
max_tokensreasonable, and let your tool’s prompt caching work by not editing early context unnecessarily.
Next steps
- Compare the full list and rates on the models page and pricing.
- Get a key and make your first call with the quickstart.
- Set up your tool from the setup guides.