Claude Code Default Model: How to Change and Set It
October 29, 2026

The Claude Code default model is Opus 5.5 on Pro, Max, Team, Enterprise, and the Anthropic API, according to Anthropic's model configuration docs as of October 2026 (Claude Code v2.1.280 or later). To change it, run /model, pick a model, and press Enter. That switches the current session and saves the choice as your default for new sessions.
That's the quick answer. There are five ways to set the model in total, and they override each other in a fixed order:
/modelin a session switches immediately.Entersaves it as your default;sswitches for this session only.claude --model <name>sets the model for one launch.ANTHROPIC_MODELsets it from your shell, and it beats your saved default."model"in settings.json sets it per user, per project, or by your organization.ANTHROPIC_DEFAULT_MODELsets a starting model only when nothing else picks one.
This guide covers each method, the aliases you can use, the precedence order, and why a new session sometimes starts on a model you didn't pick. If you're still deciding which model to run, read which Claude model is best for coding first. This post is about the switches, not the choice.
What is the default model in Claude Code?
The default setting isn't a model. The docs describe it as a special value that clears any model override and reverts to the runtime default for your account. What that resolves to depends on how you sign in:
| Account type | default resolves to |
|---|---|
| Pro, Max, Team, Enterprise | Opus 5.5 |
| Anthropic API (Console key) | Opus 5.5 |
| Claude Platform on AWS, Amazon Bedrock, Google Cloud's Agent Platform | Opus 5.5 |
| Microsoft Foundry | Sonnet 4.5 |
This changed recently. Before v2.1.280, the docs say default resolved to Sonnet 5 on Pro and Team Standard, and to Opus 5 on Max, Team Premium, Enterprise, and the API. If you're on an older Claude Code version, run claude update. Opus 5.5 needs v2.1.280 or later, and Sonnet 5.5 needs v2.1.284.
Three things can move the default for you:
- An organization default. Enterprise admins can set one from the claude.ai admin console, for the whole org or per custom role.
ANTHROPIC_DEFAULT_MODEL, under the conditions covered below.- A model recorded on your Enterprise account when you saved one with
/model.
Fable models are never the default on any plan. You select them yourself.
Claude Code model aliases
You don't need to type full model IDs. Claude Code accepts aliases that track the newest version for your provider:
| Alias | What it does |
|---|---|
default | Clears any override and uses your account's default |
best | Uses whatever fable resolves to where Fable is available to you, otherwise the same model as opus |
fable | Fable 5.1, for your hardest and longest-running tasks |
opus | The latest Opus, for complex reasoning |
sonnet | The latest Sonnet, for daily coding tasks |
haiku | The fast Haiku model, for simple tasks |
sonnet[1m], opus[1m] | The same family with a 1M-token context window |
opusplan | Opus in plan mode, then Sonnet for execution |
On the Anthropic API, opus, sonnet, and haiku currently resolve to Opus 5.5, Sonnet 5.5, and Haiku 5.5. On other providers they can resolve to older versions. Microsoft Foundry, for example, maps opus to Opus 4.6.
Aliases move when Anthropic ships a new model. To pin a version, use the full ID, such as claude-opus-5-5. The [1m] aliases have no effect when the model already runs a native 1M window, which the docs say is the case for the current Opus and Sonnet on the Anthropic API.
opusplan is worth a closer look. It pairs Opus for planning with Sonnet for implementation, switching automatically at the plan boundary. If you already use plan mode in Claude Code, it's the cheapest way to get Opus-level plans without running Opus for every edit.
One note on Fable: depending on your plan and seat tier, Fable usage can bill to usage credits instead of your plan's included limits. When it does, the /model picker labels the row "Requires usage credits", and interactive sessions ask for consent before the first such request.
How to change the model in Claude Code
Switch with /model
Run /model with no argument to open the picker, or /model sonnet to switch directly. The commands reference describes /model as switching the model and saving it as your default for new sessions.
In the picker:
Enterswitches the model and saves it as your default. Claude Code writes themodelfield to~/.claude/settings.json.sswitches for this session only and leaves your default alone.- Left and right arrows adjust the effort level, for models that support it.
Typing /model opus directly behaves like Enter, so it also saves. This is a recent behavior. The docs note that in v2.1.144 through v2.1.152, /model applied to the current session only and d saved a default. Older blog posts that say "/model is session-only" are describing that window.
Two side effects of switching mid-session:
- The cache resets. The prompt caching docs say each model has its own cache, so the first request after a switch re-reads the whole conversation with no cache hits. Claude Code asks you to confirm while the old cache is still warm.
- Subagents follow along. Subagents that inherit the main conversation's model pick up the switch. To keep a subagent on a smaller model, set
modelin its definition.
Launch with --model
claude --model sonnet
The flag applies only to the session you launch with it. It's the right tool for running different models in different terminals at once, which /model can't do cleanly because it rewrites your saved default. Anthropic's Help Center article on Claude Code model configuration uses the same flag for one-off sessions.
Set ANTHROPIC_MODEL
export ANTHROPIC_MODEL=opus
Put it in ~/.zshrc or ~/.bashrc to make it stick across terminals. Two things to know. First, it outranks the model key in every settings file, so it also beats whatever you saved with /model: you'll return to the variable's model at every launch. Second, Claude Code reads environment variables at startup, so restart the session after you change it.
Set model in settings.json
The model key works in any settings file:
{
"model": "sonnet"
}
Where you put it decides who it affects. Anthropic's settings docs list these levels, highest precedence first:
| Settings file | Who it affects |
|---|---|
| Managed settings (from your organization) | Everyone the org deploys it to |
--settings on the command line | That one session |
.claude/settings.local.json | You, in this project |
.claude/settings.json | Everyone on the project, via git |
~/.claude/settings.json | You, in every project |
A higher level wins for the same key. So a teammate who commits "model": "opus" to .claude/settings.json overrides your personal default in that repo. When that happens, the startup header names the settings file that set the model.
You can also set it from inside a session with /config model=sonnet.
Set a starting default with ANTHROPIC_DEFAULT_MODEL
ANTHROPIC_DEFAULT_MODEL (v2.1.236 or later) is the gentle option. It picks the starting model only when no --model flag, no ANTHROPIC_MODEL, no model in any settings file, and no organization default selects one. A choice you save with /model beats it.
Claude Code ignores it if you set it to default, inherit, opusplan, or haiku, or if your organization's model restrictions exclude the model.
Claude Code model precedence, in one list
When several of these are set, the docs give this priority order:
/modelduring a session--modelat startupANTHROPIC_MODELmodelin settings, resolved by the file levels aboveANTHROPIC_DEFAULT_MODEL
Under all of that sits the account default. One exception sits outside the list: managed settings. A managed model is a starting default, not a lock, but your organization can lock the menu itself, as covered next.
Remap the aliases with ANTHROPIC_DEFAULT_*_MODEL
These variables don't pick your session's model. They change what each alias points to:
| Variable | Changes |
|---|---|
ANTHROPIC_DEFAULT_OPUS_MODEL | opus, and opusplan in plan mode |
ANTHROPIC_DEFAULT_SONNET_MODEL | sonnet, and opusplan outside plan mode |
ANTHROPIC_DEFAULT_HAIKU_MODEL | haiku, and background functionality |
ANTHROPIC_DEFAULT_FABLE_MODEL | fable |
CLAUDE_CODE_SUBAGENT_MODEL | The default model for subagents not assigned one another way |
Each value must be a full model name or your provider's equivalent identifier. The older ANTHROPIC_SMALL_FAST_MODEL is deprecated in favor of ANTHROPIC_DEFAULT_HAIKU_MODEL.
These matter most on third-party providers. Anthropic recommends that Bedrock, Google Cloud, and Foundry deployments pin version-specific IDs during setup, because the built-in aliases can lag the newest release. The same variables are how you point Claude Code at other models through a gateway. Our Claude Code with OpenRouter guide walks through that setup.
To add one extra entry to the picker without replacing the built-ins, set ANTHROPIC_CUSTOM_MODEL_OPTION to the model ID.
When your organization controls the model
On a managed setup, three levers can override your choice:
Restricted model list. Admins can set availableModels in managed settings to limit which models users can select. Entries can be a family like sonnet, a version prefix, or a full ID. A --model flag picks only from the models your organization allows.
Organization default model. On Enterprise, admins can set a default for the org or per custom role (v2.1.196 or later). It shows in the picker with the label Org default. By default it's a starting point you can override. If the admin turns on override, a model you save with /model lasts for that session, and /model shows Your organization's default (<model>) applies on restart.
A managed model key. This works on any provider, including LLM gateways where the org default doesn't reach.
Why a new session starts on a different model
This is the most common complaint, and the docs list the usual causes:
- You chose for one session.
sin the picker,--model, and/modelin-pmode don't save a default. - Something higher sets the model. Project or managed settings,
ANTHROPIC_MODELin your shell, or an overriding org default reapply at every launch. - Claude Code couldn't write your settings file. If another tool generates
~/.claude/settings.jsonor links it read-only, your/modelchoice lasts only for that session. - You resumed a session.
--resumeand--continueusually keep the model that session was using.
To see what you're actually running, open /status, which shows your model alongside account information, or add the model to your status line.
If you're switching because you keep running into limits, note that /model only helps with the Opus- or Sonnet-specific limits. Our Claude Code usage limits guide explains which limits are shared across every model.
Where Taku fits
Model flags, settings files, and env vars are the kind of setup that's easy to get wrong once and hard to notice. If configuration is where you keep stalling, Taku mirrors a working AI setup into a desktop workspace and runs it, so you can use a power user's configuration without rebuilding their environment first. Taku is in Beta, and the Mac app is available now.
FAQ
What is the Claude Code default model?
Opus 5.5 on Pro, Max, Team, Enterprise, and the Anthropic API, as of Claude Code v2.1.280. Microsoft Foundry defaults to Sonnet 4.5. An Enterprise admin can set a different organization default.
How do I change the model in Claude Code?
Run /model and choose from the picker, or type /model sonnet. You can also launch with claude --model opus, set ANTHROPIC_MODEL, or add "model" to a settings.json file.
Does /model change the default permanently?
Yes. Enter in the picker, or /model <name>, saves the choice to ~/.claude/settings.json for new sessions. Press s in the picker to switch for the current session only.
How do I switch models in Claude Code mid-session?
Run /model and pick another model. The switch applies immediately. Expect the next request to be slower, because each model has its own prompt cache.
Why does Claude Code keep reverting to another model?
Usually something with higher priority sets it at launch: ANTHROPIC_MODEL in your shell, a model key in project or managed settings, or an org default set to override. The startup header names the settings file when one sets the model.
What does opusplan do in Claude Code model selection?
It uses Opus while you're in plan mode and switches to Sonnet to execute the plan. Change which models those are with ANTHROPIC_DEFAULT_OPUS_MODEL and ANTHROPIC_DEFAULT_SONNET_MODEL.
How do I check which model Claude Code is using?
Run /status. It shows the current model with your account information.
Key points
- The
defaultmodel is Opus 5.5 on Pro, Max, Team, Enterprise, and the API as of v2.1.280. /modelplusEntersaves a default;sis session-only;--modelis per launch.- Priority runs
/model, then--model, thenANTHROPIC_MODEL, then settings, thenANTHROPIC_DEFAULT_MODEL. ANTHROPIC_DEFAULT_*_MODELremaps aliases; it doesn't choose your session's model.- Organizations can restrict models with
availableModelsand set an org default. - Pin full IDs like
claude-opus-5-5when you need a model that won't move under you.