Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.airun.me/llms.txt

Use this file to discover all available pages before exploring further.

Model flags let you choose which AI model to use. You can select by tier (Opus, Sonnet, Haiku) or specify an exact model ID.

Cross-Runtime Model Mapping

The same tier flag selects each runtime’s equivalent model:
TierFlagClaude CodeCodex CLI
High--opus / --highclaude-opus-4-7gpt-5.4
Mid--sonnet / --midclaude-sonnet-4-6gpt-5.3-codex
Low--haiku / --lowclaude-haiku-4-5gpt-5.4-mini
Tier flags work the same way regardless of runtime. --opus always gives you the highest-tier model for whichever runtime is active.

Tier Flags

High Tier (Opus)

--opus
flag
Highest-tier model - Most capable, best for complex reasoning
ai --opus task.md
ai --aws --opus
ai --ollama --opus      # Not applicable to Ollama
Equivalent: --highDefault model: claude-opus-4-7Use for:
  • Complex architectural decisions
  • Difficult refactoring
  • Security analysis
  • High-stakes code generation
--high
flag
Alias for --opus
ai --high task.md

Mid Tier (Sonnet)

--sonnet
flag
Mid-tier model - Balanced capability and speed
ai --sonnet task.md
ai --aws --sonnet
Equivalent: --midDefault model: claude-sonnet-4-6Use for:
  • Most coding tasks
  • General development
  • Documentation
  • Code review
--mid
flag
Alias for --sonnet
ai --mid task.md

Low Tier (Haiku)

--haiku
flag
Lowest-tier model - Fastest and most cost-effective
ai --haiku task.md
ai --aws --haiku
ai --ollama --haiku     # Not applicable to Ollama
Equivalent: --lowDefault model: claude-haiku-4-5Use for:
  • Quick tests
  • Simple tasks
  • Cost-sensitive workloads
  • High-volume automation
--low
flag
Alias for --haiku
ai --low task.md

Custom Model Selection

--model
flag
Specify exact model ID - Use any model supported by your provider
ai --model claude-opus-4-7
ai --aws --model global.anthropic.claude-opus-4-7
ai --ollama --model qwen3-coder
ai --vercel --model openai/gpt-5.2-codex
ai --codex --model gpt-5.4
Format depends on provider:
  • AWS Bedrock: global.anthropic.claude-opus-4-7
  • Vertex AI: claude-opus-4-7
  • Anthropic API: claude-opus-4-7
  • Ollama: Model name from ollama list
  • Vercel: provider/model-name (e.g., openai/gpt-4)
Precedence: --model overrides tier flags (--opus, --sonnet, --haiku)

Model Defaults Per Provider

Claude Subscription (Pro/Max)

ai --pro                 # Uses your subscription's latest model
Claude Pro/Max doesn’t support tier selection - it always uses the latest available model from your subscription.

API Providers (AWS, Vertex, Anthropic, Azure)

TierDefault Model
Opus (--opus, --high)claude-opus-4-7
Sonnet (--sonnet, --mid)claude-sonnet-4-6
Haiku (--haiku, --low)claude-haiku-4-5
Default tier: High (Opus)
ai --aws                 # Uses Opus
ai --aws --sonnet        # Uses Sonnet
ai --aws --haiku         # Uses Haiku

Local Providers (Ollama, LM Studio)

ai --ollama --model qwen3-coder          # Specify model name
ai --lmstudio --model mlx-qwen-32b       # Specify model name
Local providers don’t have default models - you must specify with --model or configure a default in ~/.ai-runner/secrets.sh.

Codex CLI

TierDefault Model
High (--opus, --high)gpt-5.4
Mid (--sonnet, --mid)gpt-5.3-codex
Low (--haiku, --low)gpt-5.4-mini
Default: gpt-5.4 (Codex native default). Tier flags override: --mid selects gpt-5.3-codex.
ai --codex                   # Uses gpt-5.4 (native default)
ai --codex --mid             # Uses gpt-5.3-codex
ai --codex --haiku           # Uses gpt-5.4-mini
Override in ~/.ai-runner/secrets.sh:
export CODEX_MODEL_HIGH="gpt-5.4"
export CODEX_MODEL_MID="gpt-5.3-codex"
export CODEX_MODEL_LOW="gpt-5.4-mini"

Vercel AI Gateway

ai --vercel --model openai/gpt-5.2-codex        # OpenAI
ai --vercel --model anthropic/claude-opus-4.7   # Anthropic
ai --vercel --model google/gemini-exp-2506      # Google
Vercel supports 100+ models. Use provider/model-name format. See Vercel AI Gateway docs for available models.

Configuration

View Default Models

ai-status    # Shows default model IDs for each tier

Override Model Defaults

Edit ~/.ai-runner/secrets.sh:
# Override AWS Sonnet model
export CLAUDE_MODEL_SONNET_AWS="global.anthropic.claude-sonnet-4-6"

# Override small/fast model (for background operations)
export CLAUDE_SMALL_FAST_MODEL_AWS="us.anthropic.claude-haiku-4-5-20251001-v1:0"

# Override Vertex Opus model
export CLAUDE_MODEL_OPUS_VERTEX="claude-opus-4-7"
See ~/.ai-runner/models.sh for all available override variables.

Dual Model Configuration

Claude Code uses two models:
  1. Primary model (ANTHROPIC_MODEL) - Interactive work, selected by tier flags
  2. Small/fast model (ANTHROPIC_SMALL_FAST_MODEL) - Background operations (defaults to Haiku)
When you run:
ai --aws --opus
  • Primary: Opus (claude-opus-4-7)
  • Background: Haiku (claude-haiku-4-5)
Both models show in ai-status output.

Examples

Tier Selection

# Most capable (Opus)
ai --aws --opus complex-refactor.md

# Balanced (Sonnet, default)
ai --aws task.md
ai --aws --sonnet task.md     # Explicit

# Fastest/cheapest (Haiku)
ai --aws --haiku quick-test.md

Custom Models

# Specific AWS Bedrock model
ai --aws --model us.anthropic.claude-opus-4-7

# Ollama local model
ai --ollama --model qwen3-coder

# Ollama cloud model (no GPU needed)
ai --ollama --model minimax-m2.5:cloud

# Vercel with OpenAI
ai --vercel --model openai/gpt-5.2-codex

# Vercel with xAI Grok
ai --vercel --model xai/grok-2

Shebang Scripts

#!/usr/bin/env -S ai --aws --opus
Complex task requiring the most capable model.
#!/usr/bin/env -S ai --ollama --model qwen3-coder
Local execution with specific model.

Resume with Different Model

# Start with Sonnet
ai --aws --sonnet

# Resume with Opus for complex reasoning
ai --aws --opus --resume

# Resume with Haiku for speed
ai --aws --haiku --resume

Cost Optimization

# Use Haiku for bulk operations
for file in *.md; do
  ai --aws --haiku --skip "$file" >> results.txt
done

# Use Opus only for critical review
ai --aws --opus --skip final-review.md

Model Recommendations

Task TypeRecommended TierReason
Complex refactoringOpusNeeds deep understanding
Architectural designOpusHigh-stakes decisions
Security analysisOpusAccuracy critical
General codingSonnetBalanced performance
DocumentationSonnetGood quality/speed ratio
Code reviewSonnetSufficient capability
Quick testsHaikuSpeed matters
Bulk automationHaikuCost-effective
Simple tasksHaikuOverhead not needed

Troubleshooting

Model IDs are provider-specific. Check your provider’s available models:
# AWS Bedrock
aws bedrock list-foundation-models --region us-west-2

# Ollama
ollama list

# Vertex AI
gcloud ai models list --region=us-central1
See provider documentation for correct model ID format.
Check for overrides in ~/.ai-runner/secrets.sh:
grep CLAUDE_MODEL ~/.ai-runner/secrets.sh
Verify active model in session:
ai-status
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.
ai --ollama --model qwen3-coder

Provider Flags

Switch between cloud providers

Provider Model Lists

Available models per provider