Cross-Runtime Model Mapping
The same tier flag selects each runtime’s equivalent model:| Tier | Flag | Claude Code | Codex CLI |
|---|---|---|---|
| Fable | --fable / --best | claude-fable-5 | gpt-5.4 (fallback — no Fable) |
| High | --opus / --high | claude-opus-4-8 | gpt-5.4 |
| Mid | --sonnet / --mid | claude-sonnet-4-6 | gpt-5.3-codex |
| Low | --haiku / --low | claude-haiku-4-5 | gpt-5.4-mini |
Tier Flags
Fable Tier (Fable 5)
Most capable model - Claude Fable 5, Anthropic’s most powerful model (a tier above Opus). Anthropic providers only; not the default.Equivalent: Use for:
--bestDefault model: claude-fable-5 (50 per MTok, 1M context)Availability: Anthropic API, AWS Bedrock, Vertex AI, Azure, Vercel, and Claude Pro (subject to your subscription). On Ollama, LM Studio, and Codex it falls back to that runtime’s highest tier and prints a notice.Data retention: Fable 5 is a Mythos-class Covered Model. Anthropic retains inputs/outputs for 30 days with human review on every platform that offers it — direct API, Pro, Bedrock, Vertex, and Azure alike. This is a property of the model, so switching providers doesn’t avoid it; the only way to avoid it is to not use Fable (use --opus).Cloud enablement: Because of that retention, Bedrock (--aws) and Vertex (--vertex) need a one-time, account/project-level data-sharing enablement before they’ll serve Fable, or requests fail (400/403). --apikey and --azure need no step — their standard config already shares with Anthropic (same retention, just no manual enablement). See the AWS Bedrock and Vertex AI provider docs for exact steps.Exception: zero-data-retention (ZDR) organizations must explicitly turn retention on for Fable on every platform — including the direct API (Console → Workspace → Privacy Controls) and Azure — since ZDR and Covered Models are mutually exclusive.
- The most demanding reasoning and long-horizon agentic work
- Tasks where Opus isn’t quite enough
Alias for
--fableHigh Tier (Opus)
Highest-tier model - Most capable, best for complex reasoningEquivalent:
--highDefault model: claude-opus-4-8Use for:- Complex architectural decisions
- Difficult refactoring
- Security analysis
- High-stakes code generation
Alias for
--opusMid Tier (Sonnet)
Mid-tier model - Balanced capability and speedEquivalent:
--midDefault model: claude-sonnet-4-6Use for:- Most coding tasks
- General development
- Documentation
- Code review
Alias for
--sonnetLow Tier (Haiku)
Lowest-tier model - Fastest and most cost-effectiveEquivalent:
--lowDefault model: claude-haiku-4-5Use for:- Quick tests
- Simple tasks
- Cost-sensitive workloads
- High-volume automation
Alias for
--haikuCustom Model Selection
Specify exact model ID - Use any model supported by your providerFormat depends on provider:
- AWS Bedrock:
global.anthropic.claude-opus-4-8 - Vertex AI:
claude-opus-4-8 - Anthropic API:
claude-opus-4-8 - Ollama: Model name from
ollama list - Vercel:
provider/model-name(e.g.,openai/gpt-4)
--model overrides tier flags (--opus, --sonnet, --haiku)Model Defaults Per Provider
Claude Subscription (Pro/Max)
API Providers (AWS, Vertex, Anthropic, Azure)
| Tier | Default Model |
|---|---|
Fable (--fable, --best) | claude-fable-5 |
Opus (--opus, --high) | claude-opus-4-8 |
Sonnet (--sonnet, --mid) | claude-sonnet-4-6 |
Haiku (--haiku, --low) | claude-haiku-4-5 |
--fable/--best.
Local Providers (Ollama, LM Studio)
--model or configure a default in ~/.ai-runner/secrets.sh.
Codex CLI
| Tier | Default Model |
|---|---|
High (--opus, --high) | gpt-5.4 |
Mid (--sonnet, --mid) | gpt-5.3-codex |
Low (--haiku, --low) | gpt-5.4-mini |
--mid selects gpt-5.3-codex. --fable/--best has no Codex equivalent, so it falls back to the High tier (gpt-5.4) with a notice.
~/.ai-runner/secrets.sh:
Vercel AI Gateway
provider/model-name format. See Vercel AI Gateway docs for available models.
Configuration
View Default Models
Override Model Defaults
Edit~/.ai-runner/secrets.sh:
~/.ai-runner/models.sh for all available override variables.
Dual Model Configuration
Claude Code uses two models:- Primary model (
ANTHROPIC_MODEL) - Interactive work, selected by tier flags - Small/fast model (
ANTHROPIC_SMALL_FAST_MODEL) - Background operations (defaults to Haiku)
- Primary: Opus (
claude-opus-4-8) - Background: Haiku (
claude-haiku-4-5)
ai-status output.
Examples
Tier Selection
Custom Models
Shebang Scripts
Resume with Different Model
Cost Optimization
Model Recommendations
| Task Type | Recommended Tier | Reason |
|---|---|---|
| Complex refactoring | Opus | Needs deep understanding |
| Architectural design | Opus | High-stakes decisions |
| Security analysis | Opus | Accuracy critical |
| General coding | Sonnet | Balanced performance |
| Documentation | Sonnet | Good quality/speed ratio |
| Code review | Sonnet | Sufficient capability |
| Quick tests | Haiku | Speed matters |
| Bulk automation | Haiku | Cost-effective |
| Simple tasks | Haiku | Overhead not needed |
Troubleshooting
Model not found error
Model not found error
Model IDs are provider-specific. Check your provider’s available models:See provider documentation for correct model ID format.
Wrong model being used
Wrong model being used
Check for overrides in Verify active model in session:
~/.ai-runner/secrets.sh:Tier flags don't work with Ollama
Tier flags don't work with Ollama
Tier flags work differently with local and Codex providers. For Ollama/LM Studio, you may need
--model to specify a local model name. For Codex, tiers map to GPT models automatically.Related Pages
Provider Flags
Switch between cloud providers
Provider Model Lists
Available models per provider