Architecture·8 min read·28 August 2026

Claude Model Selection Guide: Route Smarter, Spend Less

A practical claude model selection guide covering task-to-model routing, cost-per-outcome thinking, budget guardrails, and CCAR-F exam strategy.

By Solomon Udoh · AI Architect & Certification Lead

Claude Model Selection Guide: Route Smarter, Spend Less

A claude model selection guide has one job: stop you from reaching for the strongest model when a faster, cheaper one will finish the task correctly. The decision is a routing problem, not a capability contest. Route by task complexity, measure cost per completed outcome rather than cost per token, and encode the decision in code so every agent in your system inherits it automatically.

This guide covers the three-tier model family, practical routing patterns, confidence-based escalation, context-growth cost traps, budget guardrails, and what the CCAR-F Architect Foundations exam tests on model choice.

What are the Claude model tiers and how do they compare?

Anthropic publishes three production tiers, each optimised for a different point on the cost-to-capability curve. Haiku is the fastest and cheapest tier, suited for classification, extraction, and short-form generation where latency is visible to end users. Sonnet occupies the middle ground: stronger reasoning at moderate cost, making it the default workhorse for most production workloads. Opus and Fable sit at the top of the family, designed for complex reasoning, long-context analysis, and tasks where quality differences produce measurable business outcomes.

TierBest task categoryRouting signalRelative cost
HaikuClassification, extraction, translation, short generationOutput is deterministic; failure cost is lowLowest
SonnetMulti-step reasoning, code generation, moderate documentsQuality is measurable; stakes are moderateMid
Opus / FableComplex synthesis, long-context analysis, high-stakes judgmentQuality ceiling matters; a wrong answer costs more than the callHighest

For current per-token pricing, consult the Anthropic pricing page. Prices change as models are updated, and the ratio between tiers is what matters operationally, not any single figure.

How should you route tasks between models in a multi-agent system?

The practical routing hierarchy flows from three questions applied in order:

  1. Is the task a classification, extraction, or short-form generation with a deterministic correct answer? Route to Haiku.
  2. Is the task multi-step reasoning or code generation where quality is measurable but not at the level where one wrong answer cascades? Route to Sonnet.
  3. Is the task a long-context synthesis, high-stakes judgment, or output where a wrong answer costs significantly more than the model call? Route to Opus or Fable.

In a multi-agent system, this hierarchy belongs in the coordinator, not distributed across subagents. The coordinator responsibilities pattern places model selection in one location, so swapping tiers later requires a single-line change. When each subagent selects its own model, routing is impossible to audit and spend patterns become unpredictable.

python
MODEL_REGISTRY = {
"classify": "claude-haiku-4-5-20251001",
"reason": "claude-sonnet-5",
"judge": "claude-opus-5",
}
def select_model(task_type: str) -> str:
return MODEL_REGISTRY.get(task_type, "claude-sonnet-5")

For cases where the correct tier is not known until the model responds, a confidence-based escalation ladder works well. Ask the model to return a structured output that includes a confidence score, then escalate if the score falls below a threshold:

python
def route_with_escalation(task: str) -> dict:
result = call_with_schema("claude-haiku-4-5-20251001", task)
if result["confidence"] < 0.75:
result = call_with_schema("claude-sonnet-5", task)
return result

This keeps Haiku as the first pass for all incoming tasks. Most will clear the threshold and return cheaply. A minority escalate to Sonnet, and only tasks that also fail Sonnet's threshold need Opus. For cases where the right tier is genuinely uncertain at design time, model-driven vs pre-configured decision-making covers when each approach earns its keep.

Is cost-per-token the right metric, or should you measure cost-per-outcome?

Cost-per-token is a billing metric, not a performance metric. An Opus call that returns a correct answer in one attempt can be cheaper overall than three Haiku calls that each return a partial or wrong answer requiring retry and re-prompt overhead. The more useful metric is cost-per-completed-task: sum all input tokens, output tokens, and retry overhead for every call needed to finish one unit of work.

When you measure this across a week of production traffic, routing intuitions often flip. Tasks you assumed were simple enough for Haiku sometimes show two or three retry loops that erase the per-call saving. Track three signals first:

  • Cache hit rate. A low rate means you are paying full price on inputs that could be cached. Per Anthropic's prompt caching documentation, cached tokens are priced lower than uncached tokens. Cache-busting happens silently when you reorder tools or modify static context between calls: keep the cacheable prefix stable and append dynamic content at the end of each request.
  • Retry rate per task type. A high retry rate signals a model underpowered for the task. If classification retries heavily on Haiku, the routing threshold is wrong, not the model family.
  • Cost per accepted output. For generative tasks, divide total spend by outputs that passed your quality gate, not by total API responses returned.

To build these metrics, instrument at the API layer. Record model ID, input tokens, output tokens, cached tokens, and a task-type label for every call. Aggregate by week and sort by cost-per-accepted-output descending to find the task types bleeding most. In most production systems, a minority of task types account for the majority of routing-related waste. Fix those first before tuning thresholds globally.

How does model choice interact with context growth?

A long-running agent session compounds input tokens with every turn. If each subagent call appends 2,000 tokens of tool output to the context and the coordinator runs 20 turns, you are paying for 40,000 tokens of accumulated history on every subsequent call. The model tier multiplies that cost directly: the same accumulated prefix costs substantially more against Opus than Haiku.

Three mitigations that work in production:

Trim tool outputs before appending. A tool returning a 5,000-token JSON blob often contains a fraction of that in actionable signal. Write a trimmer that extracts only what the next reasoning step needs. This is a first-order cost control, not a secondary optimisation.

Route summarisation to Haiku. After a Sonnet or Opus agent finishes reasoning over a long context, a cheap Haiku call can compress findings into a structured summary. The parent session replaces the full history with the summary, resetting the token baseline for subsequent calls.

Isolate independent subtasks. Subagent context isolation is free. A subagent launched into a fresh context carries only what you explicitly pass to it. When a task is genuinely independent of the parent session's accumulated history, isolation is the correct default. MCP tool chatter compounds the problem further: a tool that returns verbose status responses on every call adds to the cached prefix whether the output is useful or not, so keep tool responses as narrow as the next step requires.

The CCAR-F exam treats context growth as a reliability risk, not only a cost risk. Domain 5 questions often present a session that has run for many turns and ask what the architect should do next. The exam-correct answer is rarely to continue with the current context: it is one of summarise and inject, isolate into a fresh session, or fork for divergent exploration.

What do budget caps and spend guardrails look like in production?

A budget guardrail is a precondition, not an afterthought. Build it into the session initialisation layer so it fires before any model call, not after the invoice arrives.

python
class BudgetGuard:
def __init__(self, limit_usd: float):
self.limit = limit_usd
self.spent = 0.0
def charge(self, cost: float) -> None:
self.spent += cost
if self.spent >= self.limit:
raise BudgetExceeded(
f"Session budget of {self.limit} USD reached."
)
def remaining(self) -> float:
return max(0.0, self.limit - self.spent)

For team- or user-level limits, the guardrail lives in a shared store: a key per user, decremented on each API response, checked before each dispatch. When a session hits the limit, the correct behaviour is a structured handoff to human agents: surface the budget state to the caller and halt rather than silently dropping work or retrying on a depleted budget.

The CCAR-F exam rewards responses that stop predictably and surface state when a constraint is reached. Budget exhaustion is tested under the reliability theme in Domain 5: Context Management & Reliability, which carries 15% of the exam's weight across 60 items.

What does the CCAR-F exam test on model selection?

CCAR-F questions on model selection appear primarily in Domain 1 (Agentic Architecture & Orchestration, 27%) and Domain 5 (Context Management & Reliability, 15%), with secondary coverage in Domain 4 (Prompt Engineering & Structured Output, 20%). Per the official exam guide, each sitting draws 4 scenarios at random from a bank of 6, so model-selection reasoning can appear in any scenario involving a multi-agent coordinator.

The exam tests three specific judgements:

  • When to escalate from a smaller model to a larger one based on task stakes, not a fixed routing rule.
  • When to keep the decision pre-configured rather than asking the model to select its own successor.
  • How to stop predictably when a budget or context limit is reached, surfacing state rather than degrading silently.

The exam consistently rewards deterministic solutions over probabilistic ones when stakes are high, proportionate fixes, and root-cause tracing.

AI Skill Certs , CCAR-F Exam Facts

The exam also tests the hub-and-spoke architecture pattern. In a hub-and-spoke system, the coordinator owns model routing; subagents are assigned a model, they do not choose. A coordinator that sends every subtask to the same tier regardless of complexity is a narrow decomposition failure: it leaves both cost savings and performance improvements untouched.

The first optimisation pass in any system should be prompt engineering. A well-structured prompt with clear output constraints often lets you route a task to a cheaper tier without any quality loss. Model tier is the second lever, not the first. The CCAR-F exam reflects this ordering: prompt quality is a prerequisite skill, and architecture decisions built on weak prompts compound their failures across every tier.

Frequently asked questions

How do I validate whether a task is correctly routed to Claude Haiku?
Track retry rate per task type across at least a week of production traffic. If a task category retries heavily on Haiku, the model is underpowered for that task. Validate routing thresholds with real failure data, not intuition. Measure cost-per-accepted-output to confirm whether moving the task up a tier saves money overall despite the higher per-call price.
What metrics should I track to optimise Claude API costs in production?
Track cache hit rate (a low rate means you pay full price on reused inputs), retry rate per task type (high retries signal a model underpowered for the task), and cost per accepted output (total spend divided by outputs that passed your quality gate, not total API responses returned). These three signals reveal whether routing, caching, or quality thresholds are the root cause of excess spend.
Can I route tasks to different Claude models dynamically based on confidence?
Yes. Ask Claude to return a structured output that includes a confidence score alongside the answer. If the score falls below a threshold, escalate the same task to the next model tier. This keeps the cheapest model as the first pass for all incoming tasks, escalating only the minority that need stronger reasoning, which preserves most of the per-call cost advantage.
How does the CCAR-F exam weight model selection across its five domains?
Model selection appears across Domain 1 (Agentic Architecture & Orchestration, 27%), Domain 4 (Prompt Engineering & Structured Output, 20%), and Domain 5 (Context Management & Reliability, 15%). The exam tests when to escalate between tiers, when to use pre-configured routing over model-driven selection, and how to stop a session predictably when a budget or context limit is reached.
What is the difference between cost-per-token and cost-per-outcome?
Cost-per-token measures a single API call in isolation. Cost-per-outcome sums all tokens and retry overhead needed to produce one accepted unit of work. A model that costs more per call but finishes correctly in one attempt is often cheaper per completed task than a cheaper model that requires two or three retries to reach an acceptable output. Use cost-per-outcome to validate routing decisions.

People also ask

Which Claude model is best for production?
Sonnet is the most common production default because it balances reasoning quality and cost. Route high-volume deterministic tasks to Haiku to reduce spend, and reserve Opus or Fable for complex synthesis or high-stakes judgements where a wrong answer costs more than the additional model fee. Validate the split with retry rate data.
How do you reduce Claude API costs without losing quality?
Trim tool outputs before appending to context, route summarisation steps to Haiku, and use fresh subagent sessions for independent tasks to prevent token accumulation. Enable prompt caching and keep the static prefix stable to maximise cache hit rate. Track retry rate per task type weekly to find misrouted tasks that are eroding your per-call savings.
What is model routing in AI applications?
Model routing assigns each task to a specific model tier based on complexity, stakes, and cost tolerance. A coordinator holds a routing table mapping task types to models. Cheaper models handle deterministic tasks; expensive models handle high-stakes reasoning. The mapping is encoded in code, not left to the model to decide at runtime.
Should I use Claude Haiku or Sonnet for code generation?
Sonnet is the safer default for code generation. Code correctness is hard to verify cheaply and retry costs are high when a wrong snippet reaches downstream steps. Use Haiku only for narrow, templated code tasks where output is short, the format is highly constrained, and validation is automated and fast.

About the author

Solomon Udoh

AI Architect & Certification Lead

Solomon Udoh is an AI Architect who designs and ships production agent systems on the Claude API and Claude Code. He built AI Skill Certs' adaptive engine and authored its 174-concept knowledge graph, mapping every Claude Certified Architect - Foundations objective to hands-on, exam-aligned practice.

  • Designs production multi-agent systems on the Claude API and Agent SDK
  • Author of the AI Skill Certs knowledge graph (174 mapped exam concepts)
  • Builds with MCP, Claude Code, structured outputs, and agentic loops daily
  • Reviews every concept page against the official Anthropic exam guide

You might also like

Ready to put it into practice?

Study every exam concept with an adaptive tutor.

Start studying