Omniscio

OmniscioGuidesChange the model

How to change the model in Claude Code

Claude Code lets you choose the model in five places, and they do not all behave the same way. One writes your default, one applies to a single launch, and one is set before Claude Code starts.

Type /model sonnet to switch now, or /model alone to pick from a list. The choice is saved as your default unless you press s for this session only.

Last checked against Anthropic's Claude Code documentation on November 18, 2026. By the Omniscio team. Updated .

The /model command

Run /model with an alias or a full model name to switch immediately. Run it with no argument to open a picker. For models that support it, the arrow keys adjust the effort level from the same command, which is how much the model thinks before it answers.

What surprises people is that the switch is permanent unless you say otherwise. /model saves your choice as the default for new sessions by writing the model field in your user settings.

The picker splits the two behaviours. Press Enter to switch and save as your default, or press s to switch for this session only and leave the default alone. Typing /model <name> directly behaves like Enter.

In a non-interactive run, the choice applies to that run only and is not saved. To check what you are on now, look at the status line or run /status, which also shows your account information.

Sources: the /model entry in Commands and "Setting your model" in Model configuration, read November 18, 2026.

What the aliases mean

An alias is a nickname for whatever version your provider recommends right now. That is the point of them: you write sonnet, and Claude Code picks the current Sonnet without you tracking version numbers.

AliasWhat it does
sonnetThe latest Sonnet model, for daily coding tasks
opusThe latest Opus model, for complex reasoning tasks
haikuThe fast Haiku model, for simple tasks
opusplanOpus while plan mode is active, then Sonnet for execution
bestThe same model as opus
defaultClears any override and reverts to the runtime default for your account
opus[1m], sonnet[1m]The same alias with the 1 million token context window

default is not an alias in the same sense; it is a value that removes a choice rather than making one. And opusplan is a mode more than a model, because it changes as you move between planning and editing.

To pin a version, use the full model name, such as claude-opus-5-5, instead of an alias. Anthropic notes that aliases follow the recommended version for your provider and change over time.

Source: "Model aliases" and "The `opusplan` model setting" in Model configuration, read November 18, 2026.

Every other way to set a model

Anthropic lists the routes in priority order. First, /model during a session. Second, claude --model <alias|name> at startup. Third, the ANTHROPIC_MODEL environment variable. Fourth, the model field in a settings file. Fifth, ANTHROPIC_DEFAULT_MODEL for new sessions.

claude --model opus

{
  "model": "opus"
}

The flag and the environment variable apply only to the session you launch with them, which is how you run two terminals on two different models at once. The model setting is the permanent one, and it is the field /model writes.

ANTHROPIC_DEFAULT_MODEL is weaker than it sounds. It only decides the starting model when no flag, variable or settings file names one, and a choice you saved with /model beats it on later launches.

One trap sits in all of them. A mistyped model name is not rejected up front. The session starts, and the first request fails with There's an issue with the selected model. The settings guide covers which file a model value should live in.

Sources: "Setting your model" and "Set a default model for new sessions" in Model configuration, read November 18, 2026.

Subagents and teammates

Switch with /model and the change reaches subagents that inherit the main conversation's model, because Claude Code resolves their model when it starts them. Switch to Opus before delegating research and that work runs on Opus too.

To keep a custom subagent on a smaller model, set model in its own definition. That is the per-agent choice, and it survives a change to the main conversation's model.

For subagents, teammates and workflow agents that were not assigned a model another way, CLAUDE_CODE_SUBAGENT_MODEL sets the default. A per-invocation model or a definition's model field takes precedence over it. The subagents guide covers writing the definition.

Source: "Subagent and per-agent models" and the environment-variable table in Model configuration, read November 18, 2026.

Why an alias is not the same model everywhere

This is the part that confuses people most. The opus, sonnet and haiku aliases resolve to the newest version on the Anthropic API and to an earlier version on some other providers.

As documented on November 18, 2026, the aliases resolve to Sonnet 5.5 and Haiku 5.5 on the Anthropic API. On Amazon Bedrock and Google Cloud's Agent Platform they resolve to Sonnet 4.5 and Haiku 4.5. On Microsoft Foundry they also resolve to Sonnet 4.5 and Haiku 4.5, and Opus resolves to Opus 4.6 there.

Where an alias lands on an older model, you can still reach a newer one by naming the full model or by pinning the alias with ANTHROPIC_DEFAULT_OPUS_MODEL or ANTHROPIC_DEFAULT_SONNET_MODEL. Anthropic recommends pinning before a team rollout.

The model value itself is provider-shaped. On the Anthropic API it is a model name, on Bedrock an inference profile ARN, on Foundry a deployment name and on Google Cloud's Agent Platform a version name. The Bedrock and Vertex setup guide covers the credentials side.

Sources: "Available models", the provider resolution table and "Pin models for third-party deployments" in Model configuration, read November 18, 2026.

Common mistakes

  • Assuming /model is temporary. It saves the choice as your default unless you press s in the picker.
  • Expecting a typo to be caught. The session starts on a mistyped name and fails at the first request instead.
  • Treating opusplan as a synonym for opus. It switches to Sonnet once plan mode ends.
  • Forgetting that a resumed session keeps its saved model. Pass --model to resume on a different one.
  • Assuming an alias means one version for every provider. It does not, which is why Anthropic recommends pinning.

Where these answers come from

  • The aliases, the priority order, the subagent rules and the provider table: Model configuration, read November 18, 2026.
  • The /model entry and its session-only behaviour: Commands, read the same day.
  • The --model, --resume and --fallback-model flags: the CLI reference, read the same day.

Common questions

Does /model change the model for good or just this session?

By default it saves your choice as the default for new sessions by writing the model field in your user settings. To switch for the current session only, open the picker and press s on the model's row.

What model aliases can I type?

sonnet, opus, haiku and opusplan are the everyday ones. There is also best, the default value that clears an override, and the [1m] variants such as opus[1m] for the extended context window.

Can a subagent use a different model?

Yes. Set model in the subagent's own definition to keep it on a smaller model, or set CLAUDE_CODE_SUBAGENT_MODEL for subagents and teammates that were not assigned a model another way.

Why is my model older on Bedrock than on the Anthropic API?

Because opus, sonnet and haiku resolve to the newest version on the Anthropic API and to an earlier version on some other providers. Select the full model name, or pin the alias with an environment variable, to get a specific version.