Anthropic's Three-Tier Routing Strategy — Opus 4.7, Sonnet 4.6, and Haiku 4.5
Haiku handles simple tasks, Sonnet manages most workloads, and Opus takes the judgment calls. This guide covers Anthropic's three-tier routing strategy, the Adviser API pattern, and the decision matrix for choosing which model to call when.
Primary Focus
ai developmentAI Tools Covered
What You'll Learn
- ✓From Two-Tier to Three-Tier: Why Sonnet 4.6 Changed the Calculus
- ✓The Routing Decision Matrix: Which Model for Which Task
- ✓Calculating Your Monthly AI Bill: Three-Tier Cost Scenarios
Guide Curriculum
From Two-Tier to Three-Tier: Why Sonnet 4.6 Changed the Calculus
- •From Two-Tier to Three-Tier: Why Sonnet 4.6 Changed the Calculus12m
The Routing Decision Matrix: Which Model for Which Task
- •The Routing Decision Matrix: Which Model for Which Task12m
Calculating Your Monthly AI Bill: Three-Tier Cost Scenarios
- •Calculating Your Monthly AI Bill: Three-Tier Cost Scenarios10m
Preview: First Lesson
From Two-Tier to Three-Tier: Why Sonnet 4.6 Changed the Calculus
From Two-Tier to Three-Tier: Why Sonnet 4.6 Changed the Calculus
From Two-Tier to Three-Tier: Why Sonnet 4.6 Changed the Calculus
Anthropic's original adviser strategy was elegant in its simplicity: pair a cheap executor (Haiku or Sonnet) with a smart adviser (Opus) that gets called only when needed. Haiku handles the routine work; Opus handles the hard thinking. Two tiers, one handoff point.
This model still works. But in April 2026, with Sonnet 4.6 sitting at $3/MTok input and Opus 4.7 at $5/MTok input — a 1.67x gap, not the 5x gap you see against Haiku — the calculus for when to involve Opus has shifted substantially.
The Updated Pricing Landscape (April 2026)
| Model | Input (per MTok) | Output (per MTok) | Best at |
|---|---|---|---|
| Claude Haiku 4.5 | $1.00 | $5.00 | Classification, extraction, simple Q&A |
| Claude Sonnet 4.6 | $3.00 | $15.00 | Complex reasoning, code generation, analysis |
| Claude Opus 4.7 | $5.00 | $25.00 | Frontier judgment, novel reasoning, high-stakes decisions |
The interesting asymmetry: Haiku-to-Sonnet is a 3x input gap, but Sonnet-to-Opus is only 1.67x. This changes how you think about routing.
The Three-Tier Mental Model
Think of it as three lanes:
Lane 1 — Haiku 4.5 (fast lane, low cost): Volume tasks that need speed and cheapness more than nuance. Intent classification, entity extraction, template filling, simple Q&A with structured answers, sentiment analysis.
Lane 2 — Sonnet 4.6 (main lane, default): Everything that isn't obviously a Haiku task or obviously a frontier tas
Start learning with this comprehensive guide
This guide includes:
About the Author
Hiram Clark is the founder and managing editor of vybecoding.ai and sets editorial direction for the guides and news published here. Articles are drafted with AI assistance and edited before publication. He works hands-on with the AI development tools, workflows, and infrastructure covered on the site.
Full Guide Content
Complete lesson text — start the interactive course above for exercises and progress tracking.
Module 1From Two-Tier to Three-Tier: Why Sonnet 4.6 Changed the Calculus
1.1From Two-Tier to Three-Tier: Why Sonnet 4.6 Changed the Calculus
From Two-Tier to Three-Tier: Why Sonnet 4.6 Changed the Calculus
Anthropic's original adviser strategy was elegant in its simplicity: pair a cheap executor (Haiku or Sonnet) with a smart adviser (Opus) that gets called only when needed. Haiku handles the routine work; Opus handles the hard thinking. Two tiers, one handoff point.
This model still works. But in April 2026, with Sonnet 4.6 sitting at $3/MTok input and Opus 4.7 at $5/MTok input — a 1.67x gap, not the 5x gap you see against Haiku — the calculus for when to involve Opus has shifted substantially.
The Updated Pricing Landscape (April 2026)
| Model | Input (per MTok) | Output (per MTok) | Best at |
|---|---|---|---|
| Claude Haiku 4.5 | $1.00 | $5.00 | Classification, extraction, simple Q&A |
| Claude Sonnet 4.6 | $3.00 | $15.00 | Complex reasoning, code generation, analysis |
| Claude Opus 4.7 | $5.00 | $25.00 | Frontier judgment, novel reasoning, high-stakes decisions |
The interesting asymmetry: Haiku-to-Sonnet is a 3x input gap, but Sonnet-to-Opus is only 1.67x. This changes how you think about routing.
The Three-Tier Mental Model
Think of it as three lanes:
Lane 1 — Haiku 4.5 (fast lane, low cost): Volume tasks that need speed and cheapness more than nuance. Intent classification, entity extraction, template filling, simple Q&A with structured answers, sentiment analysis. Lane 2 — Sonnet 4.6 (main lane, default): Everything that isn't obviously a Haiku task or obviously a frontier task. Code generation and debugging. Multi-document synthesis. Multi-step tool use. User-facing content where quality matters. Agentic task execution. Sonnet 4.6 is where the majority of production traffic should land. Lane 3 — Opus 4.7 (specialist lane, high stakes): Tasks where even Sonnet makes structural errors or where the cost of a wrong answer is high. Novel research problems. Architectural decisions that downstream other work. Complex reasoning where one wrong inference propagates through ten subsequent steps.The Adviser API as a Three-Tier Mechanism
Anthropic's Adviser API (beta identifier: advisors-2025-03-01) is still valid and still useful — but it's most accurately understood as a specific implementation of three-tier routing, not a replacement for it.
When you configure a Haiku executor with an Opus adviser, you're running:
- Lane 1 (Haiku) for all work
- Lane 3 (Opus) as a call-in specialist when Haiku self-escalates
The missing piece is Lane 2 — Sonnet — which is often the better default executor for tasks where Haiku doesn't have sufficient capability. Many teams now configure a Sonnet executor with an Opus adviser for complex agentic workflows, or a Haiku classifier that routes to Sonnet or Opus rather than doing all work in Haiku.
The point is: the Adviser API is a mechanism. The strategy is three-tier routing. Don't let the API shape your architecture.
One Practical Consequence: The Opus 4.7 Tokenizer
Opus 4.7 uses a new tokenizer that can produce up to 35% more tokens for the same text compared to earlier models. The per-token price is unchanged, but your per-request cost may climb 20–35% on Opus compared to Opus 4.6 for identical prompts. Factor this into cost projections before migrating production workloads.
Module 2The Routing Decision Matrix: Which Model for Which Task
2.1The Routing Decision Matrix: Which Model for Which Task
The Routing Decision Matrix: Which Model for Which Task
The most common failure in multi-model systems isn't using the wrong model — it's using the same model for everything because routing logic feels complex to implement. Here's a practical framework that covers 95% of routing decisions.
The Decision Tree
Step 1: Is the task well-defined with a structured output?- YES → use Haiku 4.5
- NO → go to Step 2
Examples that answer YES: classify this intent, extract these entities, is this text positive/negative, format this data as JSON, fill this template.
Step 2: Does the task require code generation, multi-step reasoning, or user-visible quality?- YES → use Sonnet 4.6
- NO → try Haiku first, escalate if needed
- YES → use Opus 4.7
- NO → you probably don't need Opus
The Full Matrix
| Task Type | Recommended Model | Reasoning |
|---|---|---|
| Intent classification | Haiku 4.5 | Structured, high-volume, cheap |
| Entity extraction | Haiku 4.5 | Pattern matching, clear output |
| Sentiment analysis | Haiku 4.5 | Well-defined label set |
| Template filling | Haiku 4.5 | Deterministic substitution |
| Code generation / debugging | Sonnet 4.6 | Complex reasoning, user-visible |
| Multi-document summarization | Sonnet 4.6 | Requires synthesis |
| Agentic task execution | Sonnet 4.6 | Multi-step, tool use |
| Customer-facing responses | Sonnet 4.6 | Quality matters, reasonable cost |
| Complex research / planning | Opus 4.7 | Highest reliability |
| High-stakes decisions | Opus 4.7 | Error cost exceeds token cost |
| Novel problem types | Opus 4.7 | Sonnet may not generalize |
Implementing the Adviser Pattern: Sonnet + Opus
For complex agentic workflows where Sonnet handles most tasks but occasionally needs Opus for hard sub-problems:
import Anthropic from '@anthropic-ai/sdk';
const client = new Anthropic();
async function runAgentWithAdviser(userMessage: string): Promise {
const response = await client.beta.messages.create({
model: 'claude-sonnet-4-6',
max_tokens: 2048,
betas: ['advisors-2025-03-01'],
system: `You are a senior software architect. Handle most questions directly.
When you encounter a genuinely novel architectural problem, call the advisor.`,
tools: [
{
type: 'advisor_20260301' as any,
name: 'advisor',
max_uses: 2 // cap at 2 Opus calls per conversation
}
],
messages: [{ role: 'user', content: userMessage }]
});
const textBlock = response.content.find(b => b.type === 'text');
return textBlock?.type === 'text' ? textBlock.text : '';
}
The max_uses: 2 cap is important: without it, a complex conversation could escalate to Opus repeatedly. Setting a ceiling lets you predict worst-case cost.
Implementing a Haiku Router
For systems with high Haiku-eligible traffic, a cheap classifier that routes at intake is often more cost-effective than the Adviser API:
async function routeRequest(userMessage: string, context: Record): Promise {
// Fast heuristics first — no LLM call
if (context.taskType === 'classify' || context.taskType === 'extract') {
return 'claude-haiku-4-5';
}
if (context.requiresCodeGeneration || userMessage.length > 3000) {
return 'claude-sonnet-4-6';
}
// Haiku classifier for ambiguous cases
const classification = await client.messages.create({
model: 'claude-haiku-4-5',
max_tokens: 10,
system: "Reply with only 'simple', 'moderate', or 'complex' based on reasoning required.",
messages: [{ role: 'user', content: userMessage.substring(0, 500) }]
});
const tier = (classification.content[0] as any).text?.trim().toLowerCase();
const modelMap: Record = {
simple: 'claude-haiku-4-5',
moderate: 'claude-sonnet-4-6',
complex: 'claude-opus-4-7'
};
return modelMap[tier] ?? 'claude-sonnet-4-6';
}
A Haiku classifier call at ~1,000 input tokens costs $0.001. If it routes 30% of traffic from Sonnet to Haiku (saving $2/MTok on input), the classifier pays for itself after routing 500 tokens — less than one request's context.
When NOT to Route
Routing adds latency and complexity. Don't route if:
- Traffic is low and cost isn't a concern
- All tasks genuinely require the same tier's capabilities
- The classification latency would degrade UX noticeably
- You're in prototype stage (optimize when cost becomes material)
Start with one model, profile, then route. Don't optimize prematurely.
Module 3Calculating Your Monthly AI Bill: Three-Tier Cost Scenarios
3.1Calculating Your Monthly AI Bill: Three-Tier Cost Scenarios
Calculating Your Monthly AI Bill: Three-Tier Cost Scenarios
Abstract routing strategies are easier to adopt when you can see the numbers. Here are three concrete scenarios using April 2026 pricing to show what three-tier routing actually saves.
Baseline Prices (April 2026)
| Model | Input | Output |
|---|---|---|
| Haiku 4.5 | $1.00/MTok | $5.00/MTok |
| Sonnet 4.6 | $3.00/MTok | $15.00/MTok |
| Opus 4.7 | $5.00/MTok | $25.00/MTok |
Scenario 1: Customer Support Agent
Setup: 100,000 requests/month. Each request: 2,500 input tokens, 400 output tokens.| Strategy | Monthly Cost |
|---|---|
| All Opus 4.7 | (250M input × $5) + (40M output × $25) = $1,250 + $1,000 = $2,250 |
| All Sonnet 4.6 | (250M × $3) + (40M × $15) = $750 + $600 = $1,350 |
| Three-tier (70% Haiku, 25% Sonnet, 5% Opus) | ~$485 + overhead = ~$520 |
Three-tier routing cuts this bill by 77% compared to all-Opus. The savings come primarily from routing the 70% of simple classification and lookup requests to Haiku.
What that 70% typically looks like in support: "What are your business hours?", "Where is my order?", "What does feature X do?" — questions with deterministic answers from a known corpus.Scenario 2: Code Review Pipeline
Setup: 10,000 code reviews/month. Each review: 5,000 input tokens, 1,200 output tokens.| Strategy | Monthly Cost |
|---|---|
| All Opus 4.7 | (50M × $5) + (12M × $25) = $250 + $300 = $550 |
| All Sonnet 4.6 | (50M × $3) + (12M × $15) = $150 + $180 = $330 |
| Routing (20% Opus, 80% Sonnet) | ~$140 + $78 = $218 |
Here the Haiku tier barely applies — code review requires real reasoning. The routing win comes from sending only genuinely complex architectural reviews to Opus, with Sonnet handling standard code quality checks.
20% Opus threshold: Send to Opus when the PR modifies core infrastructure, introduces new architectural patterns, or touches security-sensitive paths. The rest goes to Sonnet.Scenario 3: Agentic Research Tool with Adviser Pattern
Setup: 5,000 research sessions/month. Each session: 8,000 input tokens, 2,000 output tokens. 15% of sessions trigger 1 Opus adviser call (1,500 input + 500 output tokens).| Component | Cost |
|---|---|
| 5,000 Sonnet executor sessions | (40M input × $3) + (10M output × $15) = $120 + $150 = $270 |
| 750 Opus adviser calls (15% of sessions) | (1.125M × $5) + (375K × $25) = $5.63 + $9.38 = $15 |
| Total with adviser pattern | $285/month |
| All-Opus equivalent | (40M × $5) + (10M × $25) = $200 + $250 = $450/month |
Savings: ~37% on this workload. The adviser pattern shines when a small percentage of tasks genuinely need Opus-level reasoning and the rest can be handled by Sonnet.
The Prompt Caching Multiplier
These scenarios don't include prompt caching. If your system prompt is 2,000 tokens on Sonnet 4.6:
- Without caching: 100,000 requests × 2,000 tokens × $3/MTok = $600/month just for the system prompt
- With 5-minute TTL cache (1 write per 5 min, reads for the rest): ≈ $60/month
Cache your system prompt, your RAG context documents, and your conversation history prefix. At scale, this alone cuts input costs by 60–80%.
A Cost Budget Framework
For any AI-powered feature, set a cost target per outcome before you build:
- "$0.02 per support ticket resolved"
- "$0.05 per code review completed"
- "$0.10 per research session completed"
Then work backwards: given that target and your estimated token counts, which model tier(s) can you afford? This forces routing decisions to be grounded in business requirements, not engineering preference.
The advantage of three-tier routing isn't just cost reduction — it's cost predictability. When you route by task type rather than by model preference, your per-outcome cost becomes a function of your traffic mix, which you can measure and control.