Skip to content
BENIBIX Learn

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.

AI⌨️ Claude Code

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.

Example
Jack's CI image sets this to haiku. So each job runs on the cheap model, whatever anyone saved on a laptop.
Why it matters
A script or a machine can set its model in one place. No flag is needed on each command.
Full entry
AI⌨️ Claude Code

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.

Example
Emma's team uses Claude on Bedrock, where model names look different. She pins each alias once. Then opus and sonnet work as usual for all of them.
Why it matters
On a cloud or a gateway, it keeps the short names tied to the IDs your account has.
Full entry

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.