Choosing a Claude Code model: Opus, Sonnet, or Haiku

Model choice is the largest single lever on both cost and quota consumption, and most people set it once and never touch it again. The default is not always the right answer, in either direction.

By the Continuum team. We build a workbench that runs Claude Code, Codex, and their peers, so the model rates quoted here are the ones our own cost analytics ship with.

The short version

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.

What you need to know
  • 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. opus is not the same model everywhere.
  • opusplan plans 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.

ModelInputOutputContextGood at
Haiku 4.5$1.00$5.00200kMechanical edits, classification, volume
Sonnet 5$2.00$10.001MAlmost all real coding work
Opus 5$5.00$25.001MHard reasoning, design, stubborn bugs
Fable 5$10.00$50.001MLong 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.

AliasWhat it does
defaultClears any override and reverts to the recommended model for your account
bestFable 5 where your organisation has access, otherwise the latest Opus
fableFable 5, for the hardest and longest-running tasks
opusThe latest Opus for your provider
sonnetThe latest Sonnet for your provider
haikuThe fast Haiku model for simple work
opusplanOpus during plan mode, Sonnet for execution
sonnet[1m] / opus[1m]Selects the 1M context window explicitly

Where the two common aliases land, by provider.

Provideropussonnet
Claude APIOpus 5Sonnet 5
Claude Platform on AWSOpus 5Sonnet 4.6
Amazon Bedrock, Google Cloud Agent PlatformOpus 5Sonnet 4.5
Microsoft FoundryOpus 4.6Sonnet 4.5

Setting and switching it

Four places, in descending priority.
# 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" }
  • /model saves your choice as the default for new sessions by writing the model field in user settings. Press s in 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 --model flag 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

TaskModelWhy
Rename a symbol across 30 filesHaiku 4.5Mechanical; the spec is already complete
Write tests to a stated specHaiku 4.5Pattern-following
Generate a commit messageHaiku 4.5Trivial and high volume
Agent-team teammatesSonnet 5Anthropic recommends it for coordination work
Fix a test you have already locatedSonnet 5Bounded, needs some judgement
Add a feature across a few filesSonnet 5The normal case
Refactor a moduleSonnet 5Still the normal case
Debug something already attempted onceOpus 5Sonnet failing is itself the signal
Design an approach for a large changeOpus 5A wrong direction is the expensive outcome
Review a security-sensitive diffOpus 5One real catch pays for many reviews
A task larger than one sittingFable 5Built 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.

ModelFresh inputCache readsOutputTotal
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.

  1. Start on Sonnet 5. It handles the large majority of work at a fifth of Opus output price.
  2. 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.
  3. 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.
  4. 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.
  5. Or let opusplan do 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.

  1. Claude Code: model configuration
  2. Anthropic models overview
  3. Anthropic pricing
  4. Claude Code: manage costs effectively
Try it

Spend, split
by model.

Continuum shows which model consumed what, which is usually more persuasive than any routing advice.

free app · your subscriptions · local-first