📋 Four-Provider Registry
Every model declared in ALL_MODEL_CONFIGS in configs.ts. Each entry is a ModelConfig record keyed by provider: firstParty, bedrock, vertex, foundry. @[MODEL LAUNCH] comment marks all seven files needing edits.
| Provider | Env Var | Model Format |
|---|---|---|
| firstParty | Default | claude-opus-4-6 |
| bedrock | CLAUDE_CODE_USE_BEDROCK=1 | us.anthropic.claude-opus-4-6-v1 |
| vertex | CLAUDE_CODE_USE_VERTEX=1 | claude-opus-4-6 |
| foundry | CLAUDE_CODE_USE_FOUNDRY=1 | User-defined deployment IDs |
🎯 Selection Priority Chain
1. /model command
Session override. Highest priority.
2. --model CLI flag
Sets override at startup.
3. ANTHROPIC_MODEL env var
Checked synchronously. Accepts aliases.
4. settings.json model field
Persisted across sessions.
5. Subscription default
Max/Team Premium → Opus 4.6. Others → Sonnet 4.6.
💡 Allowlist Gate
getUserSpecifiedModelSetting() checks model against settings.availableModels. If not on allowlist, silently ignored and default used.
🏷️ Aliases & [1m] Suffix
Aliases: sonnet, opus, haiku, best, opusplan, sonnet[1m], opus[1m]. The [1m] suffix signals 1M context window variant. Stripped at API boundary by normalizeModelStringForAPI().
💡 opusplan
Switches between Sonnet and Opus depending on permission mode. In plan mode, upgrades to Opus. haiku in plan mode silently upgrades to Sonnet.
🔋 1M Context & Effort Levels
Extended context is a runtime flag, not separate model. Access gated by subscription and extra-usage billing. Max/Team Premium get merged opus[1m] by default.
Effort: auto
Model default. No param sent.
Effort: low/medium/high
Thinking budget hints. Always persisted.
Effort: max
Opus 4.6 only. Session-scoped for non-ants.
🔄 Fast Mode & Allowlist
Fast mode: lower-latency execution for Opus 4.6 on first-party API only. Requires paid subscription + extra-usage billing. Statsig kill switch tengu_penguins_off.
💡 Allowlist Narrowing Rule
['opus', 'opus-4-5'] does NOT allow all Opus. Specific entry narrows the family wildcard to only opus-4-5.
⚡ Migrations & Subagent Inheritance
Migrations run on every startup, only touch userSettings (never project/policy). All idempotent. Subagents default to 'inherit' - parent's exact model string passed through including opusplan and Bedrock region prefix.
💡 Bedrock Region Prefix
Parent on eu.anthropic.claude-opus-4-6-v1? Subagent with alias 'sonnet' gets eu.anthropic.claude-sonnet-4-6 via applyParentRegionPrefix().