PTENES
MODULE 4.3 · Track 4 · Advanced & cross-environment

đŸŽ›ïž Comparing models by role

Each role in the fleet needs a different brain. Whoever only scans files don't need the same engine as whoever decides the architecture. You'll learn how to assemble a role × model matrix and balance the iron triangle: cost · latency · quality.

6
Topics
~30
Minutes
Advanced
Level
Strategy
Type

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.

Haiku cheap · fast Sonnet balance Opus reasoning GPT/Codex Second look 🔍 scan 🧭 search 🔹 build 🔎 review 🧠 reasoning đŸ›Ąïž security ideal ideal ideal ideal Second look ideal ideal cross simple roles ↑ · critical roles ↓ → stronger engine →

↑ 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

1

đŸȘœ 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.
What it is:

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.

Why learn:

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.

Key concepts:

Role × engine · “the cheapest that gets the job done” · Haiku → Sonnet → Opus ladder.

⚡
Haiku
scan · search · summarize
🔹
Sonnet
build · review
🧠
Opus
reasoning · security
2

🔀 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.

in your chat Cross-provider second look
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.

What it is: use models from another family (GPT/Codex) in specific roles—typically review and counterpoint.
Why learn: independence between the builder and reviewer reduces shared blind spots and increases confidence in the finding.
Key concepts: second provider · shared bias · cross-family reviewer · confirmation through disagreement.
3

🌐 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.

What it is: the universe of models beyond the two main families, organized into three capability classes.
Why learn: reasoning by class (not by brand) keeps the fleet durable: changing models becomes changing the occupant of a slot.
Key concepts: capability × brand · three classes · replaceable slot · architectural durability.
4

⚖ 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
deep reasoning strong · expensive · slow cheap & fast lightweight · shallow · instant the deciding factor = the cost of getting this role wrong
What it is: the fundamental trade-off — reasoning depth purchased with cost and latency.
Why learn: every model choice ultimately means deciding where deeper reasoning is worth the cost — and the measure is the cost of being wrong.
Key concepts: no free lunch · cost of being wrong · moving the model up × down · depth as a scarce resource.
5

🔁 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.

1

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.

2

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.

3

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.

What it is: the concrete triggers for changing levels (depth) or providers (independence) in a role.
Why learn: blind swaps are costly; knowing when switching is what turns the matrix into an economical system, not decoration.
Key concepts: level switch × provider switch · cold start · amortize the context · large tasks pay off.
6

🚁 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.

What it is: a fleet of mixed models, balancing cost, latency, and quality in each role.
Why learn: is the end state of mastery: the entire fleet is cheap and fast where it can be, and powerful only where it needs to be.
Key concepts: heterogeneous fleet · cost/latency/quality triangle · "choose 2 of 3" · designed mix.
📄

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.

.claude/agents/ — four fleet files Markdown + YAML
# ── 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.

Prompt 1 — assign a model to each role builds the fleet
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).
Prompt 2 — cross-provider second opinion purchase independence
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.
Prompt 3 — cut costs without sacrificing quality optimizes the triangle
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.

claude code · refatorar-auth · heterogeneous fleet ⏱ 01:12
● file-scannerHaiku
$ ·
● grep-symbolsHaiku
$ ·
● builderSonnet
$$ ··
● arch-thinkerOpus
$$$ ···
● cross-reviewerGPT/Codex
$$ ··
5 subagents · 3 engines + 1 external provider · synthesis after the reports
orchestrator · Opus
fleet cost
38% of the limit

↑ 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

  1. List the six roles (use the matrix at the top as a starting guide).
  2. For each role, choose the model: haiku, sonnet, opus or another provider.
  3. Write a line by role, explaining: is a mistake costly here? Is the volume high? Does latency matter?
  4. 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

✓
Role ladder — Haiku scans/searches, Sonnet builds/reviews, Opus reasons/handles security. The role determines the engine.
✓
GPT / Codex — a second provider as an independent reviewer: different families make different mistakes.
✓
Other providers — think by class (fast/balanced/reasoning), not by brand; the slot is replaceable.
✓
The trade-off — depth costs money and time; the standard is the cost of getting the role wrong.
✓
When to switch — by level (depth) or by provider (independence); only worthwhile for a large task (cold start).
✓
Heterogeneous fleet — models mixed by role, balancing the cost · latency · quality triangle ("choose 2 of 3").

Next module:

4.4 — Security. Download .md from third parties, prompt injection, and the read-only verifier subagent.