OpenClaw Model Routing Guide: Which AI Model for Which Task
Stop using the most expensive model for everything. This guide gives you copy-paste configurations that cut your OpenClaw bill by 50–80% without sacrificing quality.
The Problem: One Model Does Not Fit All
OpenClaw supports dozens of AI models via OpenRouter, Anthropic, OpenAI, Google, and more. That's incredibly powerful — but it creates a paradox of choice. Most new users pick the biggest, smartest model (Claude Opus 4, GPT-5.2) and use it for everything: heartbeats, quick questions, cron jobs, sub-agents.
The result? $100–200+/month bills when $20–50 would get you the same experience for 95% of tasks.
This guide gives you a practical model routing strategy: which model for which task, with actual OpenClaw openclaw.json configurations you can copy-paste right now.
Model Tiers & Pricing (February 2026)
Here's how the current model landscape breaks down into cost tiers. Prices are per million tokens (input/output).[1][2][3]
🏆 Tier 1 — Flagship (Use Sparingly)
| Model | Input | Output | Best For |
|---|---|---|---|
| Claude Opus 4.6 | $5.00 | $25.00 | Complex reasoning, planning, difficult code |
| GPT-5.2 | $1.75 | $14.00 | Multi-step reasoning, agentic tasks |
| Claude Sonnet 4.6 | $3.00 | $15.00 | High-quality general purpose |
⚡ Tier 2 — Workhorse (Daily Driver)
| Model | Input | Output | Best For |
|---|---|---|---|
| Claude Sonnet 4 (prev gen) | $3.00 | $15.00 | Excellent balance of quality + cost |
| GPT-5 mini | $0.25 | $2.00 | Fast, cheap, surprisingly capable |
| Gemini 2.0 Flash | $0.10 | $0.40 | Bulk processing, fast responses |
💰 Tier 3 — Budget (Bulk/Simple Tasks)
| Model | Input | Output | Best For |
|---|---|---|---|
| Claude Haiku 4.5 | $1.00 | $5.00 | Quick tasks, heartbeats, routing |
| GPT-4.1 nano | $0.10 | $0.40 | Simple lookups, classification |
| DeepSeek V3/R1 | $0.14–$0.55 | $0.28–$2.19 | Coding, reasoning on a budget |
🆓 Tier 4 — Free/Local
| Model | Input | Output | Best For |
|---|---|---|---|
| Gemini Flash (free tier) | Free | Free | Testing, low-stakes tasks |
| Llama 3.3 (Ollama) | Free | Free | Privacy, offline use |
| Qwen 2.5 (Ollama) | Free | Free | Multilingual, coding |
Task-to-Model Mapping: The Cheat Sheet
This is the core of the guide. For every common OpenClaw task, here's which model to use and why:
| Task | Recommended Model | Why | Cost |
|---|---|---|---|
| Main chat (daily conversation) | Sonnet 4.6 | Best quality-to-cost ratio for interactive use | $$ |
| Quick questions / simple lookups | Haiku 4.5 or GPT-5 mini | Fast, cheap, good enough for simple Q&A | $ |
| Research / long writing | Sonnet 4.6 or Opus 4.6 | Needs reasoning + quality output | $$–$$$ |
| Sub-agent spawns (coding, research) | Sonnet 4.6 | Good enough for most delegated tasks | $$ |
| Heartbeat checks | Haiku 4.5 | Simple routing, no complex reasoning needed | $ |
| Cron jobs (news, monitoring) | Haiku 4.5 or Gemini Flash | Repetitive, predictable tasks | $ |
| Code generation / debugging | Sonnet 4.6 or Opus 4.6 | Needs precision and context understanding | $$–$$$ |
| Summarization | GPT-5 mini or Gemini Flash | Cheap, excellent at condensing information | $ |
| Image analysis | Sonnet 4.6 or GPT-5.2 | Needs vision capability + quality | $$ |
| Translation | Gemini Flash or Haiku 4.5 | Simple task, any model works well | $ |
| Complex reasoning / planning | Opus 4.6 | Only when you really need it | $$$ |
OpenClaw Configuration Examples
Here are three ready-to-use configurations for different budgets. OpenClaw uses a ~/.openclaw/openclaw.json file in JSON5 format.[4]
💵 Budget Setup ($5–15/month)
Use cheap models everywhere, with Sonnet only for main chat sessions.
{
agents: {
defaults: {
model: {
primary: "anthropic/claude-haiku-4-5",
fallbacks: ["openai/gpt-5-mini"],
},
models: {
"anthropic/claude-haiku-4-5": { alias: "haiku" },
"anthropic/claude-sonnet-4-6": { alias: "sonnet" },
"openai/gpt-5-mini": { alias: "gpt-mini" },
},
heartbeat: {
every: "30m",
model: "anthropic/claude-haiku-4-5",
},
},
list: [
{
id: "main",
default: true,
// Override to Sonnet for your main interactive session
model: "anthropic/claude-sonnet-4-6",
},
],
},
cron: { enabled: true },
}
With this setup, heartbeats and cron jobs use Haiku (~$1/MTok input), sub-agents default to Haiku, and only your direct conversations use Sonnet. If Haiku is down, it falls back to GPT-5 mini.
⚖️ Balanced Setup ($20–50/month)
Sonnet for most tasks, Haiku for background work. The sweet spot for most users.
{
agents: {
defaults: {
model: {
primary: "anthropic/claude-sonnet-4-6",
fallbacks: ["openai/gpt-5.2"],
},
models: {
"anthropic/claude-opus-4-6": { alias: "opus" },
"anthropic/claude-sonnet-4-6": { alias: "sonnet" },
"anthropic/claude-haiku-4-5": { alias: "haiku" },
"openai/gpt-5.2": { alias: "gpt" },
"openai/gpt-5-mini": { alias: "gpt-mini" },
},
heartbeat: {
every: "30m",
model: "anthropic/claude-haiku-4-5",
},
},
},
cron: { enabled: true },
}
Everything defaults to Sonnet, but heartbeats run on Haiku. Use /model opus in chat when you need Opus for a complex task, then switch back. Cron jobs inherit the default model — override with per-job model settings for savings.
🚀 Power Setup ($50–100/month)
Sonnet as default with Opus readily available. For power users who need the best for complex tasks.
{
agents: {
defaults: {
model: {
primary: "anthropic/claude-sonnet-4-6",
fallbacks: ["anthropic/claude-opus-4-6", "openai/gpt-5.2"],
},
models: {
"anthropic/claude-opus-4-6": { alias: "opus" },
"anthropic/claude-sonnet-4-6": { alias: "sonnet" },
"anthropic/claude-haiku-4-5": { alias: "haiku" },
"openai/gpt-5.2": { alias: "gpt" },
"openai/gpt-5-mini": { alias: "gpt-mini" },
"google/gemini-3-flash-preview": { alias: "flash" },
},
heartbeat: {
every: "30m",
model: "anthropic/claude-haiku-4-5",
},
maxConcurrent: 3,
},
},
cron: { enabled: true },
}
If Sonnet goes down, it falls back to Opus, then GPT-5.2. Use /model opus for complex reasoning tasks. Set maxConcurrent: 3 for parallel sub-agents.
Monthly Cost Estimates
Estimated monthly costs based on typical usage patterns. Assumes ~2K tokens per message (input+output combined).[5]
Light Use (20 messages/day)
| Setup | Main Chat | Heartbeats | Total/month |
|---|---|---|---|
| Budget | ~$3–5 | ~$1 | $4–6 |
| Balanced | ~$5–8 | ~$1 | $6–9 |
| Power | ~$5–8 | ~$1 | $6–9 |
Medium Use (50 messages/day + 5 cron jobs)
| Setup | Main Chat | Heartbeats | Cron | Total/month |
|---|---|---|---|---|
| Budget | ~$8–12 | ~$1 | ~$2 | $11–15 |
| Balanced | ~$15–20 | ~$1 | ~$3 | $19–24 |
| Power | ~$15–25 | ~$1 | ~$3 | $19–29 |
Heavy Use (100 messages/day + 10 cron jobs + sub-agents)
| Setup | Main Chat | Heartbeats | Cron + Agents | Total/month |
|---|---|---|---|---|
| Budget | ~$15–20 | ~$2 | ~$5 | $22–27 |
| Balanced | ~$30–45 | ~$2 | ~$10 | $42–57 |
| Power | ~$35–55 | ~$2 | ~$15 | $52–72 |
/clear or configure automatic resets in your session settings.
Model Routing with OpenRouter
OpenRouter is a unified API gateway that gives you access to 300+ models from all major providers with a single API key. It's the easiest way to use multiple models in OpenClaw.[6]
Why OpenRouter?
- One API key, all models — No need for separate Anthropic, OpenAI, and Google accounts
- Automatic fallbacks — If one provider is down, OpenRouter routes to another
- Transparent pricing — Pay-as-you-go with a small markup over direct API pricing
- Free tier models — Some models have free tiers for testing
Using OpenRouter Models in OpenClaw
Prefix model IDs with openrouter/ in your config:
{
agents: {
defaults: {
model: {
primary: "openrouter/anthropic/claude-sonnet-4-6",
fallbacks: ["openrouter/openai/gpt-5.2"],
},
},
},
}
Per-Session Model Switching
In any OpenClaw chat, use the /model command to switch models on the fly:
/model opus— Switch to Opus for a complex task/model haiku— Drop to Haiku for simple questions/model gpt— Try GPT for a second opinion
The model catalog in agents.defaults.models defines what's available. Aliases make switching fast.
What the Community Recommends
Based on Hacker News discussions, Reddit threads, and real-world OpenClaw deployments:[7][8][9]
Consensus Picks
- Claude Sonnet is the overwhelming favorite for daily driver use — "best quality-to-cost ratio"
- Prompt caching is the #1 cost saver — reduces input token costs by up to 90% on repeated context
- Session resets (
/clear) are the easiest win most people miss - GPT-5 mini is a "value champion" — matches GPT-4o quality at a fraction of the cost[10]
- Haiku for heartbeats — universal recommendation, no one uses flagship models for background checks
- DeepSeek models offer incredible value for coding tasks[11]
Common Mistakes
- Using Opus/GPT-5.2 for everything — the biggest cost trap
- Not setting heartbeat model separately — burns flagship tokens on simple checks
- Letting conversations run forever without session resets
- Not using
/modelto switch models mid-conversation when the task changes - Running 10+ cron jobs on the default (expensive) model
Hacker News Perspective
A popular HN thread "Ask HN: OpenClaw users, what is your token spend?" revealed most power users spend $20–60/month with smart routing, while those using a single flagship model everywhere reported $100–200/month for similar usage patterns.[7]
Getting Started Checklist
Follow these steps to optimize your OpenClaw model routing today:
- Sign up for OpenRouter — Get one API key at openrouter.ai for access to all models
- Copy the Balanced Setup config — Paste it into
~/.openclaw/openclaw.json - Set Sonnet as your default — It's the best quality-to-cost ratio for daily use
- Set Haiku for heartbeats — In
agents.defaults.heartbeat.model - Configure model aliases — So you can
/model opusquickly when needed - Enable session resets — Set
session.reset.mode: "daily"or use/clearregularly - Monitor costs for 1 week — Check your OpenRouter dashboard or provider billing
- Adjust based on actual usage — If you never use Opus, remove it. If Haiku isn't enough for cron jobs, upgrade selectively
References
- Claude Models Overview & Pricing — Anthropic Documentation, February 2026
- OpenAI API Pricing — OpenAI, February 2026
- OpenRouter Models & Pricing — OpenRouter
- OpenClaw Configuration Guide — Official Documentation
- Cut OpenClaw Token Costs by 77% — ClawHosters, February 2026
- OpenRouter Pricing — Pay-as-you-go — OpenRouter
- Ask HN: OpenClaw users, what is your token spend? — Hacker News
- OpenClaw API Cost Optimization: Smart Model Routing — Zen Van Riel, February 2026
- Cut OpenClaw Costs by 95% — Daily Dose of Data Science, February 2026
- OpenRouter Models Ranked: 20 Best for Coding, Free & Cheapest — TeamDay.ai, February 2026
- AI Model Pricing for OpenClaw Agents — ClawKit, 2026
- OpenClaw Configuration Reference — Official Documentation