Claw Mart
← All issuesClaw Mart Daily
Issue #132June 27, 2026

Multi-model routing saves 60% on costs — but only if you route by capability, not price

I've been running a multi-model routing setup for three months now, and the results are stark: 60% cost reduction with better output quality. But here's what everyone gets wrong — they route by price when they should route by capability.

Most people think routing is about sending simple tasks to cheap models. That's backwards. You should route by what each model is actually good at.

The breakthrough: Route by model strengths, not model costs. A $0.002 model that nails the task beats a $0.0001 model that needs three retry loops.

Here's my routing config that actually works:

# Model routing by capability
routing_rules:
  code_review:
    primary: claude-3.5-sonnet
    reason: "Best at understanding context and catching subtle bugs"
  
  code_generation:
    primary: deepseek-coder
    fallback: claude-3.5-sonnet
    reason: "Deepseek writes cleaner code, Claude handles edge cases"
  
  documentation:
    primary: gpt-4o-mini
    reason: "Fast, consistent, follows style guides religiously"
  
  research_synthesis:
    primary: claude-3.5-sonnet
    reason: "Best at connecting disparate information"
  
  data_extraction:
    primary: gpt-4o-mini
    reason: "Structured output, rarely hallucinates numbers"

The key insight: Each model has a cognitive profile. Claude excels at nuanced reasoning and context retention. GPT-4o-mini is incredibly reliable for structured tasks. Deepseek-coder writes more idiomatic code than anything else I've tested.

But routing only works if you can detect task type reliably. Here's the classifier prompt I use:

You are a task classifier. Analyze this request and return ONLY one of:
CODE_REVIEW, CODE_GEN, DOCS, RESEARCH, DATA_EXTRACT, GENERAL

Request: {user_input}

Classification:

Simple, fast, and accurate 90% of the time. For the 10% edge cases, I default to Claude — better to overspend on one task than underspend and get garbage.

The economics are compelling:

  • Before routing: Everything to Claude-3.5-Sonnet = $0.015/1K input tokens
  • After routing: 70% to cheaper models = $0.006/1K average
  • Quality impact: Actually improved because each model handles its strengths

The mistake I see everywhere: People route by token count instead of task complexity. A 500-token code review needs Claude's reasoning. A 5,000-token documentation task runs fine on GPT-4o-mini.

Warning: Don't route critical tasks to save $0.02. Route to optimize for the right cognitive fit. The cost savings come from volume, not from cheaping out on important work.

The real win isn't just cost — it's that each model does what it's actually good at. My code reviews got better when I stopped asking GPT-4o-mini to think deeply about architectural decisions. My documentation got more consistent when I stopped asking Claude to follow rigid templates.

One more thing: Build fallback chains, not just primary routes. When Deepseek is down, my coding agent automatically falls back to Claude. When GPT-4o-mini hits rate limits, it escalates to GPT-4o. Reliability beats optimization.

Multi-model routing is the difference between treating AI like a single expensive consultant versus building a team where each member has clear strengths. The team approach wins every time.

Paste into your agent's workspace

Claw Mart Daily

Get tips like this every morning

One actionable AI agent tip, delivered free to your inbox every day.