March 10, 2025
Model routing saves 60% -- here is how
A practical guide to model routing for OpenClaw agents. Which tasks need Opus, which work fine on Haiku, and how to configure it in under 5 minutes.
Most OpenClaw users run one model for everything. Opus for heartbeats. Opus for email triage. Opus for checking if the build passed. That is like hiring a senior architect to answer the phone.
Model routing means using the right model for each task. Cheap models for simple tasks. Expensive models only where quality actually matters. The result: 40-70% cost reduction with zero capability loss on the tasks you care about.
The three tiers
You have three Claude models to work with. Each has a clear role:
Haiku ($0.80/$4 per MTok): Classification, monitoring, routing, yes/no decisions. If the task has a small output and a clear decision boundary, Haiku handles it. Heartbeats, ticket routing, priority scoring, alert triage.
Sonnet ($3/$15 per MTok): The workhorse. Email drafts, code review, content generation, research summaries, data transformation. 5x cheaper than Opus. Handles 80% of real agent work without quality degradation.
Opus ($15/$75 per MTok): Complex multi-step reasoning. Architecture decisions. Subtle bug detection. Nuanced writing where tone matters. Use it for your main conversations and high-stakes tasks. Not for background jobs.
A real example
Here is a typical developer agent workload:
- Heartbeat monitoring: 48 checks/day
- Email triage: 4 runs/day
- Code review: 2 reviews/day
- Customer support routing: 20 tickets/day
All on Opus:
- Heartbeats: 48/day * (6,000 in + 200 out) = $151/month
- Email: 4/day * (3,000 in + 800 out) = $7.20/month
- Code review: 2/day * (8,000 in + 2,000 out) = $16.20/month
- Support: 20/day * (1,500 in + 300 out) = $27/month
- Total: $201/month
With routing:
- Heartbeats on Haiku: $8/month (was $151)
- Email on Sonnet: $1.44/month (was $7.20)
- Code review on Opus: $16.20/month (unchanged, worth it)
- Support on Haiku: $1.42/month (was $27)
- Total: $27/month
That is an 87% reduction. $174/month saved. Code review stays on Opus because that is where quality matters. Everything else moves to the model that matches the task complexity.
The decision framework
For each task your agent runs, ask two questions:
- Is the output structured and predictable? (Categories, labels, yes/no, status codes) If yes, use Haiku.
- Does the task require nuanced reasoning or generation? (Code analysis, creative writing, multi-step logic) If yes, use Sonnet. Only escalate to Opus if Sonnet's output quality is noticeably worse for that specific task.
Most users find that Opus is only needed for 10-20% of their agent's tasks. The other 80% runs fine on Sonnet or Haiku.
How to implement it
Open your openclaw.json. The routing configuration uses three fields:
{
"defaultModel": "anthropic/claude-sonnet-4-6",
"heartbeat": {
"model": "anthropic/claude-haiku-3-5",
"interval": 60
},
"routing": {
"subagent": "anthropic/claude-sonnet-4-6",
"monitoring": "anthropic/claude-haiku-3-5",
"classification": "anthropic/claude-haiku-3-5"
}
}
That is it. The default model handles your main conversations. Heartbeats get their own model. The routing object lets you assign models to specific task types.
If you need Opus for certain conversations, you can still switch models per-session. But the background jobs, the heartbeats, the sub-agents, the ticket routing? Those should never touch Opus.
Where the 60% comes from
For a typical user running 50 messages/day, 48 heartbeats, and 3 sub-agents:
- All on Opus: ~$425/month
- Main on Sonnet, heartbeats on Haiku, sub-agents on Sonnet: ~$170/month
- Savings: $255/month (60%)
The 60% number comes from the fact that heartbeats and context loading dominate the bill. Those are exactly the costs that respond best to model routing, because they are high-frequency and low-complexity.
Users with more heartbeat-heavy setups (multiple channels, 15-minute intervals) see even larger savings. Users who only send a few messages per day see smaller absolute savings but similar percentages.
Common objections
"Won't quality suffer?"
Only if you route tasks to the wrong model. Haiku is worse than Opus at complex reasoning. It is not worse at checking whether a task queue has items. Match the model to the task, not the other way around.
"I do not want to maintain a complex config."
Three fields. That is the entire routing config. Default model, heartbeat model, sub-agent model. You can add more granular routing later, but those three fields capture 90% of the savings.
"What if I miss something important because Haiku is handling it?"
Haiku's reading comprehension is excellent. It catches flagged items, due dates, urgent notifications. The tasks it is bad at (nuanced analysis, creative generation) are not the tasks you are routing to it.
Next steps
Use the routing engine to get model recommendations based on your specific workloads. It will generate a config snippet you can paste directly into openclaw.json.
For exact cost numbers, run your config through the Config Analyzer. Or use the task estimator to see per-task costs across all models.
The math is not complicated. The fix takes 5 minutes. The savings start immediately.
See your actual numbers
The calculator runs in your browser. No account needed.