Imagine a auto repair shop. You don't use a pneumatic impact wrench to tighten an eyeglass screw, or a screwdriver to remove a truck wheel. Every job has the right tool â and using one that's too expensive is wasteful, while using one that's too weak means rework. With a subagent fleet is the same: the agentâs role determines the model. Whoever scans 200 files call for speed and low cost; whoever reason on an irreversible decision, you want the strongest engine. The map below is the heart of this module: a role Ă model matrix.
â The role Ă model matrix: each role lands in the column for the right engine. Highlighted pill = recommended default; dashed = second opinion from another provider.
Detailed content
đȘ Opus, Sonnet, and Haiku â a ladder of roles
The Claude family comes in three sizes, and each has a sweet spot. Haiku is the fast worker: scans, searches, summarizes, reads documentation. Sonnet is the everyday professional: builds and reviews code. Opus is the architect: reasons through difficult decisions, analyzes security, thinks deeply. Itâs not âOpus is better, so Iâll use Opus for everythingââitâs âthe role calls for this engine.â
đ§ The workshop rule
The right engine is cheapest model that can still handle the role. Moving up to a more powerful model without need wastes money and time; moving too far down means poor work. Think in three tiers:
- âąHaiku â mechanical, high-volume roles: scanning, grep, listing, summarizing long docs.
- âąSonnet â craft roles: writing code, refactoring, reviewing a diff, generating tests.
- âąOpus â judgment roles: architecture, security, irreversible decisions, complex plans.
The three levels of the Claude family organized by role, not by asking "which one is best." Each level trades cost and latency for reasoning depth.
An all-Opus fleet blows the budget and runs slowly; an all-Haiku fleet delivers shallow analysis where judgment is needed. The ladder avoids both extremes.
Role Ă engine · âthe cheapest that gets the job doneâ · Haiku â Sonnet â Opus ladder.
đ GPT and Codex â the second provider
The fleet doesnât need to consist of just one family. The models GPT and the environment Codex (OpenAI CLI, covered in module 4.2) come in as a second look: a reviewer who thinks differently from the builder. Different families make different kinds of mistakes â so a finding that two providers confirm itâs much more reliable.
vocĂȘ > O Sonnet acabou de escrever este mĂłdulo de auth.
Peça a um revisor em GPT/Codex pra refutar:
onde isso quebra? SĂł os furos, sem reescrever.
# construtor (Sonnet) e revisor (outra famĂlia) erram
# de formas diferentes â a divergĂȘncia Ă© o valor.
# o que os DOIS apontam é o que merece atenção.
đ°ïž Why mix providers
One shared bias is the enemy: if the builder and reviewer are the same model, they tend to "agree with their own mistake." Switching model families for the reviewer role is the cheap way to buy independenceâthe topic of adversarial verification from module 4.1.
đ Other providers â think in terms of capabilities, not brands
Beyond Anthropic and OpenAI, thereâs an entire market â Google (Gemini), open models running locally, specialized providers. The mistake is memorizing names; the right approach is to think in terms of capability. For your matrix, every model falls into one of three classes, and you fit the role into the classânot the brand of the week.
"fast & cheap" class
Haiku · small/local models
High volume, low judgment required: scan, classify, extract, summarize.
"balanced" class
Sonnet · general-purpose GPT · Gemini Pro
The workhorse: building, reviewing, and handling most day-to-day tasks.
"deep reasoning" class
Opus · reasoning GPT · cutting-edge Gemini
Costly, irreversible decisions: architecture, security, long-term plans.
đ Think in terms of slots, not names
New models come out all the time. If your matrix is by class (fast / balanced / reasoning), changing a cellâs model is just swapping the occupant of the slot â the fleet architecture doesnât change. Thatâs what keeps the system running for months, not days.
âïž Deep reasoning Ă cheap and fast
Here's the central tension. A strong model thinks even more deeply, but it costs more and takes longer. A lightweight model is cheap and instant, but shallow. Thereâs no free lunch: you choose where to spend your reasoning depth. The operational question is simple â Is the cost of getting this role wrong high? If so, move up. If not, move down.
â Move up a model whenâŠ
- âThe mistake is costly or irreversible (security, money, architecture)
- âThe task requires judgment and synthesis, not just execution
- âThe context is ambiguous and needs careful interpretation
- âItâs a single, decisive step, not 200 repetitions
â Move down a model whenâŠ
- âThe task is mechanical and well-defined (grep, list, extract)
- âThe volume is high, and each step is cheap to check
- âLatency matters (youâre waiting for the result now)
- âErrors are easy to detect and fix later
đ When to switch models or providers by role
Switching models has a hidden cost: each subagent starts from scratch and needs to gather the context again. Thatâs why the switch pays off in large tasks, not in 30-second messages. And there are two trade-off axes: switching between level (HaikuâSonnetâOpus) by depth, and switch provider (ClaudeâGPT) for independence.
The role changed in nature
Switch from executing to deciding (or vice versa).
The agent that scanned now needs complete which path to take. It moved from "execution" to "judgment" â move up a model.
You want an independent perspective
Review what another model built.
Claude is the builder; GPT/Codex becomes the reviewer. A change of provider in the reviewer role to avoid shared bias.
Cost or latency became a constraint
The bill went up or the wait is frustrating.
Could that bulky role running on Sonnet use Haiku? If an error is cheap to check, step down and save â no hesitation.
â ïž The "subagent starts with a blank slate" trap
Each subagent assembles the context from scratch. Switching to an expensive model for a role small makes the cost of "gathering context" swallow the gain. Switching models pays off when the task is large enough to amortize that cold start â otherwise, it's waste disguised as caution.
đ Heterogeneous fleet â the cost · latency · quality triangle
The destination is a heterogeneous fleet: several subagents pointing to different models, each in its own role. Itâs not a homogeneous âall Opusâ or âall Haikuâ systemâitâs a designed mix. And every mix lives under three forces pulling in opposite directions: cost, latency e quality. You don't maximize all three; you balances by role.
| Role | Typical model | Cost | Latency | Required quality |
|---|---|---|---|---|
| đ scan | haiku | low | very low | shallow is enough |
| đ§ search | haiku | low | low | shallow is enough |
| đš build | sonnet | medium | medium | by trade |
| đ review | sonnet / GPT | medium | medium | criticism |
| đ§ reasoning | opus | high | high | maximum |
| đĄïž security | opus + GPT | high | high | maximum |
â The same matrix, now with the tradeoff explicit in each row. Notice: as the required quality rises, cost and latency rise too â and that's acceptable only for critical roles.
đĄ "Choose 2 of 3"âby role
Low cost, low latency, and maximum quality all at once do not exist. A scanning role accepts "cheap + fast" and gives up depth; a security role accepts "expensive + slow" to buy quality. A heterogeneous fleet is precisely about making this choice role by role, instead of a single choice for everything.
Real example: a heterogeneous fleet in files
A heterogeneous fleet isnât a single file â itâs a set of subagents, each with its own field
model pointing to the engine behind your role. Below, four
.md cropped side by side: notice how the role
(in the description) e o model go together.
# ââ file-scanner.md â papel: ESCANEAR (volumoso, raso) ââ
name: file-scanner
description: Varre o repo e lista arquivos/sĂmbolos
relevantes. Use para mapear antes de qualquer leitura.
tools: Grep, Glob # sĂł localizar
model: haiku # barato + rĂĄpido
# ââ builder.md â papel: CONSTRUIR (de ofĂcio) ââââââââââ
name: builder
description: Implementa a mudança descrita no plano.
tools: Read, Edit, Write, Bash
model: sonnet # equilĂbrio
# ââ arch-thinker.md â papel: RACIOCĂNIO (juĂzo) ââââââââ
name: arch-thinker
description: Decide a arquitetura e os trade-offs de
uma mudança grande. Use ANTES de construir.
tools: Read, Grep
model: opus # raciocĂnio profundo
# ââ cross-reviewer.md â papel: REVISAR (2Âș olhar) ââââââ
name: cross-reviewer
description: Refuta o trabalho do builder buscando
furos. Use apĂłs qualquer mudança sensĂvel.
tools: Read, Grep
model: gpt-codex # OUTRA famĂlia = independĂȘncia
đ§© What changes from file to file
- description â declares the role (scan / build / reason / review).
- model â follow the role: shallow role â haiku, judgment â opus.
- tools â judgment/review roles stay read-only (Read, Grep).
- provider â the reviewer deliberately switches families.
đŻ Why this is "heterogeneous"
- Four agents, three different engines + an external provider.
- The total cost goes down: the high-volume work runs on haiku.
- Quality improves where it matters: Opus for reasoning.
- The review is independent: a different family makes different mistakes.
Ready-made prompts (copy and paste)
Three prompts for the orchestrator distribute models by role. The default is always to name the role and justify the engine â cheap where possible, powerful where needed, independent during review.
Para este job, monte uma frota por papel: use Haiku pra
escanear e buscar, Sonnet pra construir e revisar, e Opus
sĂł pro raciocĂnio de arquitetura. Justifique cada escolha
em uma linha (custo/latĂȘncia/qualidade).
O builder (Sonnet) terminou. Agora rode um revisor em
outro provedor (GPT/Codex) sĂł pra refutar: liste os furos
que um modelo da MESMA famĂlia talvez nĂŁo veja. NĂŁo
reescreva â sĂł aponte.
Revise minha frota: que papéis hoje em Sonnet poderiam
cair pra Haiku sem risco (erro barato de checar)? E que
papéis merecem subir pra Opus porque o erro seria caro?
Devolva sĂł a matriz papel â modelo ajustada.
Simulated screen: the heterogeneous fleet running
This is how the heterogeneous fleet appears in the terminal: each subagent runs on model for your role, and the middle column shows which engine each one is using. Notice the relative cost on the rightâthe high-volume roles on Haiku cost almost nothing; only the reasoning on Opus adds up.
â Illustrative recreation of the terminal (not a real screenshot). Each subagent uses the engine suited to its role; the cost is concentrated only in the reasoning Opus.
Exercise â build your role Ă model matrix
Take a your actual job (a project, an investigation, a migration) and design the fleet: for each of the six roles â scan, search, build, review, reasoning, security â choose one model and justify it using the triangle cost · latency · quality.
How to do it
- List the six roles (use the matrix at the top as a starting guide).
- For each role, choose the model:
haiku,sonnet,opusor another provider. - Write a line by role, explaining: is a mistake costly here? Is the volume high? Does latency matter?
- Mark at least a role that gets a second look from another provider (and say why).
| Role | Your model | Justification (1 line) |
|---|---|---|
| đ scan | ______ | _______________________________ |
| đ§ search | ______ | _______________________________ |
| đš build | ______ | _______________________________ |
| đ review | ______ | _______________________________ |
| đ§ reasoning | ______ | _______________________________ |
| đĄïž security | ______ | _______________________________ |
â Verification criteria â how to know you got it right
Your matrix is well designed if it passes these four tests:
- âIsn't homogeneous: appear at least two different models (if everything went to Opus or everything to Haiku, try again).
- âCritical roles move up: reasoning and security use the strongest engine in your matrix.
- âHigh-volume roles move down: scanning and searching use the cheapest/fastest engine.
- âThereâs a second look: at least one review/safety role uses a different provider from the builder.
Each justification must cite at least one vertex of the triangle (cost, latency, or quality). "Because itâs better" is not a valid justification.
Solved example (one line)
Role: đĄïž security · Model: opus + second look at GPT/Codex. Rationale: the security error is costly and irreversible (maximum quality is worth high cost and latency); the 2nd provider buys independence from shared bias. It passes all four tests.
â Module summary
Next module:
4.4 â Security. Download .md from third parties, prompt injection, and the read-only verifier subagent.