Sonnet 5 is the right default for coding in Claude Code. Haiku 4.5 handles mechanical, fully specified work at a fifth of Opus output price. Opus 5 earns its rate on hard reasoning, unfamiliar architecture, and bugs that have already defeated one attempt. Fable 5 is for work larger than a single sitting. Switch per task with /model rather than picking one and living with it.
- Sonnet 5 is the working default. Most coding does not need more.
- Haiku 4.5 is genuinely capable on mechanical edits at $1 and $5 per million.
- Opus 5 is $5 and $25 per million. It earns that on reasoning, not on volume.
- Aliases resolve differently per provider.
opusis not the same model everywhere. opusplanplans on Opus and executes on Sonnet, which is the cheapest good habit here.
The lineup, with real numbers
Claude API list rates per million tokens, checked against Anthropic pricing on 7 August 2026.
| Model | Input | Output | Context | Good at |
|---|---|---|---|---|
| Haiku 4.5 | $1.00 | $5.00 | 200k | Mechanical edits, classification, volume |
| Sonnet 5 | $2.00 | $10.00 | 1M | Almost all real coding work |
| Opus 5 | $5.00 | $25.00 | 1M | Hard reasoning, design, stubborn bugs |
| Fable 5 | $10.00 | $50.00 | 1M | Long autonomous runs larger than one sitting |
- Output is priced five times input on every model in the table, so the output column is where the difference actually bites.
- Cache reads bill at 10 percent of the base input rate, which is why a long cached session is far cheaper than the input column alone suggests.
- The Batch API halves both input and output, but it is asynchronous and irrelevant to interactive coding.
- Haiku 4.5 does not support effort levels. Opus 5, Sonnet 5, and Fable 5 all do, and default to
high.
Aliases, and why yours may not mean what you think
Claude Code takes either a full model name or an alias. Aliases track the recommended version and change over time, which is convenient until you are on a provider where they resolve somewhere else.
The aliases, per Claude Code documentation in August 2026.
| Alias | What it does |
|---|---|
default | Clears any override and reverts to the recommended model for your account |
best | Fable 5 where your organisation has access, otherwise the latest Opus |
fable | Fable 5, for the hardest and longest-running tasks |
opus | The latest Opus for your provider |
sonnet | The latest Sonnet for your provider |
haiku | The fast Haiku model for simple work |
opusplan | Opus during plan mode, Sonnet for execution |
sonnet[1m] / opus[1m] | Selects the 1M context window explicitly |
Where the two common aliases land, by provider.
| Provider | opus | sonnet |
|---|---|---|
| Claude API | Opus 5 | Sonnet 5 |
| Claude Platform on AWS | Opus 5 | Sonnet 4.6 |
| Amazon Bedrock, Google Cloud Agent Platform | Opus 5 | Sonnet 4.5 |
| Microsoft Foundry | Opus 4.6 | Sonnet 4.5 |
Setting and switching it
# 1. in session, effective from the next turn
/model sonnet
/model claude-opus-5
/model # opens the picker; Enter saves as default, s is session-only
# 2. at launch, this session only
claude --model opus
# 3. environment, this session only
ANTHROPIC_MODEL=claude-haiku-4-5 claude
# 4. settings file, persistent
# { "model": "claude-sonnet-5" }
/modelsaves your choice as the default for new sessions by writing themodelfield in user settings. Presssin the picker to switch for this session only.- The picker asks for confirmation when the conversation already has output, because the next response re-reads the full history without cached context. That confirmation is a real cost warning, not a formality.
- Resumed sessions keep the model they were using when the transcript was saved, so another terminal switching models cannot change yours on resume.
- To run different models in different terminals at once, launch each with its own
--modelflag rather than switching with/model. - A subagent can pin its own model in frontmatter, and a skill can override the model for the turn it runs in.
A routing table
| Task | Model | Why |
|---|---|---|
| Rename a symbol across 30 files | Haiku 4.5 | Mechanical; the spec is already complete |
| Write tests to a stated spec | Haiku 4.5 | Pattern-following |
| Generate a commit message | Haiku 4.5 | Trivial and high volume |
| Agent-team teammates | Sonnet 5 | Anthropic recommends it for coordination work |
| Fix a test you have already located | Sonnet 5 | Bounded, needs some judgement |
| Add a feature across a few files | Sonnet 5 | The normal case |
| Refactor a module | Sonnet 5 | Still the normal case |
| Debug something already attempted once | Opus 5 | Sonnet failing is itself the signal |
| Design an approach for a large change | Opus 5 | A wrong direction is the expensive outcome |
| Review a security-sensitive diff | Opus 5 | One real catch pays for many reviews |
| A task larger than one sitting | Fable 5 | Built for long autonomous runs |
What the gap costs on one real task
List rates per million tokens are hard to reason about, because an agent session is mostly cache reads. Here is the same task priced four ways, so the ratio is concrete rather than notional.
The task: 300,000 input tokens across the session, of which 90 percent arrive as cache reads, plus 20,000 output tokens. That is a realistic shape for a bounded feature or a substantial debugging run.
Arithmetic at August 2026 Claude API rates. Sonnet 5 uses its introductory rates.
| Model | Fresh input | Cache reads | Output | Total |
|---|---|---|---|---|
| Haiku 4.5 | $0.03 | $0.03 | $0.10 | $0.16 |
| Sonnet 5 | $0.06 | $0.05 | $0.20 | $0.31 |
| Opus 5 | $0.15 | $0.14 | $0.50 | $0.79 |
| Fable 5 | $0.30 | $0.27 | $1.00 | $1.57 |
On a subscription the same ratios apply to your usage window rather than to a dollar figure: a session or weekly allowance is consumed roughly in proportion to token cost, and the windows are shared across models. Switching to Sonnet with /model after hitting an Opus-specific limit keeps you working; it does not restore a session or weekly window, because those are not per model.
Escalate on evidence, not on anxiety
Anthropic publishes two pieces of guidance that read differently, and both are correct in context. The platform models page says to start with Opus 5 for complex agentic coding and enterprise work. The Claude Code cost guidance says Sonnet handles most coding tasks and to reserve Opus for architectural decisions and multi-step reasoning. The first is answering "which model is capable of this"; the second is answering "which model should run your Tuesday".
The efficient pattern resolves both. It is not choosing a model per project, it is starting cheap and escalating the moment a task has shown you it is hard.
- Start on Sonnet 5. It handles the large majority of work at a fifth of Opus output price.
- Escalate to Opus 5 when Sonnet has produced a wrong answer twice, when the task is architectural, or when you cannot describe the fix yourself.
- Drop to Haiku 4.5 the moment a task turns mechanical, which frequently happens partway through: Opus decides the approach, Haiku applies it across thirty files.
- Escalate for review even when the work was done cheaply. A fresh Opus read of a finished diff in a subagent is one of the best uses of the expensive model there is.
- Or let
opusplando it. It runs Opus during plan mode and Sonnet for execution, which is the same discipline with no manual switching.
Model choice also interacts with reasoning effort, and the two multiply. High effort on Opus 5 is many times the cost of the default on Sonnet 5 for work the second combination often completes the same way. Decide the model first, then the effort, and change one at a time.
Questions people ask
Sonnet 5 for almost everything. Haiku 4.5 for mechanical, fully specified work at a fifth of Opus output price. Opus 5 for hard reasoning, architecture, and bugs that have already defeated one attempt. Fable 5 for work that spans more than one sitting.
Run /model followed by an alias or model name inside a session, or /model alone to open the picker. Enter saves it as your default for new sessions; s applies it to this session only. It takes effect from the next turn and does not lose your conversation.
It is an alias that uses Opus during plan mode and then switches to Sonnet for execution. It buys the expensive model where the decision is made and the cheaper one where the typing happens, with no manual switching.
For the hard few percent of work, clearly. As a default it is not: at $5 and $25 per million against Sonnet 5 it consumes quota several times faster on tasks the two complete identically.
For mechanical, fully specified edits, yes, and at $1 and $5 per million it is very cheap. For anything requiring judgement about unfamiliar code, no. Note it also has a 200k context window rather than 1M, and does not support effort levels.
Yes, substantially. Subscription usage windows are consumed roughly in proportion to token cost, so Opus exhausts an allowance several times faster than Sonnet for the same work. Switching models with /model does not reset a session or weekly window, because those are shared across models.
Aliases resolve per provider. On the Claude API opus is Opus 5; on Microsoft Foundry it is Opus 4.6. Pin the full model name, or set ANTHROPIC_DEFAULT_OPUS_MODEL, if you need them to match.
Yes, that is the most efficient pattern. Opus to decide an approach, Sonnet or Haiku to apply it, Opus again in a fresh subagent to review the finished diff.
Sources
Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.