# Model Selection
<!--
ref: @protocol/model-selection
type: protocol
tags: [model selection, task optimization, AI models, decision-making]
triggers: [choose model, set model-policy, optimize task execution]
trigger_prompt: When faced with a task that requires selecting the appropriate model based on its complexity, ambiguity, or execution needs.
category: orchestrate
last_reviewed: 2026-04-30
complements: [@protocol/model-policy, @protocol/orchestrate, @protocol/loop, @protocol/chunk]
audience: [agent-author, claude-code-user, openclaw-user, terminal-only, decision-maker]
version: 14
updated_at: 2026-11-21T19:01:08.242Z
-->

Vendor-neutral model selection: pick light, mid, reasoning or top tier by the role the work needs, split scanning from reasoning, and climb the worker ladder for batch work. Per-lab mapping pages (Anthropic first) turn roles into models.

Use model-policy to set the level. Use this protocol when the policy lets you choose.

This is the **vendor-neutral philosophy**: pick a tier by the *role* the work needs, then map the role to a model with your lab's page.

| Lab | Mapping page |
|---|---|
| Anthropic (Claude Code, Claude API) | `@protocol/model-selection-anthropic` |
| OpenAI (Codex), Google (Gemini) | Not written yet. Until it is, map the four roles below from the vendor's own model docs, and write the page when you do. |

Most of the saving is not in picking one tier per task but in **splitting a task so the cheap tier reads and the expensive tier thinks** (the Split section below).

## The four roles

| Role | What it's for | Where it's wasted |
|------|---------------|-------------------|
| **Light** | Scans, classifications, simple greps, mechanical edits, large-context lookup ("find me the thing in this big input"), structured extraction. | Anything that needs the model to *infer* something not in the input. |
| **Mid** | Execution loops on a known plan, code from a clear spec, routine refactors, content from clear prompts, anything well-scoped. | Open-ended product/architecture decisions where the answer is "it depends." |
| **Reasoning** | Multi-step reasoning, ambiguous problems, novel domains, judgment calls, planning a non-trivial change, debugging that needs hypothesis generation, verification before shipping. | Re-formatting JSON. Renaming variables. Listing files. |
| **Top** | Only where the reasoning tier has been *measured* to fall short. Labs' top tiers cost several times the reasoning tier, and a current reasoning tier covers most "hard" work. Name it explicitly for a bounded unit; never a session or script default. | Everything a reasoning-tier answer would also have passed. |

**The mapping should be evidence, not vibes.** Which tasks a given model actually wins is an empirical question; the lab pages record what has been measured and mark the rest as unproven.

## Quick decision tree

```
Has the reasoning tier been measured to fall short on this kind of task? ─yes→  Top
                       │ no
                       ↓
Is the task novel, ambiguous, or high-stakes? ─yes→  Reasoning
                       │ no
                       ↓
Does the task need genuine reasoning beyond pattern-matching? ─yes→  Reasoning
                       │ no
                       ↓
Is the task scan / classify / mechanical edit / large-context lookup? ─yes→  Light
                       │ no
                       ↓
                                                                            Mid (default)
```

## Task-type matrix

| Task type | Recommended | Notes |
|-----------|-------------|-------|
| Plan a new feature from a vague request | **Reasoning** | Ambiguity tax — the reasoning tier pays it off cheaper than mid-tier rework. |
| Write code from a clear spec | **Mid** | Current mid tiers write production code well. |
| Refactor following an established pattern | **Mid** | Pattern-matching, not novel design. |
| Debug "why is this 500ing" with multiple hypotheses | **Reasoning** | Hypothesis generation. |
| Find the line where X is set in a 200-file repo | **Light** | Scan the input; no inference needed. |
| Summarize a 100-page document | **Light** or **Mid** | Light for the gist, mid if the summary itself needs structure. |
| Classify an incoming ticket as bug/feature/question | **Light** | Classification with stable categories. |
| Write a marketing landing page | **Mid** | Voice + structure; reasoning only if branding is contested. |
| Architect a new service | **Reasoning** | Decision space is large; cost of wrong call is high. |
| Run an eval suite over 1,000 prompts | **Light per item, reasoning on flagged failures** | Budget the bulk; spend on the surprises. |
| Plan a multi-protocol orchestration | **Reasoning once, mid per sub-task** | The plan is the leverage point. |
| Apply a mechanical edit pattern to 50 files | **Light** or **Mid** | If the pattern is unambiguous → light. |

## Split the scan from the reasoning

Most "hard" tasks are a big cheap part (find the relevant files, lines, rows, log entries) wrapped around a small expensive part (decide what they mean and what to do). Running both on one model pays the reasoning rate for every byte read. Split them:

1. **Scan on a light subagent** (mid if the search needs some judgment about what is relevant). It sweeps the files and returns **compact findings only**: `path:line`, a short verbatim excerpt, and a one-line note of why it matched. No conclusions, no fixes — the scanner reports, it does not decide.
2. **Reason over the findings on the main agent or a reasoning-tier subagent.** It reads the findings, opens the few files that matter in full, and makes the call.

Why it pays: the reasoning model's context carries a few hundred lines of findings instead of every file the scanner opened, and that saving repeats on every later turn of the reasoning session.

Example — "why do some exports drop the last row?":

```
light subagent: "In src/, list every place that slices, paginates or chunks export
                 rows. Return path:line + 3-line excerpt + one-line note each.
                 Do not diagnose."
→ 9 findings
reasoning agent: read the 9, open the 2 suspicious files, form the hypothesis, fix.
```

**Write the scan brief so a small model cannot drift:** name the directory, the pattern or question, the exact return shape, and "do not diagnose / do not edit." A vague brief is what makes a cheap scanner come back wrong.

**Don't split when** the input is already small (2–3 known files: just read them), when finding the thing *is* the reasoning (the relevant code can only be recognized by understanding it), or when the scanner's misses would be silent and costly — then scan on the mid tier, or have the reasoning model spot-check one area the scanner reported empty.

## Levels are a ceiling

When the level allows the reasoning tier but this protocol says the light tier will do, **prefer the cheaper model.** Level is a ceiling, not a floor. The top tier sits outside the levels: no level makes it a default. Each lab page maps levels to its models.

## Sub-agent dispatch

- **Research / scan / lookup:** light tier. Return findings, not conclusions.
- **Mechanical execution / edit / single-file change:** mid tier.
- **Independent planning of a sub-task:** match the active level.
- **Verification before shipping, or a root cause the first pass missed:** reasoning tier, with a brief that states exactly what to verify and what evidence counts. Top tier only where it has been measured to beat the reasoning tier on that kind of check.
- **Critical reasoning the main agent shouldn't outsource:** don't dispatch — keep it in the main agent.

## When to override

Three signals it's worth bumping a tier *up*:

1. **You ran the cheaper model and it gave you garbage.** One retry on the next tier up is cheaper than 5 retries on the same tier.
2. **The task touches production data, money, or irreversible state.** Even at the most frugal level, a destructive action deserves the reasoning tier.
3. **A failing eval is unexplainable.** Reasoning tier on the failures only, light on the rest. (Don't bump the whole sweep.)

Three signals it's worth bumping a tier *down*:

1. **The output is short and structurally constrained** (JSON with a fixed schema, a yes/no, a single label).
2. **The input contains the answer literally** and you're just extracting.
3. **You're in a tight loop running the same kind of call** repeatedly.

## Repetitive work: the worker ladder

When one prompt is about to run over many items, the per-item work is collection, not intelligence. Climb from the bottom and stop at the first rung that does the job:

1. **Code first.** If the per-item decision can be a regex, parser, lookup, join or threshold, it is a script, not a model call. Zero tokens, deterministic, safe to re-run over the whole corpus.
2. **Cheapest model per item.** What code cannot decide (classify, extract, summarize one item) goes to the smallest model that passes a known-answer control: a hand-labelled sample scored *before* the run. Short structured output, stateless batches.
3. **Expensive model once, over the summaries.** Synthesis, pattern-finding and judgment run over what rung 2 produced: a few calls reading compact summaries, not hundreds re-reading raw items.

**Trigger.** The same prompt or template about to run over **more than 20 items, or more than 8 model calls**. Past that line the per-item stage defaults to the cheapest tier, and a mid or reasoning tier needs a stated reason: *the cheaper tier was scored on the control and failed*. "It is the script's default" is not a reason; the default is what runs unattended every week.

**Earn the upgrade on the failures, not the sweep.** If the cheap tier fails the control, re-run only the items it got wrong on the next tier up before moving the whole job.

**Do not pay twice for the same item.** Per-item results are cacheable. Process only items that have no result yet; a recurring job that re-labels last week's items buys no new information.

This is the multi-call form of "bump down" signal 3 above. That signal alone did not bind: a batch script picked a mid-tier default, the rule sat in a decision tree nobody opens when writing `--model`, and the job ran weekly. Put the check where the model is chosen (the fan-out declaration or the script's default), not only here.

## Escalation: start small, climb on evidence, plan big jobs by stage

The sections above choose a tier for one call. This one covers a job big enough that the tier changes from stage to stage: a research sweep, a backfill, a multi-repo change, a long build.

**Start small and climb.** Give each stage the lowest tier you expect to pass. Move it up only when one of these happens:

| Trigger | Move |
|---|---|
| It fails a known-answer control, or gives garbage once | Re-run **only the failed items** one tier up (§Repetitive work: the worker ladder). Never re-run the whole sweep. |
| It fails because it **lacked knowledge or reasoning** (wrong inference, missed the point) | One tier up. |
| It fails because it **lacked diligence** (skipped items, stopped early, didn't check its work) | Same tier, with more effort, a tighter brief or a check step. A bigger model doesn't fix diligence. |
| The stage touches money, production data or irreversible state | Reasoning tier at least, whatever the level (§When to override). |
| The reasoning tier has been **measured** to fall short on this bounded unit | Top tier, for that unit only, named on the call. |

**Plan a big-model job as stages, each with its own tier:**

1. **Plan or roast (reasoning; top only for a named, bounded unit).** One call writes the plan, the brief, the controls and the done-when, or attacks an existing plan. A top-tier plan doesn't make the rest of the job top-tier.
2. **Fan out (light per item, mid only on a failed control).** Each item is collection: read, extract or summarize one item into a file. Use code first wherever a rule can decide (§Repetitive work: the worker ladder).
3. **Build (mid on a clear spec; reasoning when the spec is ambiguous).** A plan from a higher tier is built on these tiers, not on the tier that wrote it.
4. **Synthesize and judge (reasoning, once, over the summaries).** Ranking, insight, and the writing a person reads. Never re-read the raw items here.
5. **Verify before shipping (reasoning).** Check against the artifact itself, not against a worker's report.

**Write the tiers down before you start.** Put one line per stage in the job's brief or fan-out declaration, naming the tier and the control that would justify moving up. A tier picked mid-run defaults to the conductor's own model, which is the costliest place to leave it.

**Anthropic mapping, as of 2026-11:** light = Haiku, mid = Sonnet, reasoning = Opus, top = Fable (plan or roast only, never the build that follows). Pass `model` on every subagent call, because a subagent inherits the caller's tier.

## Anti-patterns

| Don't | Why |
|-------|-----|
| Default a batch or fan-out script to a mid or reasoning tier | The default is what runs unattended, forever. Default to the cheapest tier that passes the control; raise it by flag, with the failed score as the reason. |
| Let the reasoning model do its own file sweep | It pays the reasoning rate on every byte read, and the reads ride every later turn. Scan on a light subagent, reason over the findings. |
| Reach for the top tier as ambient quality | Several times the cost, and the reasoning tier usually already passes. Earn it with a measured shortfall on that kind of task. |
| Use a big model for "the agent needs to feel smart" | Token cost has no marketing value. The user sees output, not the model. |
| Use the light tier for free-form code generation | Quality drop is real on novel problems; rework cost dominates. |
| Switch models mid-session for trivial reasons | Prompt-caching benefits compound. Pick once per task type, hold. |
| Treat the model field as a TODO | If you don't know which to use, default to the mid tier. It's the right answer most of the time. |

---

*Related: `@content/youtube/nate-herk/build-sell-with-codex-5-hour-course` · `@content/youtube/cole-medin/your-complete-guide-to-fable-5-2-when-to-use-it-effort-levels-prompting` · `@content/youtube/nate-herk/i-tested-sonnet-5-5-vs-opus-5-5-what-you-need-to-know` · `@content/youtube/saas-academy/phil-m-jones-say-the-right-thing-every-time` · `@content/youtube/david-ondrej/my-1-000-fable-5-2-workflow-just-copy-me`*

---

*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*

*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*