Switching models in Claude Code
Claude Code picks a model for you, but you don’t have to keep it. /model swaps
mid-session, and --model sets one for the whole run:
$ claude --model opus
> /model claude-opus-4-6[1m]
> /model sonnet
Short aliases always point at the newest model in that family, so they drift as new ones ship. Full names pin you to exactly one:
default whatever Claude Code recommends today
opus newest Opus claude-opus-5
sonnet newest Sonnet claude-sonnet-5
haiku newest Haiku claude-haiku-4-5
fable newest Fable claude-fable-5
opusplan Opus in plan mode, Sonnet everywhere else
The [1m] suffix is the part worth knowing. It selects the million-token
context variant of a model that has one, and it works on both aliases and full
names — opus[1m], sonnet[1m], claude-opus-5[1m], claude-opus-4-8[1m],
claude-sonnet-4-6[1m]. Without the suffix you get the standard window. If
you’re feeding it a large codebase and watching it compact away context you
still needed, that’s the flag you want.
opusplan is the one people miss: Opus does the thinking in plan mode, Sonnet
does the typing afterward. Cheaper than Opus throughout, smarter than Sonnet
throughout.
One catch. Prompt caches are scoped per model, so switching mid-session throws away the cache you’ve built and the next turn re-reads your whole context at full price. Swapping once at a natural boundary is fine. Bouncing back and forth every few turns quietly costs you.
To see what your build actually offers, run /model with no argument — the
picker lists what’s available to your account, which beats guessing at a name
and getting rejected.