CONCEPT Three models, one rule
Every request in an agentic system carries a model choice, and that choice is your single biggest cost/latency lever. The rule is simple and the exam tests it relentlessly: match the model to the difficulty of the task — don't pay Opus prices for a Haiku-shaped job, and don't starve a hard reasoning task on Haiku.
| Model | When to reach for it | Price (per 1M in / out) |
|---|---|---|
| claude-opus-4-8 | Default. Hardest reasoning & agentic work — the orchestrator, tricky multi-step planning, ambiguous tasks. | $5 / $25 |
| claude-sonnet-4-6 | Best speed/intelligence balance. High-volume work that still needs solid reasoning; most production request paths. | $3 / $15 |
| claude-haiku-4-5 | Fastest & cheapest. Simple, well-scoped, or parallel sub-tasks — classification, extraction, routing, fan-out workers. | $1 / $5 |
claude-opus-4-8,
claude-sonnet-4-6, claude-haiku-4-5. Never append a date suffix; the model
id is the id.DIAGRAM Per-role selection in a multi-agent system
The classic pattern: an Opus orchestrator plans and delegates; Haiku workers fan out over simple parallel sub-tasks; a Sonnet role handles the high-volume middle.
claude-opus-4-8
plan · decompose · synthesize"] O --> W1["🟢 Worker
claude-haiku-4-5
fetch page 1"] O --> W2["🟢 Worker
claude-haiku-4-5
fetch page 2"] O --> S["🔵 Summarizer
claude-sonnet-4-6
high-volume merge"] W1 --> O W2 --> O S --> O O --> A([Final answer]) classDef opus fill:#e2d4f0,stroke:#764ba2,color:#3d1a5b; classDef son fill:#d1ecf1,stroke:#17a2b8,color:#0c5460; classDef hai fill:#d4edda,stroke:#28a745,color:#155724; class O opus; class S son; class W1 hai; class W2 hai;
CODE Choosing a model per role
Because POST /v1/messages is stateless, the model is just a
per-request parameter — nothing stops you from mixing tiers across one logical run. Keep the mapping
in one place so roles, not call sites, decide the tier.
# One source of truth: role → model. Match model to task difficulty. MODEL_FOR = { "orchestrator": "claude-opus-4-8", # hardest reasoning / planning "summarizer": "claude-sonnet-4-6", # high-volume, balanced "extractor": "claude-haiku-4-5", # simple, parallel sub-task } def run_role(role, prompt, max_tokens=1024): # The model is a per-request param — the API is stateless, so mixing tiers is free. return client.messages.create( model=MODEL_FOR[role], max_tokens=max_tokens, messages=[{"role": "user", "content": prompt}], ) plan = run_role("orchestrator", task, max_tokens=4096) # Opus fields = run_role("extractor", page_text) # Haiku, cheap fan-out digest = run_role("summarizer", joined_results) # Sonnet
TRADE-OFFS Cheaper model vs. stronger model
✅ Drop to Haiku / Sonnet when…
- The sub-task is simple, scoped, or highly parallel
- Volume is high and per-call quality tolerance is generous
- Latency matters more than deep reasoning
⚠️ …but a too-weak model can cost more
- Retries, longer outputs, and failed runs erase the savings
- An under-powered orchestrator makes bad tool decisions
- Resolution rate (7.6) drops — the real cost metric
EXAM TRAPS
claude-opus-4-8-20250101 or similar. → The exact id has
no date suffix; a dated id is wrong.PRACTICE
Q1 · A pipeline fans out 500 independent "extract the date from this line" calls, then does one hard synthesis. How do you assign models?
The 500 extractions are simple and parallel → claude-haiku-4-5. The single hard synthesis needs the strongest reasoning → claude-opus-4-8. This is the orchestrator+workers shape: cheap fan-out, strong center.
Q2 · Your team wants "one model for everything" to simplify ops. What's the architect's response?
The API is stateless, so per-request model choice costs nothing operationally — centralize the role→model map in one place instead. Uniform Opus overpays on simple work; uniform Haiku starves hard tasks. Match model to task difficulty per role.
Q3 · Which model is the documented default when you're unsure?
claude-opus-4-8. Start there for the hardest reasoning and agentic work, then down-tier roles that measurably tolerate a cheaper model.