griffin

Griffin / Claude Code pricing / Change model

How to change the model in Claude Code, and which one to pick

By Ilya Volodarsky · updated · sources checked · Winding AI makes Griffin

The Griffin eagle handing tasks to a row of smaller agent birds

Short answer: Type /model in Claude Code and pick a model, or type /model sonnet to switch at once; the --model flag sets it for one launch, and ANTHROPIC_MODEL or "model" in settings sets the default.1 The default is Opus 5.5 on every plan.1 For most coding, Sonnet 5.5 passed every RouteBench coding task at under half of Opus's cost.3

How do I change the model in Claude Code?

You change the model in Claude Code with the /model command during a session, the --model flag at launch, the ANTHROPIC_MODEL environment variable, or the model field in your settings file, and the first one set wins in that order.1

  1. In a session: run /model to open the picker, or /model opus, /model sonnet or /model haiku. Typing a name saves it as your default; to change only this session, open the picker and press s on the model's row.1
  2. For one launch: claude --model claude-sonnet-5-5.1
  3. For every session: export ANTHROPIC_MODEL=sonnet in your shell profile, or {"model": "sonnet"} in ~/.claude/settings.json.1
  4. Check it: /status shows the model in use, and so does a status line if you set one up.14

If none of these is set, Claude Code reads ANTHROPIC_DEFAULT_MODEL (version 2.1.236 or later), then your account's default.1

What model does Claude Code use by default?

Claude Code uses Opus 5.5 by default on Pro, Max, Ultra, Team and Enterprise plans and on the Anthropic API, Amazon Bedrock and Google Cloud; on Microsoft Foundry the default is Sonnet 4.5.1 An organization admin can set a different default for its members.1 Opus 5.5 costs $4 per million input tokens and $20 per million output tokens, twice Sonnet 5.5's $2 and $10.2 What that does to a monthly bill, plan by plan, is in our Claude Code pricing guide.

Which model names and aliases does Claude Code accept?

Claude Code accepts aliases that always point at the newest model of a family, plus full model IDs such as claude-opus-5-5 to pin one version.1

Claude Code model aliases (Claude Code docs, checked November 21, 2026).
AliasRunsUse it for
defaultYour account's default (Opus 5.5)Clearing an override
opus / bestOpus 5.5Hard design and debugging
sonnetSonnet 5.5Most coding work
haikuHaiku 5.5Search, small edits, subagents
fableFable 5.2The hardest problems, at 2x Opus's price
opusplanOpus in plan mode, Sonnet otherwisePlanning with Opus, building with Sonnet
sonnet[1m], opus[1m]The same model with a 1M-token windowVery large repos and logs

Haiku 5.5 runs with a 1M-token window on every plan without the suffix, but a prompt over 100,000 tokens costs five times as much per token.12

What is opusplan, and does it save money?

The opusplan setting runs Opus while you are in plan mode and switches to Sonnet when Claude starts writing code, so you pay Opus prices only for planning.1 It saves money when plans are short and building is long. Each toggle into or out of plan mode is a model switch, and each model keeps its own prompt cache, so the first turn after a toggle re-reads the whole conversation uncached.5

What does switching models mid-session cost?

Switching models mid-session costs one full-price turn, because each model has its own prompt cache and the new model reads the entire conversation again.5 Claude Code asks you to confirm a /model switch while the cache is still warm for that reason.5 Here is the arithmetic at Anthropic's list prices for a conversation that has grown to 150,000 tokens:2

One turn that re-reads a 150,000-token conversation (our arithmetic from Anthropic's prices, November 21, 2026).
TurnOpus 5.5Sonnet 5.5
Same model, cache warm (cache hit)$0.03$0.015
After a switch (5-minute cache write)$0.75$0.375

By that arithmetic one switch on Opus costs as much as 25 warm turns.2 Pick the model when you start a task, and switch at natural breaks such as after /clear; our token usage guide lists the other cache breakers.

How do I set the model for subagents and background tasks?

Subagents use the session's model unless you set one: put model: haiku in a subagent's frontmatter, or set CLAUDE_CODE_SUBAGENT_MODEL for all subagents and agent-team teammates.16 Background work such as summaries runs on whatever ANTHROPIC_DEFAULT_HAIKU_MODEL points at.1 Anthropic suggests Haiku for simple subagent work and Sonnet for teammates.6

// ~/.claude/settings.json
{
  "model": "sonnet",
  "env": {
    "CLAUDE_CODE_SUBAGENT_MODEL": "claude-haiku-5-5"
  }
}

Which model is best for Claude Code?

Sonnet 5.5 is the best default for Claude Code on our numbers: it passed every RouteBench code review, security review and tool-calling task at 47% of Opus 5.5's cost.3 Haiku 5.5 and DeepSeek V4.1 Flash came close for under a tenth of Sonnet's price, so they suit subagents and routine edits.3

RouteBench, six weekly runs pooled (October 12 to November 16, 2026): pass rate · $ per 1,000 tasks.
ModelCode reviewSecurity reviewTool calling
Claude Opus 5.5100% · $2.97100% · $4.0197.3% · $7.13
Claude Sonnet 5.5100% · $1.39100% · $1.71100% · $3.77
Claude Haiku 5.599.1% · $0.1098.1% · $0.10100% · $0.17
DeepSeek V4.1 Flash99.1% · $0.1397.4% · $0.18100% · $0.20
GPT-6.1 Sol100% · $0.72100% · $0.81100% · $1.16
GLM 5.397.3% · $1.4798.9% · $1.62100% · $1.08

RouteBench tasks are single calls with checked answers, such as finding a seeded bug in a diff; they don't measure long, multi-file agent work, where Opus's extra depth shows most.3 Anthropic's own advice matches: Sonnet for most coding, Opus for complex architecture, Haiku for simple subagents.6

Is Claude or GPT better for coding?

Claude and GPT models were equally accurate on RouteBench's coding tasks, but GPT cost less per task: GPT-6.1 Sol and Sonnet 5.5 both passed every one, at $0.87 and $2.27 per 1,000.3 Their list prices are the same, $2 and $10 per million tokens, so the gap is in how many tokens each spends.27 Our Codex pricing guide compares the two agents' plans.

Can Claude Code use models that aren't Claude?

Claude Code can use other models through any endpoint that speaks Anthropic's Messages API: set ANTHROPIC_BASE_URL and a key, then point the ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL and ANTHROPIC_DEFAULT_HAIKU_MODEL aliases at that provider's models.1 Each provider's exact settings are in our guides to DeepSeek, the GLM Coding Plan, Kimi and OpenRouter; to route different requests to different providers, use Claude Code Router.

How does effort change cost in Claude Code?

Effort sets how much the model thinks before it answers, from low through medium, high, xhigh and max; higher effort writes more thinking tokens, which bill as output.12 The default is medium on Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.2. Change it with /effort, --effort or CLAUDE_CODE_EFFORT_LEVEL.1 Thinking can't be turned off on those models, so lower effort is the lever.6

Why does a new session start on a different model?

A new session starts on a different model when an alias variable such as ANTHROPIC_DEFAULT_OPUS_MODEL is set, when your saved model was retired or is blocked by an admin's availableModels list, or when an organization default applies.1 When the primary model is overloaded, a fallback chain such as claude --fallback-model sonnet,haiku switches for that turn only and tries the primary again next turn.1

Sources

  1. Claude Code docs: model configuration · checked
  2. Claude API docs: pricing · checked
  3. Griffin: RouteBench coding results, six runs pooled (our data) · checked
  4. Claude Code docs: status line · checked
  5. Claude Code docs: how Claude Code uses prompt caching · checked
  6. Claude Code docs: manage costs effectively · checked
  7. OpenAI: Codex pricing (GPT-6.1 Sol credit rates) · checked

FAQ

How do I switch from Opus to Sonnet in Claude Code?

Type /model sonnet in the session. To make Sonnet your default for every session, set "model": "sonnet" in ~/.claude/settings.json or export ANTHROPIC_MODEL=sonnet.

Does /model change the model for the current session only?

Typing /model with a name saves it as your default for new sessions too. To change only the current session, open the picker with /model and press s on the model's row.

What model does Claude Code use?

Opus 5.5 by default on all Claude plans and the Anthropic API, or Sonnet 4.5 on Microsoft Foundry. Run /status to see the model in your session.

Which model should subagents use?

Haiku for searches and simple edits, set with model: haiku in the subagent's frontmatter or CLAUDE_CODE_SUBAGENT_MODEL for all of them. On RouteBench, Haiku 5.5 passed 99% of coding tasks for $0.10 to $0.17 per 1,000.

Is Opus or Sonnet better for Claude Code?

Sonnet for most work: it passed every RouteBench coding task at under half of Opus's cost. Use Opus, or opusplan, for architecture and hard debugging.

Pick models on evidence.

Griffin grades cheaper models on your own app's calls and moves a feature only after one passed. Watching your costs is free.

Start free