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.

📺
Watch the video version: OpenClaw Model Routing Guide — 5-minute visual walkthrough.
🎧 Listen

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.

💡 The key insight: Most tasks don't need a flagship model. A $1/MTok model handles heartbeats and simple lookups just as well as a $15/MTok model — but at 1/15th the cost.

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)

ModelInputOutputBest For
Claude Opus 4.6$5.00$25.00Complex reasoning, planning, difficult code
GPT-5.2$1.75$14.00Multi-step reasoning, agentic tasks
Claude Sonnet 4.6$3.00$15.00High-quality general purpose

⚡ Tier 2 — Workhorse (Daily Driver)

ModelInputOutputBest For
Claude Sonnet 4 (prev gen)$3.00$15.00Excellent balance of quality + cost
GPT-5 mini$0.25$2.00Fast, cheap, surprisingly capable
Gemini 2.0 Flash$0.10$0.40Bulk processing, fast responses

💰 Tier 3 — Budget (Bulk/Simple Tasks)

ModelInputOutputBest For
Claude Haiku 4.5$1.00$5.00Quick tasks, heartbeats, routing
GPT-4.1 nano$0.10$0.40Simple lookups, classification
DeepSeek V3/R1$0.14–$0.55$0.28–$2.19Coding, reasoning on a budget

🆓 Tier 4 — Free/Local

ModelInputOutputBest For
Gemini Flash (free tier)FreeFreeTesting, low-stakes tasks
Llama 3.3 (Ollama)FreeFreePrivacy, offline use
Qwen 2.5 (Ollama)FreeFreeMultilingual, 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:

TaskRecommended ModelWhyCost
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 $$$
✅ Rule of thumb: Start every task at the cheapest tier. Only move up when you notice quality degradation. Most people are surprised how capable the budget models are.

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.

Budget — openclaw.json
{
  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.

Balanced — openclaw.json
{
  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.

Power — openclaw.json
{
  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)

SetupMain ChatHeartbeatsTotal/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)

SetupMain ChatHeartbeatsCronTotal/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)

SetupMain ChatHeartbeatsCron + AgentsTotal/month
Budget~$15–20~$2~$5$22–27
Balanced~$30–45~$2~$10$42–57
Power~$35–55~$2~$15$52–72
⚠️ Context window matters: These estimates assume regular session resets. If you let conversations grow to 100K+ tokens without resetting, costs multiply fast. Use /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?

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:

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

Common Mistakes

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:

  1. Sign up for OpenRouter — Get one API key at openrouter.ai for access to all models
  2. Copy the Balanced Setup config — Paste it into ~/.openclaw/openclaw.json
  3. Set Sonnet as your default — It's the best quality-to-cost ratio for daily use
  4. Set Haiku for heartbeats — In agents.defaults.heartbeat.model
  5. Configure model aliases — So you can /model opus quickly when needed
  6. Enable session resets — Set session.reset.mode: "daily" or use /clear regularly
  7. Monitor costs for 1 week — Check your OpenRouter dashboard or provider billing
  8. Adjust based on actual usage — If you never use Opus, remove it. If Haiku isn't enough for cron jobs, upgrade selectively
🎯 The bottom line: Smart model routing isn't about using the cheapest model everywhere — it's about using the right model for each task. A well-configured OpenClaw setup with Sonnet + Haiku routing gives you 90% of Opus quality at 30% of the cost.

References

  1. Claude Models Overview & Pricing — Anthropic Documentation, February 2026
  2. OpenAI API Pricing — OpenAI, February 2026
  3. OpenRouter Models & Pricing — OpenRouter
  4. OpenClaw Configuration Guide — Official Documentation
  5. Cut OpenClaw Token Costs by 77% — ClawHosters, February 2026
  6. OpenRouter Pricing — Pay-as-you-go — OpenRouter
  7. Ask HN: OpenClaw users, what is your token spend? — Hacker News
  8. OpenClaw API Cost Optimization: Smart Model Routing — Zen Van Riel, February 2026
  9. Cut OpenClaw Costs by 95% — Daily Dose of Data Science, February 2026
  10. OpenRouter Models Ranked: 20 Best for Coding, Free & Cheapest — TeamDay.ai, February 2026
  11. AI Model Pricing for OpenClaw Agents — ClawKit, 2026
  12. OpenClaw Configuration Reference — Official Documentation
🛡️ No Third-Party Tracking