Chapter 3: Claude Model Selection and Tradeoffs

Learning Objectives

Pre-Quiz — The Claude Model Families

1. What does the term "model tier" refer to in the Claude family?

A single specific model version number that never changes
A capability-and-cost band (Opus, Sonnet, Haiku) that persists across generations
The context-window size available for a given request
The geographic region where the model is served

2. A team needs a real-time chat assistant where a person waits on every keystroke. Which tier is the poorest fit despite its reasoning strength?

Haiku
Sonnet
Opus
All tiers are equally suited

3. Which distinctive advantage does Claude Sonnet 4.6 hold over both Opus and Haiku?

The lowest per-token output price of any tier
A 1M-token context window at no surcharge
The fastest raw token-per-second throughput
The only tier that supports images

4. Roughly what share of typical production queries can Haiku handle, according to the chapter?

10–20%
30–40%
50–60%
70–80%

1. The Claude Model Families

Key Points

Opus for Maximum Capability

Opus is Anthropic's most capable tier — the senior specialist reserved for problems no one else can crack: multi-hour autonomous agents, complex refactors spanning 50+ files, financial modeling, and high-consequence research synthesis. It sustains logical coherence across long outputs (10,000+ tokens), but carries the highest latency, making it a poor fit for real-time chat. Its natural home is batch and asynchronous work. The current model is Claude Opus 4.8 (claude-opus-4-8), launched May 28, 2026, priced at $5.00 / $25.00 per million tokens (Fast Mode: $10 / $50).

Sonnet for Balanced Performance

Sonnet is the balanced middle tier and the recommended default for most production use cases — near-Opus quality at faster latency and lower cost. The current model, Claude Sonnet 4.6 (claude-sonnet-4-6), is priced at $3.00 / $15.00 per million tokens and ships a 1M-token context window at no surcharge. The practical guidance: start with Sonnet; move up to Opus only when you measure a quality gap, and down to Haiku only when you measure a cost or latency problem.

Haiku for Speed and Cost Efficiency

Haiku is the fastest and most cost-efficient tier, built for high-volume, latency-sensitive workloads: classification, routing, extraction, summarization, and moderation. Claude Haiku 4.5 (claude-haiku-4-5) is priced at $1.00 / $5.00 per million tokens, averages ~110 tokens/second (2–3x faster than Sonnet, 4–5x faster than Opus), and hits sub-1.5-second p95 latency for chat. Roughly 70–80% of typical production queries can be handled by Haiku.

The Comparison Matrix

DimensionOpus 4.8Sonnet 4.6Haiku 4.5
Model IDclaude-opus-4-8claude-sonnet-4-6claude-haiku-4-5
CapabilityHighest — deep multi-step reasoningHigh — near-Opus on most tasksModerate — fast, focused tasks
Input / 1M$5.00 (Fast: $10)$3.00$1.00
Output / 1M$25.00 (Fast: $50)$15.00$5.00
Context window200K tokens1M tokens (no surcharge)200K tokens
Relative speedSlowest (~1x baseline)MiddleFastest (~110 tok/s; sub-1.5s p95)
Latency profileHigh — batch/async onlyBalanced — production defaultLowest — real-time viable
Multimodal (images)YesYesYes
Best for50+ file refactors, long-horizon agents, high-consequence synthesisCoding, analysis, writing, RAG, customer-facing appsClassification, routing, extraction, summarization, moderation, sub-agents
Rule of thumbReserve for reasoning depth worth the costStart hereServes 70–80% of production queries
flowchart LR H["Haiku
fastest, cheapest
moderate capability"] --> S["Sonnet
balanced default
1M context"] S --> O["Opus
highest capability
highest latency & cost"]
[Animation slot: an interactive slider along the Haiku → Sonnet → Opus axis, showing capability rising while speed falls and cost climbs as the user drags between tiers.]
Post-Quiz — The Claude Model Families

1. What does the term "model tier" refer to in the Claude family?

A single specific model version number that never changes
A capability-and-cost band (Opus, Sonnet, Haiku) that persists across generations
The context-window size available for a given request
The geographic region where the model is served

2. A team needs a real-time chat assistant where a person waits on every keystroke. Which tier is the poorest fit despite its reasoning strength?

Haiku
Sonnet
Opus
All tiers are equally suited

3. Which distinctive advantage does Claude Sonnet 4.6 hold over both Opus and Haiku?

The lowest per-token output price of any tier
A 1M-token context window at no surcharge
The fastest raw token-per-second throughput
The only tier that supports images

4. Roughly what share of typical production queries can Haiku handle, according to the chapter?

10–20%
30–40%
50–60%
70–80%
Pre-Quiz — Quality, Latency, and Cost Tradeoffs

1. What is the governing principle for mapping tasks to tiers?

Always use the most powerful model to be safe
Match model capability to task complexity
Always use the cheapest model and escalate only on failure
Pick the model with the largest context window

2. In the customer-support pipeline example, which tier drafts a routine billing reply using retrieved policy documents?

Haiku
Sonnet
Opus
No model — it is handled with a static template

3. On the newest models (Opus 4.8, Opus 4.7, Sonnet 5), how must thinking be configured?

With the fixed-budget syntax type enabled, budget_tokens N
With adaptive thinking (type adaptive); the old fixed-budget syntax returns a 400
Thinking cannot be enabled on these models
By setting a high temperature value

4. What is the best first question when deciding a tier under the quality/latency/cost triangle?

Which model has the newest release date?
Which pressure dominates — is a human waiting, or is quality the whole point?
Which model is cheapest per token?
Which model my competitor uses

2. Quality, Latency, and Cost Tradeoffs

Key Points

Mapping Task Complexity to Model Tier

Task complexityExample tasksRecommended tierWhy
LowSentiment classification, intent routing, field extraction, short summaries, moderationHaikuReasoning depth is minimal; speed and cost dominate.
MediumCode generation, document analysis, support chat, RAG answers, agent prototypesSonnetBalanced capability meets the bar without Opus's cost or latency.
High50+ file refactors, long-chain planning, financial modeling, multi-hour agents, high-consequence synthesisOpusOnly sustained deep reasoning produces reliable results; the stakes justify the cost.

Worked example — a support pipeline uses all three tiers: (1) Haiku classifies the ticket in under 1.5s; (2) Sonnet drafts a routine billing reply over retrieved policy docs, its 1M window holding the corpus; (3) Opus handles an escalated technical case reasoning across full history, three log files, and a config diff. This is right-sizing — the better question is "which model for this step?"

Latency-Sensitive vs. Quality-Sensitive Workloads

Latency-sensitive workloads put a human in the loop, waiting — live chat, autocomplete, voice interfaces. Haiku's sub-1.5s p95 is a feature you can feel; Opus's high latency is disqualifying regardless of answer quality. Quality-sensitive workloads run in the background, where extra seconds cost nothing perceptible — overnight migrations, batch analysis, research synthesis. Here Opus shines. Name the dominant pressure first, then choose.

Adaptive Thinking Support by Model

Modern Claude models support adaptive thinking (thinking: {"type": "adaptive"}), where the model decides how much internal reasoning to perform, steered by output_config: {"effort": "low" | "medium" | "high" | "max"}. This is another lever on the triangle. The versioning wrinkle:

flowchart TD W["Incoming workload"] --> P{"Which pressure
dominates?"} P -->|"Human is waiting
(latency-sensitive)"| L["Favor Haiku or Sonnet
Opus disqualified from request path"] P -->|"Background job,
quality is the point"| Qs["Favor Opus
latency is a non-issue"]
[Animation slot: a draggable quality–latency–cost triangle where pulling one vertex visibly trades off the other two, illustrating that no tier maximizes all three.]
Post-Quiz — Quality, Latency, and Cost Tradeoffs

1. What is the governing principle for mapping tasks to tiers?

Always use the most powerful model to be safe
Match model capability to task complexity
Always use the cheapest model and escalate only on failure
Pick the model with the largest context window

2. In the customer-support pipeline example, which tier drafts a routine billing reply using retrieved policy documents?

Haiku
Sonnet
Opus
No model — it is handled with a static template

3. On the newest models (Opus 4.8, Opus 4.7, Sonnet 5), how must thinking be configured?

With the fixed-budget syntax type enabled, budget_tokens N
With adaptive thinking (type adaptive); the old fixed-budget syntax returns a 400
Thinking cannot be enabled on these models
By setting a high temperature value

4. What is the best first question when deciding a tier under the quality/latency/cost triangle?

Which model has the newest release date?
Which pressure dominates — is a human waiting, or is quality the whole point?
Which model is cheapest per token?
Which model my competitor uses
Pre-Quiz — Model Releases and Versioning

1. What does a dateless model ID like claude-opus-4-8 represent?

An evergreen pointer that always routes to the latest model
A fixed, pinned, immutable snapshot — not an evergreen pointer
A model whose weights are updated in place over time
A placeholder that must be replaced with a dated ID before use

2. On Opus 4.7 and later, what happens if you set temperature to a non-default value?

The value is silently ignored
The request returns a 400 error
The model automatically falls back to an older version
The value is clamped to the maximum allowed

3. What happens when a request targets a retired model ID?

It is transparently redirected to the recommended replacement
It fails with errors, not redirects
It runs at a reduced rate limit but still succeeds
It returns a warning header but the response is normal

4. You notice minor behavioral drift on a model ID whose weights have not changed. What is the most likely cause?

Anthropic quietly retrained the model behind the ID
A serving-infrastructure update (router, safety classifiers, sampling logic)
The context window shrank
Your API key was downgraded

5. How much notice do customers with active deployments get before a publicly released model is retired?

At least 60 days
Exactly 7 days
No advance notice
At least 2 years

3. Model Releases and Versioning

Key Points

Model IDs Are Pinned Snapshots

ID exampleFormatBehavior
claude-opus-4-8Dateless (4.6-gen+)A fixed, pinned snapshot — not an evergreen pointer
claude-sonnet-4-6Dateless (4.6-gen+)A fixed, pinned snapshot
claude-sonnet-4-5-20250929Dated snapshotA fixed, pinned snapshot
claude-sonnet-4-5 (no date)Older-gen aliasEvergreen pointer to the latest dated snapshot for that minor version

Breaking Behavior Changes Across Releases

Breaking changeAffected modelsFailure modeFix
temperature / top_p / top_k non-defaultOpus 4.7+, Opus 4.8, Sonnet 5400 errorRemove the parameter; steer with prompting
thinking: {"type": "enabled", "budget_tokens": N}Opus 4.7+, Opus 4.8, Sonnet 5400 errorUse thinking: {"type": "adaptive"}
Assistant-turn prefill (last message is assistant)4.6-family, 4.7, 4.8, Sonnet 5400 errorUse structured outputs or a system-prompt instruction

These changes are silent in source code and loud at runtime: deprecated parameters often remain in SDK request types, so code type-checks and compiles — but a value that worked on Sonnet 4.6 throws a 400 on Sonnet 5. A migration that only swaps the model-ID string will pass review and fail on the first live request.

The Model Lifecycle and Deprecation Policy

StageMeaningYour action
ActiveFully supported and recommendedBuild freely
LegacyNo longer updated; may be deprecated laterPlan ahead; evaluate successors
DeprecatedStill functional but not recommended; has a replacement and retirement dateMigrate before the retirement date
RetiredNo longer available; requests fail with errors, not redirectsToo late — you should have migrated

For publicly released models, customers with active deployments get at least 60 days' notice before retirement. Note: first-party retirement dates apply to Anthropic-operated platforms; Amazon Bedrock and Google Cloud set their own schedules.

stateDiagram-v2 [*] --> Active Active --> Legacy: No longer updated Legacy --> Deprecated: Retirement date assigned
(60+ days notice) Deprecated --> Retired: Retirement date reached Retired --> [*] note right of Active Fully supported — build freely end note note right of Deprecated Still works but not recommended; migrate before the deadline end note note right of Retired Requests fail with errors, not redirects end note
[Animation slot: a timeline widget stepping a model ID through Active → Legacy → Deprecated → Retired, showing the 60-day notice window and a request flipping from success to a hard error at retirement.]
Post-Quiz — Model Releases and Versioning

1. What does a dateless model ID like claude-opus-4-8 represent?

An evergreen pointer that always routes to the latest model
A fixed, pinned, immutable snapshot — not an evergreen pointer
A model whose weights are updated in place over time
A placeholder that must be replaced with a dated ID before use

2. On Opus 4.7 and later, what happens if you set temperature to a non-default value?

The value is silently ignored
The request returns a 400 error
The model automatically falls back to an older version
The value is clamped to the maximum allowed

3. What happens when a request targets a retired model ID?

It is transparently redirected to the recommended replacement
It fails with errors, not redirects
It runs at a reduced rate limit but still succeeds
It returns a warning header but the response is normal

4. You notice minor behavioral drift on a model ID whose weights have not changed. What is the most likely cause?

Anthropic quietly retrained the model behind the ID
A serving-infrastructure update (router, safety classifiers, sampling logic)
The context window shrank
Your API key was downgraded

5. How much notice do customers with active deployments get before a publicly released model is retired?

At least 60 days
Exactly 7 days
No advance notice
At least 2 years
Pre-Quiz — Decision Frameworks for Model Choice

1. Which set correctly names the four decision dimensions for model choice?

Region, language, token limit, SDK version
Task complexity, latency sensitivity, cost at scale, output quality requirements
Model age, popularity, context window, image support
Prompt length, temperature, top_p, top_k

2. In the cascade pattern, which model attempts the task first?

Opus
Sonnet
Haiku
A random tier chosen per request

3. Roughly how much can tiered routing cut costs compared to running everything through Opus?

5–10%
20–30%
50–70%
Over 95%

4. Why can changing the model mid-conversation be costly?

It permanently deletes the conversation history
It invalidates the prompt cache, since caches are model-scoped
It doubles the output token price
It forces a switch to a smaller context window

5. Which is described as the single most expensive mistake in Claude application design?

Running everything through Opus "to be safe"
Using prompt caching on stable prefixes
Defaulting to Sonnet for production
Using the Batch API for asynchronous jobs

4. Decision Frameworks for Model Choice

Key Points

The Four Decision Dimensions

  1. Task complexity — how much reasoning depth does the task genuinely require?
  2. Latency sensitivity — is a human waiting on the response in real time?
  3. Cost at scale — what does this cost when multiplied by traffic volume?
  4. Output quality requirements — what is the cost of a wrong answer?
flowchart TD Start["New workload"] --> Q1{"Task complexity?"} Q1 -->|"Low: classify, extract, route, summarize"| Haiku["Choose Haiku"] Q1 -->|"High: cross-file refactor, long-chain planning, high-stakes synthesis"| Q2{"Is a human waiting
in real time?"} Q1 -->|"Medium: coding, analysis, RAG, support chat"| Sonnet["Choose Sonnet (default)"] Q2 -->|"Yes: latency-sensitive path"| Sonnet Q2 -->|"No: batch / async job"| Opus["Choose Opus"] Haiku --> Check{"Quality gap or
volume/latency issue?"} Sonnet --> Check Opus --> Check Check -->|"Measure, then escalate or drop a tier"| Route["Right-sized tier"]

Cost Modeling Per Tier

TierInput / 1MOutput / 1M
Opus 4.8$5.00$25.00
Sonnet 4.6$3.00$15.00
Haiku 4.5$1.00$5.00

Two cost features apply across all tiers: batch processing is 50% cheaper, and prompt caching cuts cached input cost by up to 90%. Worked example — extracting fields from 1M documents (2,000 in / 200 out each): on Opus ≈ $15,000; on Haiku ≈ $3,000 (5x saving, no quality loss); on Haiku + Batch API ≈ $1,500 — a 90% reduction, because the task never needed Opus. Tiered routing can cut costs 50–70% versus running everything through Opus.

Escalation and Fallback Patterns

The cascade pattern attempts the task with Haiku first, escalating to Sonnet or Opus only on low confidence or a failed validation. First-pass filtering runs Haiku as a cheap classifier, sending only qualified inputs to the more capable tiers. One caution: changing the model mid-conversation invalidates the prompt cache (caches are model-scoped) — a common workaround is to spawn a cheaper-model sub-agent for the sub-task while keeping the main loop pinned to one model.

flowchart TD Req["Incoming request"] --> H["Haiku attempt"] H --> HC{"Confident & valid?"} HC -->|Yes| Done1["Return answer"] HC -->|"No / low confidence / failed validation"| S["Sonnet attempt"] S --> SC{"Confident & valid?"} SC -->|Yes| Done2["Return answer"] SC -->|"Still insufficient: high-stakes reasoning"| O["Opus attempt"] O --> Done3["Return answer"]

Right-Sizing the Model to the Workload

The checklist: (1) default to Sonnet; (2) measure before escalating to Opus; (3) measure before dropping to Haiku (which serves 70–80% of queries); (4) route, don't guess; (5) layer in batch and caching. The anti-pattern to internalize is running everything through Opus "to be safe" — the costliest default there is.

[Animation slot: an interactive cost calculator where the user sets volume, in/out tokens, and tier, then toggles batch (50% off) and caching (90% off) to watch the total bill drop in real time.]
Post-Quiz — Decision Frameworks for Model Choice

1. Which set correctly names the four decision dimensions for model choice?

Region, language, token limit, SDK version
Task complexity, latency sensitivity, cost at scale, output quality requirements
Model age, popularity, context window, image support
Prompt length, temperature, top_p, top_k

2. In the cascade pattern, which model attempts the task first?

Opus
Sonnet
Haiku
A random tier chosen per request

3. Roughly how much can tiered routing cut costs compared to running everything through Opus?

5–10%
20–30%
50–70%
Over 95%

4. Why can changing the model mid-conversation be costly?

It permanently deletes the conversation history
It invalidates the prompt cache, since caches are model-scoped
It doubles the output token price
It forces a switch to a smaller context window

5. Which is described as the single most expensive mistake in Claude application design?

Running everything through Opus "to be safe"
Using prompt caching on stable prefixes
Defaulting to Sonnet for production
Using the Batch API for asynchronous jobs

Your Progress

Answer Explanations