Claude Model Selection: Opus vs Sonnet vs Haiku, Thinking and Effort
👋 In plain words: Claude comes in several models. Bigger ones are smarter but cost more and take longer; smaller ones are cheap and fast. On top of the model, an “effort” setting decides how hard Claude thinks. This lesson walks you through picking a model and an effort level for a real task, step by step.
Picking a model is a trade-off between quality, latency and cost, and the exam tests it with concrete numbers and constraints. In this lesson you will meet the current Claude models, read their capabilities from the Models API, learn how adaptive thinking and effort levels work on each, and follow a five-step method to choose a model and effort for a task, then prove the choice with a quick comparison.
🔑 Key terms
- Model tier: the size class of a model. Haiku is small and fast, Sonnet is balanced, Opus is large and most capable in its line, and Fable is Anthropic’s most capable widely released line.
- Adaptive thinking: Claude decides by itself whether and how much to reason before answering.
- Effort:
output_config.effort, one oflow,medium,high,xhigh,max. Higher effort means deeper thinking and more output tokens. - Model ID: the exact string you send, such as
claude-opus-5-5.
🪜 Step 1: Meet the current models
Anthropic’s model catalog lists these current models (prices are first-party API list prices per million tokens, November 2026):
| Model | ID | Context | Max output | Input / Output $ | Use it for |
|---|---|---|---|---|---|
| Claude Fable 5.2 | claude-fable-5-2 |
1M | 128K | $8 / $40 | The hardest reasoning and long-horizon agent work |
| Claude Opus 5.5 | claude-opus-5-5 |
1M | 128K | $4 / $20 | Default for complex work: coding, agents, analysis |
| Claude Sonnet 5.5 | claude-sonnet-5-5 |
1M | 128K | $2 / $10 | Everyday coding, agent and high-volume production work |
| Claude Haiku 5.5 | claude-haiku-5-5 |
1M | 128K | $0.10 / $0.50 (≤100K prompt) | Fast, simple, high-volume tasks: classification, routing, extraction |
Older models such as Claude Opus 4.8, Sonnet 4.6 and Haiku 4.5 are still served, but new projects should start with the current ones.
claude-opus-5.5 returns a 404 (you saw this in Lesson 4).🪜 Step 2: Read capabilities from the Models API
Hard-coded tables go out of date. The Models API returns each model’s limits, and its capabilities tree tells you whether a model supports features such as vision, adaptive thinking or structured outputs.
📄 list_models.py
import anthropic
client = anthropic.Anthropic()
for m in client.models.list():
print(f"{m.id:<20} {m.display_name:<18} context {m.max_input_tokens:>9,} output {m.max_tokens:>7,}")⌨️ Terminal
python list_models.py🖥️ Output (sample run)
claude-opus-5-5 Claude Opus 5.5 context 1,000,000 output 128,000
claude-sonnet-5-5 Claude Sonnet 5.5 context 1,000,000 output 128,000
claude-haiku-5-5 Claude Haiku 5.5 context 1,000,000 output 128,000
In your own code, check capabilities before you depend on a feature, for example m.capabilities["thinking"]["types"]["adaptive"]["supported"]. The capabilities value is a plain dictionary, so use square brackets.
🪜 Step 3: Understand thinking on each model
On current models, thinking is on by default and adaptive: Claude decides how much to reason. The rules differ by model, and the exam likes these details:
| Model | Thinking | How to reduce it |
|---|---|---|
| Opus 5.5 | Always on (adaptive). {"type": "disabled"} and budget_tokens return 400. |
Lower effort. Default effort is medium. |
| Sonnet 5.5 | Adaptive by default. {"type": "disabled"} returns 400. |
Lower effort (default high), or send {"type": "between_tools"} at effort high or below to turn thinking off. |
| Haiku 5.5 | Adaptive by default. disabled only at effort high or below. |
Lower effort. Default effort is medium. |
| Fable 5.2 | Always on. Any explicit setting other than adaptive returns 400. | Lower effort (default high). |
Two more facts:
budget_tokensis the old way to set a fixed thinking budget. It is rejected on the current models and replaced by effort levels.- Thinking text is hidden by default (
display: "omitted"): you get thinking blocks with empty text, but you are still billed for the thinking. Setthinking={"type": "adaptive", "display": "summarized"}to receive a readable summary.
📄 thinking_summary.py
import anthropic
client = anthropic.Anthropic()
response = client.messages.create(
model="claude-opus-5-5",
max_tokens=4000,
thinking={"type": "adaptive", "display": "summarized"},
output_config={"effort": "high"},
messages=[{"role": "user", "content": "A login test fails only on CI at 00:00 UTC. Give the single most likely cause."}],
)
for block in response.content:
if block.type == "thinking":
print("THINKING SUMMARY:", block.thinking)
elif block.type == "text":
print("ANSWER:", block.text)⌨️ Terminal
python thinking_summary.py🖥️ Output (sample run)
THINKING SUMMARY: Failure only at midnight UTC points to date logic: a session or token expiry computed with the local date, or a date rollover between test setup and assertion.
ANSWER: A date rollover: the test computes a date or session expiry before midnight and checks it after, so the values no longer match.
🪜 Step 4: Choose an effort level
Effort is the first lever for quality versus cost within one model:
| Effort | Good for |
|---|---|
low |
Chat, classification, routing, simple extraction, subagents doing simple work |
medium |
A cost-saving step down where quality holds; default on Opus 5.5 and Haiku 5.5 |
high |
Intelligence-sensitive work; often the best balance |
xhigh |
Hard coding and long agentic tasks on models that benefit from it |
max |
When correctness matters far more than time and cost |
📄 effort_low.py
import anthropic
client = anthropic.Anthropic()
response = client.messages.create(
model="claude-haiku-5-5",
max_tokens=20,
output_config={"effort": "low"},
messages=[{"role": "user", "content": "Label this ticket as bug, feature or question: 'Add dark mode to the dashboard'"}],
)
print(response.content[0].text, "| output tokens:", response.usage.output_tokens)⌨️ Terminal
python effort_low.py🖥️ Output (sample run)
feature | output tokens: 10
output_config, not at the top level of the request. Lower effort means fewer tool calls, less preamble and fewer thinking tokens. Before building a multi-model cascade, Anthropic recommends measuring the simpler option first: the most capable model at a lower effort.🪜 Step 5: Follow a five-question selection method
- What quality does the task need? Write down the acceptance criteria. Use an evaluation to measure it (Module 11).
- What are the hard constraints? Latency (for example a chat reply in under 3 seconds), cost per request, data rules, platform.
- Start with the default, Claude Opus 5.5, and measure quality, latency and cost on a sample of real inputs.
- Step down in effort first, then in tier (Sonnet 5.5, Haiku 5.5), and keep the cheapest option that still meets the quality bar.
- Judge cost per completed task, not per request. A cheaper model that needs more retries or turns can cost more overall.
This helper applies the hard constraints from question 2 to a candidate list. The candidate numbers would come from your own measurements:
📄 pick_model.py
# Measured on 50 real tickets (example numbers from a team's own eval run)
CANDIDATES = [
# model, effort, accuracy, p90 latency (s), cost per 1,000 tickets ($)
("claude-opus-5-5", "medium", 0.97, 6.0, 9.80),
("claude-sonnet-5-5", "low", 0.95, 2.4, 3.10),
("claude-haiku-5-5", "low", 0.91, 0.9, 0.20),
]
MIN_ACCURACY, MAX_P90_SECONDS = 0.94, 3.0
ok = [c for c in CANDIDATES if c[2] >= MIN_ACCURACY and c[3] <= MAX_P90_SECONDS]
best = min(ok, key=lambda c: c[4])
for c in CANDIDATES:
status = "PASS" if c in ok else "fail"
print(f"{status} {c[0]:<18} effort={c[1]:<7} acc={c[2]:.2f} p90={c[3]}s ${c[4]:.2f}/1k")
print("choose:", best[0], "at effort", best[1])⌨️ Terminal
python pick_model.py🖥️ Output
fail claude-opus-5-5 effort=medium acc=0.97 p90=6.0s $9.80/1k
PASS claude-sonnet-5-5 effort=low acc=0.95 p90=2.4s $3.10/1k
fail claude-haiku-5-5 effort=low acc=0.91 p90=0.9s $0.20/1k
choose: claude-sonnet-5-5 at effort low
- Haiku is cheapest but misses the accuracy bar; Opus is most accurate but too slow for the latency limit. Sonnet at low effort meets both, at the lowest cost that passes.
- The numbers are inputs from your evaluation, not general truths. Re-run them when a new model is released (Lesson 42).
🌍 Real-world example: Ravi picks models for two features
Ravi’s nightly failure-analysis job has no latency limit and must be accurate, so he keeps Opus 5.5 at high effort and runs it through the Batches API to halve the cost. The Slack bot that labels questions needs answers in about a second, so it runs Haiku 5.5 at low effort, and anything it labels “unsure” is passed to Sonnet 5.5.
🪜 Step 6: Handle refusals and fallbacks
Safety classifiers may decline a request. The reply then has HTTP 200 with stop_reason: "refusal", and stop_details gives a category. Always check stop_reason before reading content. For some current models, Anthropic offers a server-side fallback (beta) that re-runs a declined request on another model in the same call. Read the model’s documentation before relying on it, because availability differs by model and platform.
🧪 Practice Questions
Question 1. A team sends thinking={“type”: “disabled”} to Claude Opus 5.5 to cut latency and gets a 400 error. What should they do instead?
- A. Use budget_tokens: 0
- B. Omit the thinking setting and lower output_config.effort
- C. Switch to temperature 0
- D. Send thinking as a system message
Show answer
Answer: B. Thinking cannot be disabled on Opus 5.5 and budget_tokens is rejected. Effort is the control for thinking depth and token spend.
Question 2. A classification route needs 95% accuracy and p90 latency under 2 seconds. Measurements: Opus 5.5 medium 98%/5s, Sonnet 5.5 low 96%/1.6s, Haiku 5.5 low 92%/0.7s. Which should you choose?
- A. Opus 5.5, because it is most accurate
- B. Sonnet 5.5 at low effort, because it is the cheapest option meeting both constraints
- C. Haiku 5.5, because it is fastest
- D. Any of them; constraints do not matter
Show answer
Answer: B. Opus breaks the latency limit and Haiku misses the accuracy bar. Sonnet at low effort satisfies both.
Question 3. A developer sees empty thinking blocks in responses from Claude Opus 5.5 and wants to show a reasoning summary to users. What setting fixes this?
- A. effort “max”
- B. thinking={“type”: “adaptive”, “display”: “summarized”}
- C. stop_sequences=[““]
- D. A larger max_tokens
Show answer
Answer: B. Thinking display defaults to omitted on current models. “summarized” returns readable summaries. Thinking is billed either way.
Question 4. Which two are good practices when choosing a model tier? (Choose 2.)
- A. Measure quality on real inputs before stepping down to a cheaper tier
- B. Always pick the cheapest model per token
- C. Compare cost per completed task, including retries and extra turns
- D. Hard-code context sizes instead of reading them from the Models API
Show answer
Answer: A and C. Choices should be backed by evaluation data and judged on total task cost. Live limits belong in the Models API, not hard-coded tables.
📝 Assignment
- Task 1: Pick one task from your work and write its acceptance criteria and hard constraints (quality, latency, cost).
✅ Done when: you have at least one measurable number for each. - Task 2: Run
effort_low.pywith Haiku 5.5 atlowand Opus 5.5 athighon the same 10 tickets with your key, and record accuracy and output tokens.
✅ Done when: you have a small table comparing the two. - Stretch: Feed your own measurements into
pick_model.pyand add a rule that rejects any candidate whose cost per 1,000 is over a budget.
✅ Done when: the script picks a model for your task and prints why the others failed.
❓ Frequently Asked Questions
🤔 Which Claude model is best for coding?
For most coding and agent work, start with Claude Opus 5.5. Claude Fable 5.2 is for the hardest long-horizon tasks, and Sonnet 5.5 is a strong, cheaper option for everyday coding.
🤔 What is the difference between Opus, Sonnet and Haiku?
They are tiers of size and price. Opus is most capable and most expensive, Sonnet balances quality and cost, and Haiku is fastest and cheapest for simple, high-volume tasks.
🤔 What does effort do in the Claude API?
output_config.effort controls how deeply Claude thinks and how many tokens it spends, from low to max. It is the main quality-versus-cost control on current models.
🤔 Can I still use budget_tokens for extended thinking?
Not on current models such as Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.2, where it returns a 400. Use adaptive thinking with effort levels.
🏁 Summary
- Current models: Fable 5.2 ($8/$40), Opus 5.5 ($4/$20, the default), Sonnet 5.5 ($2/$10), Haiku 5.5 ($0.10/$0.50).
- Read limits and capabilities from the Models API; use exact model IDs.
- Thinking is adaptive and on by default; control it with
output_config.effort, notbudget_tokens. - Choose by measured quality against hard constraints, stepping down effort before tier.
- Always check
stop_reason, includingrefusal, before using content.
Next, continue with Claude Streaming in Python: Events, message_stop and Stop Reasons.
Independent study material by SQA Tools. Not affiliated with, endorsed by or sponsored by Anthropic. Claude is a trademark of Anthropic. Practice questions are original, not real exam content. Code outputs marked “sample run” come from running the exact code against a local stand-in for the Claude API, so real replies, IDs and token counts will differ. Exam facts checked against Anthropic’s official CCDV-F exam guide v1.1 on 24 Nov 2026.