Model Configuration & Environment Variables
Model Aliases
Section titled “Model Aliases”| Alias | Behavior |
|---|---|
default | Clears overrides; recommended model for your account |
best | Fable 5 if your org has access, else latest Opus |
fable | Claude Fable 5 — hardest, longest-running tasks |
opus | Latest Opus (Opus 4.8 on Anthropic API) — complex reasoning |
sonnet | Latest Sonnet (Sonnet 5) — daily coding default |
haiku | Fast/cheap — simple tasks |
sonnet[1m] / opus[1m] | 1M-token context window variants |
opusplan | Opus during plan mode, Sonnet for execution |
Aliases track the newest version. Pin exact versions with full names (claude-opus-4-8) or ANTHROPIC_DEFAULT_OPUS_MODEL etc.
Fable 5 notes
Section titled “Fable 5 notes”- Most capable model; excels at long autonomous sessions, root-cause investigation, verification
- Not the default — select with
/model fable - Give it outcomes, not steps; hand it ambiguous problems; skip “remember to test” reminders
Setting the Model (priority order)
Section titled “Setting the Model (priority order)”/model <alias|name>during session — saves as default for new sessions (sin the picker = this session only). Switching mid-session invalidates the prompt cache; the picker warns.claude --model <alias|name>at startup (session-only)ANTHROPIC_MODEL=<alias|name>env var (session-only)"model": "opus"in settings.json (permanent)
Resumed sessions keep the model they were saved with.
Effort & Fast Mode
Section titled “Effort & Fast Mode”/effort low|medium|high— reasoning depth vs speed/cost; inherited by subagents/fast— fast mode (Opus with faster output; billed at a premium). Great for iteration loops, wrong for hard design work
Key Environment Variables
Section titled “Key Environment Variables”| Variable | Purpose |
|---|---|
ANTHROPIC_MODEL | Model for this session |
ANTHROPIC_DEFAULT_OPUS_MODEL / ..._SONNET_MODEL / ..._HAIKU_MODEL / ..._FABLE_MODEL | Pin what each alias resolves to |
CLAUDE_CODE_SUBAGENT_MODEL | Default model for subagents |
ANTHROPIC_API_KEY | API-key auth |
ANTHROPIC_BASE_URL | Route via LLM gateway (changes where, not which model) |
CLAUDE_CONFIG_DIR | Move ~/.claude storage elsewhere |
CLAUDE_CODE_SKIP_PROMPT_HISTORY | Don’t write transcripts |
ENABLE_TOOL_SEARCH | auto/false — deferred vs upfront MCP tool schemas |
CLAUDE_CODE_SUBPROCESS_ENV_SCRUB | Strip credentials from subprocesses |
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS | Enable agent teams (see 32-agent-teams.md) |
Set env vars persistently via settings.json:
{ "model": "sonnet", "env": { "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5", "ENABLE_TOOL_SEARCH": "auto" }}Enterprise Controls (awareness level)
Section titled “Enterprise Controls (awareness level)”availableModels— allowlist of selectable models (managed settings)enforceAvailableModels— make the “Default” picker row obey the allowlist- Org admins (Enterprise) can also disable models / set org default from the admin console
Real Case: Model Strategy for a Team
Section titled “Real Case: Model Strategy for a Team”// .claude/settings.json (project, committed){ "model": "sonnet"}- Daily work: Sonnet (fast, cheap, excellent at coding)
- Design sessions:
/model opusplan— Opus plans, Sonnet executes - Nightly deep bug hunt (routine):
fable - CI helpers / commit-message generation:
haikuviaclaude -p --model haiku
🧠 Quick Recall
Section titled “🧠 Quick Recall”- Trick: “fable hardest, opus reasons, sonnet ships, haiku sprints.”
- opusplan = brains plan, hands type.
👨🏫 Teach It
Section titled “👨🏫 Teach It”- Show:
/modelpicker — Enter saves default,s= this session only. - They’ll trip on: switching models mid-task — it wipes the prompt cache (slow + expensive turn).
Learning path: ⬅ 12-settings-system.md · Index · ➡ 14-permissions.md
Written by Fenil Patel