Set ANTHROPIC_DEFAULT_MODEL and it becomes your model whenever no flag or ANTHROPIC_MODEL applies.
What's wrong with this entry?
The model for a session now resolves from the --model flag, then the ANTHROPIC_MODEL environment variable, then ANTHROPIC_DEFAULT_MODEL, and only then the model Claude Code ships with. An organisation or a shell profile that exports the variable will see it take effect in sessions that previously fell through to the built-in default, and the model list marks the choice so you can tell where it came from.
- The model list shows the footnote "Set by ANTHROPIC_DEFAULT_MODEL" against the model the variable selected.
- The literal values
defaultandinheritare treated as unset, so resolution continues past them to the shipped default. - Startup telemetry records
ANTHROPIC_DEFAULT_MODELin its own field, separate from the existingANTHROPIC_MODELfield. - On Amazon Bedrock and Google Vertex, the check for whether Opus is available to the account is skipped whenever the variable is set.
- Sandboxed child processes spawned for bring-your-own-cloud setups have
ANTHROPIC_DEFAULT_MODELstripped from their environment, matching the existing handling ofANTHROPIC_MODEL. - Invoke it inline for a single session, for example
ANTHROPIC_DEFAULT_MODEL=claude-sonnet-4-5 claude.
Set by ANTHROPIC_DEFAULT_MODEL, t.model || process.env.ANTHROPIC_MODEL || V.ANTHROPIC_DEFAULT_MODEL
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.234
Search field in the model picker
Both mention model
-
v2.1.238
Model and effort switch warning now checks whether the cache is actually warm
Both mention model
-
v2.1.238
Model picker names both models when a session override is in place
Both mention model