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

Claude Haiku 4.5
The Sprinter
$1 / $5 per MTok
Input / Output
  • Fastest response time in the Claude family
  • 200K context window
  • Extended thinking support
  • Near-frontier intelligence at the lowest price
Best For
  • Quick Q&A and simple chat
  • Summarizing short texts
  • Data formatting and extraction
  • Calendar and reminder queries
  • Simple translations
Claude Sonnet 4.6
The All-Rounder
Best Default
$3 / $15 per MTok
Input / Output
  • Best balance of speed and intelligence
  • 1M context window
  • Extended thinking support
  • Strong coding, analysis, and writing
Best For
  • General assistant work (most messages)
  • Code writing and debugging
  • Long document analysis
  • Email drafting and editing
  • Research summaries
Claude Opus 4.7
The Powerhouse
$5 / $25 per MTok
Input / Output
  • Most capable model for complex reasoning
  • 1M context window
  • 128K max output
  • Best for agentic coding and long-horizon tasks
Best For
  • 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?

TaskRecommendedWhyCost per Message
"What time is it in Tokyo?"HaikuSimple lookup~$0.001
"Summarize this email"HaikuShort text, fast~$0.002
"Write a cold email to a SaaS founder"SonnetNeeds tone and context~$0.01
"Debug this React component"SonnetCoding + reasoning~$0.03
"Analyze this 50-page PDF"SonnetLong context, synthesis~$0.05
"Refactor this entire codebase"OpusMulti-file, complex logic~$0.15
"Design a database schema for X"OpusArchitecture decisions~$0.10
"Write a 3000-word research report"OpusDeep reasoning, long output~$0.20

Beyond Claude: Other Models Worth Considering

ModelBest ForPriceWhy Use It
GPT-4oGeneral, creative writing$2.50 / $10 MTokGreat at following instructions, strong creative output
Gemini 2.5 FlashFree tier, researchFree (500 RPD)Best free option, 1M context, fast
Gemini 2.5 ProLong documents, analysis$1.25 / $10 MTokHuge context window, strong reasoning
DeepSeek V3Coding, math$0.27 / $1.10 MTokCheapest capable coding model
Llama 3.3 70BSelf-hosted, privacyFree (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

Option 1: Manual Switching

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.6

See the full guide: How to Change Models.

Option 2: Task-Based Defaults

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)
Option 3: Ampere.sh (Easiest)

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:

StrategyMonthly CostSavings
Opus for everything~$45/mo-
Sonnet for everything~$27/mo40%
Smart routing (Haiku + Sonnet + Opus)~$15/mo67%
Gemini Flash (free) + Sonnet for complex~$8/mo82%

For more cost optimization, see how to reduce API costs.

The 80/15/5 Rule

Most users find this split works well:

80%
Sonnet

General chat, email, short tasks, most coding, daily assistant work

15%
Haiku

Quick lookups, reminders, simple formatting, yes/no questions

5%
Opus

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?
Model routing means using different AI models for different tasks. Simple questions go to cheap, fast models like Haiku. Complex coding or research goes to powerful models like Opus. This optimizes both cost and quality.
Which Claude model should I use for OpenClaw?
Start with Sonnet 4.6 for most tasks - it is the best balance of speed, quality, and cost. Use Haiku for simple chat and quick replies. Switch to Opus for complex reasoning, long coding sessions, or research.
How much does each Claude model cost?
Haiku 4.5: $1/$5 per million tokens (input/output). Sonnet 4.6: $3/$15. Opus 4.7: $5/$25. Haiku is 5x cheaper than Opus for output.
Can I use non-Claude models with OpenClaw?
Yes. OpenClaw supports GPT-4o, Gemini, DeepSeek, Llama, Mistral, and any OpenAI-compatible API. You can mix providers - Claude for coding, Gemini for research, GPT for creative writing.
How do I switch models in OpenClaw?
Change your model in the OpenClaw config or tell the agent to switch mid-conversation. On Ampere.sh, you can switch models with one click from the dashboard.
Does model routing save money?
Yes, significantly. If 70% of your messages are simple (Haiku at $1/MTok) and 30% are complex (Opus at $5/MTok), you spend roughly 60% less than using Opus for everything.
What is the best model for coding with OpenClaw?
Claude Opus 4.7 is the best for complex coding. Sonnet 4.6 handles most coding tasks well at lower cost. For code review and simple scripts, Haiku is sufficient.

Also Read

Best AI Model for OpenClaw: Compare Pricing & Features
Guide

Best AI Model for OpenClaw: Compare Pricing & Features

·
How to Reduce OpenClaw API Cost Without Losing Workflow Quality
Guide

How to Reduce OpenClaw API Cost Without Losing Workflow Quality

·
How to Change Model in OpenClaw: Complete Guide for Beginners
Guide

How to Change Model in OpenClaw: Complete Guide for Beginners

10 min·May 25, 2026
Michael Park

Written by

Michael Park

Senior Technical Writer & DevRel

Michael creates comprehensive installation and setup guides for developers and system administrators. With experience across Linux, macOS, Windows, and embedded systems, he has written over 200 technical tutorials used by millions of developers. He focuses on clear, step-by-step instructions that work the first time, covering everything from Raspberry Pi to enterprise servers.

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