OpenClaw Model Routing
Not every message needs the most expensive model. Learn when to use Haiku, Sonnet, and Opus - and how to route tasks to the right model automatically.
The Problem: One Model Does Not Fit All
Most people pick one AI model and use it for everything. That is like driving a truck to get groceries. It works, but you are wasting fuel.
"What time is it in Tokyo?" does not need the same model as "Refactor this 500-line React component." The first costs $0.001 on Haiku. The second might need $0.15 on Opus. If you use Opus for both, you are paying 150x more for the simple question.
The Three Claude Tiers
- Fastest response time in the Claude family
- 200K context window
- Extended thinking support
- Near-frontier intelligence at the lowest price
- Quick Q&A and simple chat
- Summarizing short texts
- Data formatting and extraction
- Calendar and reminder queries
- Simple translations
- Best balance of speed and intelligence
- 1M context window
- Extended thinking support
- Strong coding, analysis, and writing
- General assistant work (most messages)
- Code writing and debugging
- Long document analysis
- Email drafting and editing
- Research summaries
- Most capable model for complex reasoning
- 1M context window
- 128K max output
- Best for agentic coding and long-horizon tasks
- Complex multi-file coding sessions
- Architecture decisions and system design
- Deep research with nuanced analysis
- Writing that requires careful reasoning
- Tasks where getting it wrong is expensive
Which Model for Which Task?
| Task | Recommended | Why | Cost per Message |
|---|---|---|---|
| "What time is it in Tokyo?" | Haiku | Simple lookup | ~$0.001 |
| "Summarize this email" | Haiku | Short text, fast | ~$0.002 |
| "Write a cold email to a SaaS founder" | Sonnet | Needs tone and context | ~$0.01 |
| "Debug this React component" | Sonnet | Coding + reasoning | ~$0.03 |
| "Analyze this 50-page PDF" | Sonnet | Long context, synthesis | ~$0.05 |
| "Refactor this entire codebase" | Opus | Multi-file, complex logic | ~$0.15 |
| "Design a database schema for X" | Opus | Architecture decisions | ~$0.10 |
| "Write a 3000-word research report" | Opus | Deep reasoning, long output | ~$0.20 |
Beyond Claude: Other Models Worth Considering
| Model | Best For | Price | Why Use It |
|---|---|---|---|
| GPT-4o | General, creative writing | $2.50 / $10 MTok | Great at following instructions, strong creative output |
| Gemini 2.5 Flash | Free tier, research | Free (500 RPD) | Best free option, 1M context, fast |
| Gemini 2.5 Pro | Long documents, analysis | $1.25 / $10 MTok | Huge context window, strong reasoning |
| DeepSeek V3 | Coding, math | $0.27 / $1.10 MTok | Cheapest capable coding model |
| Llama 3.3 70B | Self-hosted, privacy | Free (self-hosted) | Run locally, no API costs, full privacy |
For the full model breakdown, see Best AI Model for OpenClaw. To run models locally, see self-hosting LLMs.
How to Set Up Model Routing
The simplest approach. Use Sonnet as your default and tell OpenClaw to switch when you need more power:
"Switch to Opus for this next task"
→ Model changed to Claude Opus 4.7
"Refactor the authentication module..."
→ [Complex coding with Opus]
"Switch back to Sonnet"
→ Model changed to Claude Sonnet 4.6See the full guide: How to Change Models.
Set different models for different workflows in your OpenClaw config:
Default model: Claude Sonnet 4.6
→ Handles 80% of your messages
Coding sessions: Claude Opus 4.7
→ When you say "let's code" or open a project
Quick questions: Claude Haiku 4.5
→ Simple lookups, time checks, reminders
Cron jobs: Gemini 2.5 Flash
→ Scheduled tasks (free tier saves money)On Ampere.sh, all models are included. Switch from the dashboard with one click. No API keys to manage, no config files to edit.
Cost Impact: Smart Routing vs Single Model
Assuming 100 messages per day with a typical mix:
| Strategy | Monthly Cost | Savings |
|---|---|---|
| Opus for everything | ~$45/mo | - |
| Sonnet for everything | ~$27/mo | 40% |
| Smart routing (Haiku + Sonnet + Opus) | ~$15/mo | 67% |
| Gemini Flash (free) + Sonnet for complex | ~$8/mo | 82% |
For more cost optimization, see how to reduce API costs.
The 80/15/5 Rule
Most users find this split works well:
General chat, email, short tasks, most coding, daily assistant work
Quick lookups, reminders, simple formatting, yes/no questions
Complex coding, architecture, deep research, high-stakes decisions
This split gives you top-tier quality when you need it and keeps daily costs under control. Adjust the ratios based on your usage.
Common Mistakes
- Using Opus for everything - expensive and often slower than Sonnet for simple tasks
- Using only Haiku to save money - it struggles with complex reasoning and long outputs
- Never switching models - the right tool for the right job applies to AI models too
- Ignoring non-Claude models - Gemini Flash is free and handles many tasks well
- Not tracking costs - check your API dashboard weekly to find waste
Quick Start
- Set Sonnet 4.6 as your default - it handles 80% of tasks well
- Switch to Opus when prompted - complex coding, research, architecture
- Use Haiku for cron jobs - scheduled tasks that do not need top intelligence
- Add Gemini Flash as backup - free tier for when you hit rate limits
For the complete setup, see the beginner guide. For prompting tips, check the prompting guide.
Frequently Asked Questions
What is model routing in OpenClaw?
Which Claude model should I use for OpenClaw?
How much does each Claude model cost?
Can I use non-Claude models with OpenClaw?
How do I switch models in OpenClaw?
Does model routing save money?
What is the best model for coding with OpenClaw?
Also Read
All models, one platform
Ampere.sh includes Claude, GPT-4o, Gemini, and more. Switch models with one click. No API keys to manage.
Start Free Trial

