Lesson 11 of 21

Multi-Model Routing

Monthly cost: Included in your Anthropic API spend Expected time: ~15 minutes

The Key to Affordable AI

Claude comes in three tiers. Using the right model for each task is the difference between a $200/month bill and a $20/month bill.

Model Best For Relative Cost Speed
Claude Opus Complex reasoning, planning, nuanced writing, coding architecture $$$ (most expensive) Slowest
Claude Sonnet General conversations, summaries, most daily tasks $$ (mid-range) Fast
Claude Haiku Quick lookups, simple Q&A, classification, formatting $ (cheapest) Fastest

To put real numbers on it: Haiku is roughly 60x cheaper per token than Opus. See anthropic.com/pricing for current per-token costs.

How Multi-Model Routing Works

OpenClaw can automatically pick the right model based on the type of request. You configure "profiles" that map to different models:

profiles:
  default:
    provider: anthropic
    model: claude-sonnet-4-6

  reasoning:
    provider: anthropic
    model: claude-opus-4-6

  quick:
    provider: anthropic
    model: claude-haiku-4-5

Recommended Routing Strategy

Here's a practical split that balances capability and cost:

Use Haiku (cheapest) for:

Use Sonnet (default) for:

Use Opus (most capable) for:

Setting It Up

Edit your OpenClaw config:

ssh claw@YOUR_SERVER_IP
nano ~/openclaw/config/default.yaml

Configure the profiles and set Sonnet as default. OpenClaw's routing can be triggered by keywords, channel, or explicit commands:

routing:
  default: sonnet
  rules:
    - match: "think deeply|analyze carefully|plan this"
      profile: reasoning
    - match: "quick|tldr|summarize briefly"
      profile: quick

Restart OpenClaw to pick up the changes:

docker restart openclaw

Testing the Routes

In Telegram, try sending messages that should trigger each model tier:

Verify which model actually handled each message by checking the logs:

docker logs openclaw --tail 50

Look for lines that mention the model name (e.g., claude-sonnet-4-6, claude-opus-4-6). You can also simply ask the bot: "What model are you?" — most models will identify themselves in the response.

Cost Expectations

With good routing:

When You're Done

Further Reading