How to switch models in Claude Code
Use /model inside a session, claude --model at launch, or ANTHROPIC_MODEL in your environment. Here are the aliases, the default, and the cost of switching.
Inside a session, type /model to open the picker, or /model <alias or name> to switch straight away. To start a session on a particular model, launch with claude --model <alias or name>, or set the ANTHROPIC_MODEL environment variable. All of this comes from Anthropic's model configuration docs.
Five ways to set the model
The docs list these in priority order:
- During a session:
/model <alias|name>switches immediately. Run/modelwith no argument to open the picker. - At startup:
claude --model <alias|name>. - Environment variable:
ANTHROPIC_MODEL=<alias|name>. - Settings file: the
modelfield. This is what/modelwrites when it saves your choice. - Default for new sessions:
ANTHROPIC_DEFAULT_MODEL=<alias|name>, which needs Claude Code v2.1.236 or later.
The last one is the weakest. It only applies when nothing above it picks a model, including a choice you saved with /model, and Claude Code ignores it if you set it to default, opusplan or haiku.
claude --model sonnet
ANTHROPIC_MODEL=opus claude
--model and ANTHROPIC_MODEL apply only to the session you launch with them. If you export ANTHROPIC_MODEL in your shell profile, though, every launch from that shell picks it up and it outranks what you saved with /model.
Saved default or this session only
In the /model picker, Enter switches the model and saves it as your default. Pressing s switches the model for this session only and leaves your default unchanged. Typing /model <name> directly behaves like Enter.
So if you want a quick detour to a cheaper model without changing what the next session starts on, open the picker and press s. To check what you are on, open /model or /status, which lists the model alongside the version and account.
The aliases
| Alias | What the docs say it means |
|---|---|
default |
Clears any model override and returns to the runtime default for your account |
best |
The same model as opus |
fable |
The Fable model for your provider, for your hardest and longest-running tasks |
opus |
The latest Opus model |
sonnet |
The latest Sonnet model |
haiku |
The fast Haiku model for simple tasks |
sonnet[1m], opus[1m] |
Those models with a 1 million token context window |
opusplan |
Opus in plan mode, then Sonnet for execution |
As of November 2026, on the Anthropic API opus, sonnet and haiku resolve to Opus 5.5, Sonnet 5.5 and Haiku 5.5, and fable is Fable 5.2. Other providers can map them to older versions. Aliases update over time. To pin a version, use a full model name such as claude-opus-5-5.
The [1m] variants matter less than they used to: the docs say they have no effect when the alias already resolves to a model with a native 1 million token window, which is the case for Opus 5.5 and Sonnet 5.5.
What you start on by default
On Pro, Max, Ultra, Team and Enterprise, default is Opus 5.5 as of November 2026. Before Claude Code v2.1.280, Pro and Team Standard defaulted to Sonnet 5, so an older install may behave differently.
No Fable model is the default on any plan. You pick one explicitly with /model fable or claude --model fable. Fable needs a recent Claude Code version (Fable 5.2 needs 2.1.321 or later per the Help Center), and on some plans it bills to usage credits. When it would, the picker shows "Requires usage credits" on the Fable row and interactive sessions ask for your consent first. See the Fable weekly limit and Fable on the Pro plan.
Plan with one model, build with another
/model opusplan uses Opus while in plan mode and switches to Sonnet for execution. Anthropic's Help Center describes this as "plan with Opus, execute with Sonnet" and lists it among habits that stretch your usage. One cost to know: the prompt caching docs point out that each plan-mode toggle under opusplan is a model switch and starts a fresh cache, so toggle deliberately rather than constantly.
On the Anthropic API both phases already run with the 1 million token window, because the current Opus and Sonnet have it natively. The opusplan[1m] setting only matters where they do not, such as some other providers.
What switching costs you
Each model has its own prompt cache. Anthropic's error reference says that after switching models, "the next request re-reads the whole conversation with no cache hits". On a short conversation that is trivial. On a long one it is a large request. The prompt caching docs add that at the terminal, /model asks you to confirm a switch while the cache is still warm, and switches without asking once the cache has expired.
Two practical habits follow:
- Switch at a natural boundary, ideally at the start of a task right after
/clear. See /compact vs /clear. - Do not flip back and forth in one long conversation.
The /model switch also reaches subagents that inherit the main conversation's model, per the docs.
Will switching get you past a limit?
Not usually. Anthropic says the session and weekly limits "are shared across all models, so switching models doesn't restore access." The exception is a limit tied to one model. As of November 2026 the documented one is the Fable weekly limit on Max, Ultra and premium seats, and when it is reached you can switch to another Claude model to keep working within your plan's limits. The error reference also still lists "Opus limit" and "Sonnet limit" messages, and says switching to a model outside the family keeps you working. For picking the cheaper model on purpose, see which Claude model uses the least of your limit.
Effort is a separate dial
Model choice is not the only lever. /effort sets how hard the model works: low, medium, high, xhigh or max, with /effort auto clearing your saved level for the current model. claude --effort <level> does the same for one launch. Anthropic notes that higher effort uses more tokens. Per the model configuration docs, Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.2 start at medium, and max applies to the current session only. Thinking cannot be turned off on Opus 5.5, Sonnet 5.5, Haiku 5.5 or the Fable models, so lower the effort instead.
Check where you stand after switching
After a heavy stretch on a bigger model, /usage shows your plan bars. If you run several accounts, Headroom, a free independent menu bar app (not made or endorsed by Anthropic), shows the session and weekly percentages for each Claude Code account signed in on your Mac, plus a per-model weekly bar when an account has one. Get Headroom.