ANTHROPIC_MODEL vs ANTHROPIC_DEFAULT_OPUS_MODEL
People think ANTHROPIC_DEFAULT_OPUS_MODEL makes Claude Code run on Opus. It does not pick a model at all. It only says which full model the short name opus stands for. ANTHROPIC_MODEL is what picks the model a session starts on. So on a cloud you often set both. The pin says what opus means there, and the other says to use it.
ANTHROPIC_MODEL
It sets the model each new session starts on.
ANTHROPIC_MODEL sets the model Claude Code starts on, as an alias such as opus or a full model name. It ranks below the --model flag and above the model setting. Each new launch goes back to it, whatever you saved with /model. A typo is not caught at start, only on the first request.
ANTHROPIC_DEFAULT_OPUS_MODEL
It sets which full model the alias opus stands for.
ANTHROPIC_DEFAULT_OPUS_MODEL sets which full model the alias opus stands for. Its siblings do the same for sonnet, haiku and fable. In plan mode, opusplan uses the Opus pin. Out of it, it uses the Sonnet pin. The Haiku pin also runs jobs in the back. Each value must be a full model name, or the ID your provider uses.
In one line
- ANTHROPIC_MODEL
- It sets the model each new session starts on.
- ANTHROPIC_DEFAULT_OPUS_MODEL
- It sets which full model the alias opus stands for.