How to Change the Model in Claude Code

Claude Code change model guide: /model, the --model flag, the model setting, aliases like opus and sonnet, effort levels, fast mode pricing and defaults.

Josh Pocock8 min read

Change model cover

AI Coding

Change model

Stride AI Academy

To change the model in Claude Code, type /model in a session and pick one from the list, or type it directly, such as /model sonnet. That switches straight away and saves the model as your default for new sessions. To pick a model for one launch only, start with claude --model opus, and to set it for good, put a model key in your settings file.

This guide covers every way to switch, the aliases, the default model, effort levels, fast mode and its cost, and why a session can start on the wrong model. Everything here was checked against Claude Code's model configuration docs, fast mode docs, settings reference, interactive mode docs and Anthropic's API pricing page on November 22, 2026. For what each model is good at, see our guide to Claude models.

Change the model with /model

/model

With no argument, it opens a picker. Two keys matter:

  • Enter switches the model and saves it as your default.
  • s switches for this session only and leaves your default alone.

Typing a name, such as /model opus, works like Enter. In the picker you can also use the left and right arrow keys to set the effort level for models that support it.

The shortcut Option+P on a Mac, or Alt+P on Windows and Linux, switches models without clearing your prompt.

A switch also reaches subagents that inherit the main model. If you move to Opus before Claude hands research or test runs to one of them, that work runs on Opus too. To keep a custom subagent on a smaller model, set model in its definition. Our Claude Code subagents tutorial shows how.

Claude Code model aliases

You can use an alias or a full model name. Aliases follow the newest recommended version, so you don't have to update them.

Alias What it uses
opus The latest Opus, for complex reasoning
sonnet The latest Sonnet, for daily coding
haiku The fast, low-cost Haiku model, for simple tasks
fable Fable 5.2, for the hardest and longest tasks
best The same model as opus
opusplan Opus in plan mode, then Sonnet to carry out the plan
default Clears your choice and goes back to your account's default

On the Anthropic API on November 22, 2026, opus means Opus 5.5, sonnet means Sonnet 5.5 and haiku means Haiku 5.5. On some other providers, such as Amazon Bedrock and Microsoft Foundry, the aliases point to older versions, so check the table in the docs if you're on one.

To pin an exact version instead of following the alias, use the full name:

Terminal
claude --model claude-opus-5-5

The docs also list minimum versions: Opus 5.5 needs Claude Code v2.1.280 or later, Sonnet 5.5 needs v2.1.284, Haiku 5.5 needs v2.1.293 and Fable 5.2 needs v2.1.321. If a model won't load, update Claude Code first.

What is the default model in Claude Code?

On Pro, Max, Ultra, Team, Enterprise and the Anthropic API, default is Opus 5.5. It's also Opus 5.5 on Amazon Bedrock and Google Cloud's Agent Platform, and Sonnet 4.5 on Microsoft Foundry. An admin can set an organization default that replaces these.

No Fable model is the default on any plan. You choose it with /model fable or claude --model fable. On some plans, Fable bills to usage credits instead of your included limits, and the picker shows "Requires usage credits" on its row when that's the case. Our Claude Fable vs Opus guide compares the two.

Every way to set the model, in priority order

Claude Code takes the first of these that applies:

  1. /model during a session. Switches straight away.
  2. claude --model <alias|name> at startup. Applies to that session only.
  3. The ANTHROPIC_MODEL environment variable. Applies to each session you launch with it.
  4. The model key in a settings file. Applies to every new session.
  5. ANTHROPIC_DEFAULT_MODEL. Used only when nothing above picks a model. Needs v2.1.236 or later.

A settings example:

JSON
{
  "model": "opus"
}

Put it in ~/.claude/settings.json for yourself, or .claude/settings.json to set a project's model for your whole team. Our settings.json guide explains which file wins. When a project or managed settings file sets the model, the startup header names the file.

To run two models side by side, open two terminals and launch each with its own --model flag, as the docs suggest, rather than switching with /model, which also saves a new default.

For the variables behind steps 3 and 5, and the ones that change what each alias points to, see our guide to Claude Code environment variables.

Use Opus to plan and Sonnet to build

/model opusplan

opusplan uses Opus while you're in plan mode and switches to Sonnet when Claude starts making changes. Our Claude Sonnet vs Opus guide covers when each one is worth it.

Change the effort level

Effort controls how much the model thinks on each step. Lower is faster and uses fewer tokens. Higher reasons more deeply.

/effort high

Run /effort alone for a slider, or /effort auto to clear your saved level for the current model. You can also launch with claude --effort high, or set CLAUDE_CODE_EFFORT_LEVEL, which overrides both.

The levels are low, medium, high, xhigh and max on Opus 5.5, Sonnet 5.5, Haiku 5.5 and the Fable models. Fable 5.2, Opus 5.5, Sonnet 5.5 and Haiku 5.5 all start at medium in Claude Code. The docs' guide to choosing:

Level Use it for
low Quick exchanges you review each time, like a rename or a first sketch
medium Day-to-day work with a clear scope, such as building a feature
high Bug fixes and work where edge cases are likely
xhigh Deeper reasoning at higher token spend
max Hard problems you want Claude to work through alone. Test it first, since it can overthink

Claude Code saves your level per model. max lasts for the current session only unless you set it through CLAUDE_CODE_EFFORT_LEVEL.

Claude Code fast mode

Fast mode runs the same model up to 2.5x faster at a higher price per token. Quality stays the same, because it's the same model with a different API configuration. Turn it on with:

/fast

Press Space to toggle and Enter to confirm. A ↯ icon appears next to the prompt while it's on. The shortcut is Option+O on a Mac or Alt+O on Windows and Linux.

On the Anthropic API, fast mode works on Fable 5.2, Opus 5.5, Opus 5 and Opus 4.8, not on Sonnet or Haiku. If you turn it on from an unsupported model, Claude Code switches you to Opus. Fast mode for Opus 4.8 was deprecated on October 30, 2026, and will be removed on November 30, 2026.

What fast mode costs

Model Standard (input/output per MTok) Fast mode (input/output per MTok)
Opus 5.5 $4 / $20 $8 / $40
Fable 5.2 $8 / $40 $16 / $80

So on these two models, fast mode costs twice the standard rate. Two things raise the bill further:

  • On a subscription, fast mode bills to usage credits only. It isn't part of your Pro, Max, Ultra, Team or Enterprise limits, and you need usage credits turned on before /fast works. It draws from credits even if you have plan usage left.
  • Turning it on mid-conversation is expensive. The first time you enable it, you pay the fast mode uncached input price for the whole conversation so far. Turn it on at the start of a session if you want it.

The docs suggest fast mode for live debugging and rapid iteration, and standard speed for long autonomous tasks, CI and cost-sensitive work. To use it in a script, pass --settings '{"fastMode": true}' with -p. For how credits work on each plan, see Claude credits.

Why a new session starts on the wrong model

The docs list the usual causes:

  • You picked it for one session. Pressing s, launching with --model or using /model in -p mode doesn't save a default.
  • Something higher in the order sets it. A project or managed settings file, ANTHROPIC_MODEL in your shell, or an organization default.
  • Claude Code couldn't save your choice. If ~/.claude/settings.json is read-only or generated by another tool, the change lasts one session. Run /status to see which model you're on, or add it to a custom status line.
  • You resumed a session. claude --resume and --continue usually keep the model the session was saved on. Pass --model to override.

Learn to build with Claude Code

The Stride AI Coding course teaches Claude Code and Codex for building client tools, written for non-programmers, with weekly live calls to review your builds. Many of the free guides cover Claude Code setups, and the Claude Code community is where members compare theirs.

FAQ

How do I change the model in Claude Code?

Type /model and pick from the list, or type /model sonnet or /model opus directly. That switches straight away and saves your choice as the default. Press s in the picker to switch for one session only.

What is the default model in Claude Code?

Opus 5.5 on Pro, Max, Ultra, Team, Enterprise and the Anthropic API, on November 22, 2026. Microsoft Foundry defaults to Sonnet 4.5. An admin can set a different organization default.

How do I use Opus in Claude Code?

Run /model opus, or launch with claude --model opus. To pin one version, use the full name, such as claude-opus-5-5. Opus 5.5 needs Claude Code v2.1.280 or later.

What is fast mode in Claude Code?

A faster setting for Opus 5.5, Fable 5.2 and some older Opus models, toggled with /fast. It's up to 2.5x faster at twice the standard per-token price on Opus 5.5 and Fable 5.2, and on subscription plans it bills to usage credits only.

How do I set a default model for Claude Code?

Pick one with /model and press Enter, which saves it to ~/.claude/settings.json. Or set the model key in that file yourself. A project's .claude/settings.json can set the model for everyone in that project.

What does opusplan do?

It's an alias that uses Opus while you're in plan mode and switches to Sonnet when Claude carries out the plan. Set it with /model opusplan.

Build it with us in Stride AI Academy

Four courses, weekly live calls and a community of people building and selling AI. Or start with 320+ free guides.

Keep reading

Free AI Coding guides