Skip to content
BENIBIX Learn

ANTHROPIC_MODEL

AI⌨️ Claude CodeConfiguration

Also known as ANTHROPIC_MODEL environment variable

It sets the model each new session starts on.

Think of it like

It is like you tell the driver which bus to take. You say it each time you leave.

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.

Definition

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 code

bash
export ANTHROPIC_MODEL=sonnet
claude
Start every session on Sonnet.
ANTHROPIC_MODEL is third, after /model and --model.

Common mistake

Saving a new model with /model and expecting it next time. With this set, the next launch goes back to it.

Key takeaways

  1. 1
    Alias or full name. opus or an ID.
  2. 2
    Below --model. Above settings.
  3. 3
    Wins each launch. Over /model saves.

Compare