llm-orchestrator 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +14 -0
- package/.claude-plugin/plugin.json +19 -0
- package/COMPATIBILITY.md +27 -0
- package/IMPLEMENTATION.md +26 -0
- package/LICENSE +31 -0
- package/NOTICE +17 -0
- package/README.md +291 -0
- package/SKILL.md +125 -0
- package/adapters/agents.mjs +46 -0
- package/adapters/claude/index.mjs +9 -0
- package/adapters/codex/index.mjs +15 -0
- package/adapters/commands.mjs +117 -0
- package/adapters/kilo/index.mjs +5 -0
- package/adapters/opencode/index.mjs +5 -0
- package/bin/attribution-check.mjs +136 -0
- package/bin/cli-options.mjs +90 -0
- package/bin/discover-models.mjs +271 -0
- package/bin/doctor.mjs +191 -0
- package/bin/install.mjs +48 -0
- package/bin/llm-orchestrator.mjs +103 -0
- package/bin/model-thinking-report.mjs +165 -0
- package/bin/render.mjs +22 -0
- package/bin/route.mjs +139 -0
- package/bin/uninstall.mjs +15 -0
- package/lib/adapter-renderer.mjs +114 -0
- package/lib/capability-resolver.mjs +343 -0
- package/lib/dispatch-contract.mjs +583 -0
- package/lib/first-run.mjs +299 -0
- package/lib/harness.mjs +6 -0
- package/lib/installation.mjs +550 -0
- package/lib/project-discovery.mjs +434 -0
- package/lib/router.mjs +660 -0
- package/lib/tool-discovery.mjs +162 -0
- package/models/example-model-inventory.json +82 -0
- package/models/model-thinking-data.json +580 -0
- package/models/model-thinking-matrix.md +157 -0
- package/models/top-models.json +1299 -0
- package/package.json +65 -0
- package/policies/capabilities.md +144 -0
- package/policies/cleanup.md +51 -0
- package/policies/dispatch.md +284 -0
- package/policies/execution.md +116 -0
- package/policies/questions.md +75 -0
- package/policies/routing.md +677 -0
- package/policies/state.md +85 -0
- package/policies/verification.md +72 -0
- package/protocol.md +162 -0
- package/registries/agent-roles.json +1 -0
- package/registries/capabilities.json +58 -0
- package/registries/core-profile.json +183 -0
- package/registries/preferred-tools.json +595 -0
- package/registries/routing-matrix.json +394 -0
- package/registries/task-mappings.json +259 -0
- package/schemas/agent-roles.schema.json +1 -0
- package/schemas/capability-contract.schema.json +209 -0
- package/schemas/installation-manifest.schema.json +57 -0
- package/schemas/project-profile.schema.json +70 -0
- package/schemas/routing-matrix.schema.json +237 -0
- package/schemas/tool-inventory.schema.json +127 -0
- package/schemas/top-models.schema.json +235 -0
- package/skills/orchestrate-core/SKILL.md +18 -0
- package/workflows/bug-fix.md +59 -0
- package/workflows/config.md +57 -0
- package/workflows/deploy.md +57 -0
- package/workflows/feature.md +61 -0
- package/workflows/incident.md +61 -0
- package/workflows/investigation.md +62 -0
- package/workflows/refactor.md +53 -0
- package/workflows/research.md +61 -0
- package/workflows/review.md +58 -0
|
@@ -0,0 +1,677 @@
|
|
|
1
|
+
<!-- llm-orchestrator · created by Bogdan-Gabriel Torcescu · https://www.linkedin.com/in/bogdantorcescu/ · keep this credit when copying or deriving -->
|
|
2
|
+
# CRITIC — Cost-Aware Model and Thinking Routing
|
|
3
|
+
|
|
4
|
+
Goal: **the cheapest model that solves the task reliably, with the smallest thinking level that is
|
|
5
|
+
sufficient.** Do not automatically map "hard task" to the biggest model, and do not automatically
|
|
6
|
+
pair a big model with maximum thinking.
|
|
7
|
+
|
|
8
|
+
These rules are **provider-neutral**. Every dispatch is classified into a *tier* and a *thinking
|
|
9
|
+
level*; the provider you are running on resolves that pair to a concrete model via the tables below.
|
|
10
|
+
The same task must land on the same tier regardless of provider.
|
|
11
|
+
|
|
12
|
+
**A harness is not a provider.** Codex, Claude Code, OpenCode and Kilo may expose different model
|
|
13
|
+
sets on different installations. A public catalog entry, a benchmark row, or credentials in a config
|
|
14
|
+
file does not prove the current agent can dispatch that model. Do not launch another harness,
|
|
15
|
+
install providers or spend inference credits merely to discover availability.
|
|
16
|
+
|
|
17
|
+
## Machine-readable form
|
|
18
|
+
|
|
19
|
+
This policy is executable. Everything below — tiers, thinking levels, the tier × thinking resolution
|
|
20
|
+
table, default routing, the flow matrix, risk floors, agent defaults, the escalation ladders, fan-out
|
|
21
|
+
minimums, caps, the target distribution and the quota degradation ladder — is encoded in
|
|
22
|
+
`registries/routing-matrix.json` (schema: `schemas/routing-matrix.schema.json`). The model shortlist
|
|
23
|
+
with prices, thinking controls, context windows and measured cost per task lives in
|
|
24
|
+
`models/top-models.json` (schema: `schemas/top-models.schema.json`), whose `measured` values are
|
|
25
|
+
copied verbatim from `models/model-thinking-data.json`.
|
|
26
|
+
|
|
27
|
+
`lib/router.mjs` applies them (`classify`, `rankModels`, `cheapestThinkingFor`, `estimateFlow`,
|
|
28
|
+
`explain`) and `bin/route.mjs` exposes them:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
node bin/route.mjs --task BUG_FIX --phase fix --area refund --risk critical --harness codex
|
|
32
|
+
node bin/route.mjs --task FEATURE --flow --complexity COMPLEX --provider openai --json
|
|
33
|
+
node bin/route.mjs --task FEATURE --phase implementation --include-candidates --cheapest-thinking
|
|
34
|
+
node bin/route.mjs --list # task types, phases, roles, risk-floor areas, and the 20 models
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`classify` resolves in this order: default routing → agent default → task-flow phase → complexity →
|
|
38
|
+
risk floor (upward only) → context rules → caps. Risk raises the **review** floor, never the
|
|
39
|
+
implementation tier — "route by risk, not by LOC" is mechanised, not merely advised. `rankModels`
|
|
40
|
+
excludes configurations that violate a cap (Terra/Sol above `high`, Fable 5.1 without an explicit
|
|
41
|
+
flag) rather than clamping them silently, and intersects with a runtime inventory when one is passed.
|
|
42
|
+
It also enforces admission: a model marked `admission: "candidate"` is returned with an
|
|
43
|
+
`excluded_reason` instead of a seat unless the caller opts in — see "Candidate alternatives and
|
|
44
|
+
admission". `cheapestThinkingFor(pair, { maxScoreLoss })` is the thinking-cost optimisation: for the
|
|
45
|
+
tier a pair resolves to, it returns the lowest-cost (model, effort) whose measured score is within
|
|
46
|
+
`maxScoreLoss` (default 2) of the incumbent config the resolution row names.
|
|
47
|
+
|
|
48
|
+
One deliberate registry decision: `agent_defaults` is taken from the Agent-defaults table below
|
|
49
|
+
wherever `registries/agent-roles.json` disagreed — the prose wins, and the registry matches it. The
|
|
50
|
+
`concurrency` risk-floor row (X T3 implementation / X T4 review) is derived from the
|
|
51
|
+
"security/payments/concurrency/migrations → X T4" default-routing line and is now tabulated
|
|
52
|
+
explicitly in "Risk floors" below, so registry and prose carry the same 21 areas under the same keys.
|
|
53
|
+
|
|
54
|
+
## Discovery before dispatch
|
|
55
|
+
|
|
56
|
+
1. Inspect the active session's model picker, collaboration tool schema or supported read-only
|
|
57
|
+
model-list endpoint. Record `harness`, version, timestamp, source, exact IDs, provider and
|
|
58
|
+
supported effort values.
|
|
59
|
+
2. Distinguish **exposed** (the current runtime advertises dispatch), **configured** (listed but
|
|
60
|
+
dispatch not established) and **verified** (a successful prior dispatch in this same context).
|
|
61
|
+
Unknown access or effort stays unknown. Never emit credentials, config dumps or auth headers.
|
|
62
|
+
3. Intersect that inventory with the tables below. An unrecognized model is available-but-unrated:
|
|
63
|
+
it gets neither an invented score nor automatic promotion to critical reviewer.
|
|
64
|
+
4. Refresh at session start, on account/provider/workspace change, on a model-not-found or
|
|
65
|
+
effort-rejection error, and on a quota change. A saved inventory is evidence, never a permanent
|
|
66
|
+
allowlist.
|
|
67
|
+
5. **Record `model_requested` and `model_effective`** (and `effort_requested` / `effort_effective`).
|
|
68
|
+
A runtime substitution that violates a floor invalidates that phase. Do not silently fall back.
|
|
69
|
+
|
|
70
|
+
On OpenCode and Kilo, resolve the actual `provider/model` identifier and variant from the runtime;
|
|
71
|
+
the incumbents below are role mappings, not guarantees of availability.
|
|
72
|
+
|
|
73
|
+
## Tiers and provider models
|
|
74
|
+
|
|
75
|
+
| Tier | Role | Claude incumbent | Codex incumbent |
|
|
76
|
+
| --- | --- | --- | --- |
|
|
77
|
+
| **W** worker | local, mechanical, repetitive, well-defined: code search, classification, extraction, small edits, boilerplate, simple tests, consistency checks, scoped transforms | Haiku 4.5 (`claude-haiku-4-5`) | `gpt-5.6-luna` |
|
|
78
|
+
| **S** standard | default software-engineering model: normal implementation, frontend/backend, moderate debugging, tests, reasonable multi-file refactors, codebase analysis, tool use | Sonnet 5 (`claude-sonnet-5`) | `gpt-5.6-terra` |
|
|
79
|
+
| **X** senior | hard debugging, architecture, concurrency, migrations, security, auth, payments, billing, backwards compatibility, critical code review, many invariants | Opus 5 (`claude-opus-5`) | `gpt-5.6-sol` |
|
|
80
|
+
| **F** frontier | exceptional escalation: very ambiguous, long-horizon, cross-system, major architecture, very large codebase, planning under heavy constraints, or when X fails to produce a solid solution | Fable 5 (`claude-fable-5`) — default F. Fable 5.1 (`claude-fable-5-1`) is a hard-capped exception: **≤2% of all dispatches**, explicit request or documented F-T4 failure on Fable 5 only | GPT-6 Astra (`gpt-6-astra`) — a real single-agent frontier tier, no decomposition workaround needed |
|
|
81
|
+
|
|
82
|
+
Escalation order within a provider: **W → S → X → F**.
|
|
83
|
+
|
|
84
|
+
Verified prices (Sep 2026, provider pricing pages), USD in/out per MTok:
|
|
85
|
+
|
|
86
|
+
| Tier | Claude model | Claude $ in/out | Codex model | Codex $ in/out |
|
|
87
|
+
| --- | --- | --- | --- | --- |
|
|
88
|
+
| W | Haiku 4.5 (200K ctx) | $1 / $5 | `gpt-5.6-luna` (1.05M ctx) | $0.20 / $1.20 |
|
|
89
|
+
| S | Sonnet 5 (1M ctx) | $2 / $10 | `gpt-5.6-terra` (1.05M ctx) | $2 / $12 |
|
|
90
|
+
| X | Opus 5 (1M ctx) | $5 / $25 | `gpt-5.6-sol` (1.05M ctx) | $4 / $20 |
|
|
91
|
+
| F | Fable 5 (1M ctx) | $10 / $50 | `gpt-6-astra` (1.05M ctx) | $10 / $50 list — **but the cheapest F per completed task of any model here** |
|
|
92
|
+
| F+ (≤2%) | Fable 5.1 (1M ctx) | $10 / $50 list — **effective cost significantly higher** (always-on thinking, longer turns, more output tokens per task) | — (Astra covers F) | — |
|
|
93
|
+
|
|
94
|
+
Claude notes: Fable 5.1 shares Fable 5's list price but costs significantly more per completed task
|
|
95
|
+
— judge it on cost per task, not per token. **When F is needed, use Fable 5; Fable 5.1 is capped at
|
|
96
|
+
≤2% of dispatches.** Fable 5.1 cache reads bill at $0.25/MTok; Fable 5 uses the standard
|
|
97
|
+
10%-of-input cache-read rate. Opus 5 fast mode (`speed: "fast"`) reprices Opus to $10 / $50 —
|
|
98
|
+
Fable-tier cost for Opus-tier output, so it never replaces an F dispatch and is off by default.
|
|
99
|
+
Legacy fallbacks: Opus 4.8 / 4.7 / 4.6 $5 / $25, Sonnet 4.6 $3 / $15 (more expensive than Sonnet 5 —
|
|
100
|
+
never pick it for cost).
|
|
101
|
+
|
|
102
|
+
Codex notes: all three gpt-5.6 models have a 1,050,000-token window and 128K max output.
|
|
103
|
+
**Long-context surcharge: a request whose input exceeds 272K tokens bills the *entire request* at 2x
|
|
104
|
+
input and 1.5x output** — Luna $0.40/$1.80, Terra $4/$18, Sol $8/$30. Cached reads are 10% of input;
|
|
105
|
+
cache *writes* bill at 1.25x uncached input. Legacy `gpt-5.5` ($5/$30) and `gpt-5.4` ($2.50/$15) are
|
|
106
|
+
capped at 272K — more expensive *and* smaller-context than the tier that replaces them, so they are
|
|
107
|
+
fallback-only.
|
|
108
|
+
|
|
109
|
+
Astra: `low`/`medium`/`high`/`xhigh`/`max` on the public API. (`none` exists in prerelease
|
|
110
|
+
evaluations only and is **not** publicly callable — never dispatch it.)
|
|
111
|
+
|
|
112
|
+
## Cost per task ≠ price per token
|
|
113
|
+
|
|
114
|
+
Cost-per-completed-task figures come from a public benchmark suite with its own weighting — not from
|
|
115
|
+
a consuming project's workload. They do not track list price, because thinking-token volume varies
|
|
116
|
+
enormously between models at the same effort:
|
|
117
|
+
|
|
118
|
+
| Config | Score | $/task | Read |
|
|
119
|
+
| --- | --- | --- | --- |
|
|
120
|
+
| Haiku 4.5 thinking on | 22 | $0.20 | W floor |
|
|
121
|
+
| Luna `xhigh` / `max` | 42 / 43 | $0.06 / $0.10 | cheapest measured anything |
|
|
122
|
+
| Terra `high` / `max` | 41 / 47 | $0.30 / $0.81 | |
|
|
123
|
+
| Sol `low` / `medium` / `high` / `max` | 41 / 46 / 48 / 51 | $0.23 / $0.37 / $0.61 / $1.25 | X tier, cheap |
|
|
124
|
+
| **Astra `high`** | **53** | **$1.41** | **best score-per-dollar at the top** |
|
|
125
|
+
| Astra `medium` / `xhigh` / `max` | 52 / 54 / 55 | $1.16 / $1.85 / $2.57 | |
|
|
126
|
+
| Opus 5 `medium` / `high` / `xhigh` / `max` | 50 / 52 / 53 / 54 | $1.36 / $2.44 / $3.36 / $4.21 | |
|
|
127
|
+
| Sonnet 5 `max` | 45 | $3.31 | only measured Sonnet point |
|
|
128
|
+
| Fable 5 `max` | 53 | $5.62 | |
|
|
129
|
+
| Fable 5.1 `max` | 57 | $6.12 | highest score measured, highest cost |
|
|
130
|
+
|
|
131
|
+
**Which numbers bind.** The two tables in this section are an earlier reading and they do **not**
|
|
132
|
+
match the machine-readable dataset: `models/model-thinking-data.json` (Artificial Analysis v4.3.2,
|
|
133
|
+
observed 2026-09-22) records Luna `xhigh` at 35 @ $0.09 rather than 42 @ $0.06, Astra `high` at 51 @
|
|
134
|
+
$1.73 rather than 53 @ $1.41, Opus 5 `medium` at 45 @ $2.19 rather than 50 @ $1.36, and Fable 5.1
|
|
135
|
+
`max` at 53 @ $7.63 rather than 57 @ $6.12. **Where prose and dataset disagree, the dataset wins** —
|
|
136
|
+
it is what the router reads and what `bin/model-thinking-report.mjs` renders. Two of the frontier
|
|
137
|
+
rows below also fall off the frontier under that data: **Sol `xhigh`** is dominated by Astra `low`
|
|
138
|
+
(46 @ $0.82 vs 44 @ $1.18) and **Fable 5.1 `max`** is dominated by Astra `max` (same 53 at less than
|
|
139
|
+
half the cost). Everything else in this section — the shape of the argument, the dominated list, the
|
|
140
|
+
Terra verdict, "never run Sonnet at `max`" — survives both readings unchanged.
|
|
141
|
+
|
|
142
|
+
### The efficient frontier — pick by $/task, not by tier label
|
|
143
|
+
|
|
144
|
+
A config is on the **efficient frontier** if no cheaper config scores at least as high. Everything
|
|
145
|
+
else is *dominated* — strictly worse on both axes, never the right default.
|
|
146
|
+
|
|
147
|
+
| Frontier config | Score | $/task |
|
|
148
|
+
| --- | --- | --- |
|
|
149
|
+
| Luna `xhigh` | 42 | $0.06 |
|
|
150
|
+
| Luna `max` | 43 | $0.10 |
|
|
151
|
+
| Sol `medium` | 46 | $0.37 |
|
|
152
|
+
| Sol `high` | 48 | $0.61 |
|
|
153
|
+
| Astra `low` | 49 | $0.63 |
|
|
154
|
+
| Sol `xhigh` | 50 | $0.89 |
|
|
155
|
+
| Astra `medium` | 52 | $1.16 |
|
|
156
|
+
| Astra `high` | 53 | $1.41 |
|
|
157
|
+
| Astra `xhigh` | 54 | $1.85 |
|
|
158
|
+
| Astra `max` | 55 | $2.57 |
|
|
159
|
+
| Fable 5.1 `max` | 57 | $6.12 |
|
|
160
|
+
|
|
161
|
+
Dominated, with what beats them: Haiku 4.5 (22 @ $0.20 — Luna `xhigh` is 3.3x cheaper *and* 20
|
|
162
|
+
points higher), Sol `low`, Terra `high` (5x), Terra `xhigh`, Terra `max`, Sol `max`, Opus 5
|
|
163
|
+
`low`/`medium`/`high` (2.1x)/`xhigh` (2.4x)/`max` (2.3x), **Sonnet 5 `max`** (45 @ $3.31 — Sol
|
|
164
|
+
`medium` is 8.9x cheaper for a higher score), **Fable 5 `max`** (53 @ $5.62 — Astra `high` is 4x
|
|
165
|
+
cheaper for the same score).
|
|
166
|
+
|
|
167
|
+
Read that as the default *preference* when a task is provider-flexible, and weigh it against limits
|
|
168
|
+
the price data cannot see:
|
|
169
|
+
|
|
170
|
+
- **The benchmark suite is not your workload.** Ratios transfer better than absolute dollars.
|
|
171
|
+
- **Sonnet 5 is measured only at `max`**, its worst-value point. Its lower efforts are unrated, not
|
|
172
|
+
proven bad. The safe conclusion is narrower: never run Sonnet at `max`.
|
|
173
|
+
- **Score is not reliability.** On the strict end-to-end "fully resolved" cut the ranking reorders.
|
|
174
|
+
- **Risk floors, retention and independence still bind** and are not priced here. A cheaper frontier
|
|
175
|
+
config never overrides a risk-floor row.
|
|
176
|
+
- **Quota reality**: subscription windows are not per-token billing. See "Quota windows".
|
|
177
|
+
|
|
178
|
+
**Terra is the squeezed tier.** Every measured Terra config is dominated. Two conclusions of
|
|
179
|
+
different strength: **firm — never run Terra above `high`** (Sol `medium` is cheaper and
|
|
180
|
+
higher-scoring than Terra `xhigh`; Sol `high` beats Terra `max`; escalate the model, never the dial);
|
|
181
|
+
**provisional — Terra `high` as the standard review config is worth re-examining**, but score is not
|
|
182
|
+
capacity and Terra `medium` (the actual S T2 default) has no measured point, so the S tier is not
|
|
183
|
+
indicted as a whole. Test it on real tasks; do not move reviews onto a small model today.
|
|
184
|
+
|
|
185
|
+
Benchmark hygiene: fallback-assisted runs are labelled as such and must not be read as clean
|
|
186
|
+
measurements. Where a headline number depends on fallback credit, treat that model's figure as
|
|
187
|
+
unmeasured rather than good.
|
|
188
|
+
|
|
189
|
+
Relative **list** cost within each provider (vs its own W tier): Claude 1x / 2x / 5x / 10x; Codex
|
|
190
|
+
1x / 10x / 20x / 50x — the Codex W→S jump is much steeper, so keeping mechanical work on the W model
|
|
191
|
+
matters even more there. Per *task*, the real spread is far narrower at the top and far wider at the
|
|
192
|
+
bottom. Both readings matter: list price governs a long-context single call, $/task governs a flow.
|
|
193
|
+
|
|
194
|
+
## Context as a routing axis
|
|
195
|
+
|
|
196
|
+
Context windows are not uniform: the Claude S/X/F models carry 1M context (128K max output) while
|
|
197
|
+
the W model is capped at 200K. On Codex all models take ~1.05M, but input beyond 272K bills at the
|
|
198
|
+
premium rate.
|
|
199
|
+
|
|
200
|
+
- **Context can force escalation independent of difficulty.** A mechanical task over a >150K-token
|
|
201
|
+
working set is not a W dispatch on a 200K model — it will truncate or thrash. Route it S T0–T1, or
|
|
202
|
+
shard the input so each W dispatch stays well under the window.
|
|
203
|
+
- **Don't pay for context you don't ship.** A small, well-scoped task does not justify a 1M model
|
|
204
|
+
"just in case". Give subagents trimmed inputs.
|
|
205
|
+
- **>150K conversations**: prefer chunking/sharding for W work; for long-horizon single-agent runs,
|
|
206
|
+
server-side compaction on the 1M models is a factor before escalating to F purely for size.
|
|
207
|
+
- **Where every model is large-context, the window floor does not apply** — the constraint is
|
|
208
|
+
pricing, not capability.
|
|
209
|
+
- **The >272K pricing cliff**: input past 272K reprices the **whole request** — one token over the
|
|
210
|
+
line raises the cost of everything before it. Shard below 272K whenever the task allows; at that
|
|
211
|
+
size, recheck the provider choice, and treat any >272K dispatch as a tier bump in the cost ledger.
|
|
212
|
+
Where a model's long-context repricing is not documented, assume it may apply and prefer the
|
|
213
|
+
known-flat-priced option.
|
|
214
|
+
|
|
215
|
+
Thinking tokens bill as **output** — high thinking is real cost. **F is NOT the default for every
|
|
216
|
+
hard task**: on pure hard coding, X is within noise of frontier at a fraction of the price. F earns
|
|
217
|
+
its premium only when several of these stack: long horizon + ambiguity + many subsystems + huge
|
|
218
|
+
context + planning under incomplete information + architectural judgment. For hard coding alone, try
|
|
219
|
+
X before F.
|
|
220
|
+
|
|
221
|
+
Only name models callable by the current tooling. Never use date-suffixed IDs.
|
|
222
|
+
|
|
223
|
+
## Thinking levels (separate axis from model)
|
|
224
|
+
|
|
225
|
+
| Level | Use | Claude `effort` | Codex `reasoning_effort` |
|
|
226
|
+
| --- | --- | --- | --- |
|
|
227
|
+
| T0 | mechanical: copy, grep, formatting, trivial edit | none/disabled | `low` |
|
|
228
|
+
| T1 | local, well-defined task | `low` | `low` |
|
|
229
|
+
| T2 | standard implementation, moderate reasoning | `medium` | `medium` |
|
|
230
|
+
| T3 | multi-file reasoning, review, debugging, serious planning | `high` | `high` |
|
|
231
|
+
| T4 | very hard debugging, security, money, concurrency, migrations, architecture, critical compatibility | `xhigh` | `high` + independent second reviewer on gpt-5.6; `xhigh` on Astra |
|
|
232
|
+
| T5 | frontier-only; can over-think simple tasks — diminishing returns | `max` | Astra `max` only; not available on gpt-5.6 |
|
|
233
|
+
|
|
234
|
+
Claude: S/X/F models take effort levels directly; X defaults to `high`. Start F at `high`, not
|
|
235
|
+
xhigh/max. Fable 5.1 API rules (rare): thinking is always on (omit `thinking` or send `adaptive`;
|
|
236
|
+
`disabled` and `budget_tokens` return 400); forced `tool_choice` `any`/`tool` returns 400 — use
|
|
237
|
+
`auto` + instruction, `strict: true`, or structured outputs; no assistant prefill; thinking blocks
|
|
238
|
+
are bound to the model and the transcript must stay append-only; per-message `effort` via a
|
|
239
|
+
mid-conversation `system` message avoids cache resets. **The W model has no effort parameter** —
|
|
240
|
+
only `thinking: enabled + budget_tokens`. Map T0/T1 = thinking off, T2 = small budget, T3 = moderate
|
|
241
|
+
budget; if it would need T4+, escalate to S instead of inflating the budget. A small model that
|
|
242
|
+
thinks a lot does not become a frontier model — thinking and model size are not substitutes.
|
|
243
|
+
|
|
244
|
+
Codex: `high` is the **ceiling for Terra and Sol** — never dispatch `xhigh` or `max` there; escalate
|
|
245
|
+
the model instead. (Sol `xhigh` at $0.89/task is on the frontier and is a legitimate exception when
|
|
246
|
+
Astra `medium` is unavailable; Sol `max` is dominated and never correct.)
|
|
247
|
+
|
|
248
|
+
**Luna is the exception.** Luna `xhigh` scores 42 @ $0.06/task and `max` 43 @ $0.10 — both
|
|
249
|
+
higher-scoring and 3–5x cheaper than Terra `high`. **Run W-tier work at Luna `xhigh` by default,
|
|
250
|
+
`max` when it stalls.** Thinking is cheap on a small model; that is exactly where high effort pays.
|
|
251
|
+
Escalate to S when the task needs **capacity** — judgment, cross-file scope, ambiguity, context
|
|
252
|
+
beyond what a small model holds — not merely more reasoning depth. **Astra is exempt from the Codex
|
|
253
|
+
ceiling** because it is the F tier and F needs a T4/T5 expression: `high` (default F), `xhigh`
|
|
254
|
+
(F T4), `max` (F T5, essentially never). Astra `low`/`medium` are priced like a strong X tier but
|
|
255
|
+
are not a substitute for Sol on X work.
|
|
256
|
+
|
|
257
|
+
### Thinking strategy per model (non-incumbent)
|
|
258
|
+
|
|
259
|
+
Defaults below are starting policies, not proven optima for any consuming project. They apply only
|
|
260
|
+
when the model and its control are exposed by the active runtime. None of them replaces a critical
|
|
261
|
+
reviewer on benchmark score alone. Unknown data retention or endpoint eligibility blocks sending
|
|
262
|
+
sensitive material there.
|
|
263
|
+
|
|
264
|
+
| Model | Tier (band) | Economical start | Raise thinking / switch condition |
|
|
265
|
+
| --- | --- | --- | --- |
|
|
266
|
+
| Grok 4.7 | — (unrated) | `high` is the cheapest measured configuration | Evaluate low/medium locally; `xhigh` gives the same displayed score at greater cost. Price long prompts separately |
|
|
267
|
+
| Grok 4.6 | S (44) | `medium` — the cheapest measured effort that reaches the S band | `low` (35) falls below the band; `xhigh` shows no gain over `high`; prefer 4.7 when justified by evidence, not by version number |
|
|
268
|
+
| Muse Spark 1.3 | X (48) | `xhigh` is the lower-cost of the two measured points | `max` buys ~3 displayed points for ~17% more; use only when those capabilities matter |
|
|
269
|
+
| Gemini 3.8 Flash | S (41) | `medium` when the task fits | `high` buys 1 displayed point for ~33% more. Multimodal/latency needs may justify it. `low` has a score but no published cost |
|
|
270
|
+
| MiMo V2.6 Pro (X, 46), GLM 5.3 Flash (S, 42), Qwen3.8 Max (X, 45), MiniMax M3 (W, 29), Step 5 (unpromoted) | from the single `default` point | verified provider default; no multi-effort curve established | Do not send invented effort enums. Measure supported variants locally first |
|
|
271
|
+
| GLM 5.3 (X, 45), Kimi K3 (S, 44), DeepSeek V4.1 Flash (S, 39) | from the single `max` point | only `max` has a complete measured score/cost pair | GLM 5.3 only `max` measured — that is not evidence to default to `max`. Confirm controls; evaluate lower settings on noncritical checkable work first |
|
|
272
|
+
|
|
273
|
+
An effort label from a benchmark table is not automatically a valid API parameter, and a per-agent
|
|
274
|
+
effort field in an IDE is not the same capability as the API's thinking budget controls. Where a
|
|
275
|
+
model publishes a sparser curve than the thinking level asks for, the router substitutes that model's
|
|
276
|
+
cheapest published setting at or above the request and labels the substitution — it never invents an
|
|
277
|
+
enum, and it never silently drops to a shallower one.
|
|
278
|
+
|
|
279
|
+
### Candidate alternatives and admission
|
|
280
|
+
|
|
281
|
+
The ten alternatives above are **in the matrix**, not in a footnote: `models/top-models.json` now
|
|
282
|
+
carries 20 fully routable entries — ten ladder incumbents (`admission: "incumbent"`) and ten measured
|
|
283
|
+
candidates (`admission: "candidate"`). A candidate's `tier` is not a ladder seat; it is a placement
|
|
284
|
+
from `tier_bands`, read off the best measured Artificial Analysis score:
|
|
285
|
+
|
|
286
|
+
| Band | Score | Candidates placed there |
|
|
287
|
+
| --- | --- | --- |
|
|
288
|
+
| W | ≤ 37 | MiniMax M3 (29) |
|
|
289
|
+
| S | 38–44 | DeepSeek V4.1 Flash (39), Gemini 3.8 Flash (41), GLM 5.3 Flash (42), Kimi K3 (44), Grok 4.6 (44) |
|
|
290
|
+
| X | 45–50 | Qwen3.8 Max (45), GLM 5.3 (45), MiMo V2.6 Pro (46), Muse Spark 1.3 (48) |
|
|
291
|
+
| F | ≥ 51 | none measured |
|
|
292
|
+
|
|
293
|
+
The bands are calibrated on the incumbents' measured range (Luna tops W at 37; Terra 38–42; the X
|
|
294
|
+
seats sit 45–50; Astra and Fable 5.1 cover 51 up). They place candidates only. **An incumbent's tier
|
|
295
|
+
is its seat on its own provider ladder and is never re-derived from a score** — which is why Opus 5
|
|
296
|
+
`max` (51) and Fable 5 `max` (50) sit outside their own band without moving tier.
|
|
297
|
+
|
|
298
|
+
Admission rules, enforced in `lib/router.mjs`, not merely advised:
|
|
299
|
+
|
|
300
|
+
1. A candidate is ranked **only** when the caller passes `--include-candidates` (`includeCandidates:
|
|
301
|
+
true`), **or** when a runtime inventory marks that model `exposed` or `verified`. An exposed
|
|
302
|
+
candidate is admitted for **noncritical lanes only**.
|
|
303
|
+
2. A candidate is **never** eligible for an independent-review seat, a **T4/T5** pair, or a
|
|
304
|
+
risk-floor **review** row. It is returned with `excluded_reason: "candidate: not admitted for
|
|
305
|
+
critical review"` — visible, so nobody concludes it was merely too expensive. The CLI tightens
|
|
306
|
+
this one notch further: when a dispatch carries an independent-review requirement at all (money,
|
|
307
|
+
auth, migrations, concurrency), the **implementation** seat closes to candidates too — an
|
|
308
|
+
unvetted model does not write the change a second reviewer exists to catch.
|
|
309
|
+
3. Held candidates still appear in `explain()`, under a separate **"Candidates (not admitted by
|
|
310
|
+
default)"** block with the flag needed. A ranking that hides its alternatives cannot be audited.
|
|
311
|
+
4. Ranking is by measured `$/task` where a measurement exists, and by the token-basket `price_index`
|
|
312
|
+
where it does not. Each row carries `thinking_cost_index` (100 = Sol `medium` at $0.50/task) and
|
|
313
|
+
the `marginal_thinking` step into that effort (`delta_score`, `cost_multiplier`) — the price of
|
|
314
|
+
one more notch of thinking, so depth can be bought or refused on evidence.
|
|
315
|
+
5. `--cheapest-thinking` (`cheapestThinkingFor(pair, { maxScoreLoss })`) answers the thinking-cost
|
|
316
|
+
question directly: the lowest-cost (model, effort) within `maxScoreLoss` (default 2) displayed
|
|
317
|
+
points of the incumbent config for that pair. On `W T3` that is Luna `xhigh`; on `S T3` it is
|
|
318
|
+
Terra `high`, and GLM 5.3 Flash `default` only when candidates are included.
|
|
319
|
+
|
|
320
|
+
None of this overrides a risk floor, a retention constraint or reviewer independence. A candidate
|
|
321
|
+
that is cheaper *and* higher-scoring than the incumbent still does not get a money, auth, migration
|
|
322
|
+
or concurrency review seat, because score is not reliability and none of these models has verified
|
|
323
|
+
data-retention or endpoint-eligibility terms. Never send secrets, PII, production tokens or
|
|
324
|
+
credential-bearing code to one.
|
|
325
|
+
|
|
326
|
+
## Tier × thinking resolution table
|
|
327
|
+
|
|
328
|
+
Concrete pairs used throughout the matrices below. "S T3" always means the Claude and Codex cells of
|
|
329
|
+
this row.
|
|
330
|
+
|
|
331
|
+
| Pair | Claude | Claude $ in/out | Codex | Codex $ in/out |
|
|
332
|
+
| --- | --- | --- | --- | --- |
|
|
333
|
+
| W T0–T1 | Haiku, thinking off | $1 / $5 | Luna `low` | $0.20 / $1.20 |
|
|
334
|
+
| W T2 | Haiku, small budget | $1 / $5 | Luna `medium` | $0.20 / $1.20 |
|
|
335
|
+
| W T3 | — (escalate to S; no headroom) | — | Luna `xhigh` (default) / `max` | $0.20 / $1.20 (~$0.06 / $0.10 per task) |
|
|
336
|
+
| S T1 | Sonnet `low` | $2 / $10 | Terra `low` | $2 / $12 |
|
|
337
|
+
| S T2 | Sonnet `medium` | $2 / $10 | Terra `medium` | $2 / $12 |
|
|
338
|
+
| S T3 | Sonnet `high` | $2 / $10 | Terra `high` | $2 / $12 |
|
|
339
|
+
| X T2 | Opus `medium` | $5 / $25 | Sol `medium` | $4 / $20 |
|
|
340
|
+
| X T3 | Opus `high` | $5 / $25 | Sol `high` | $4 / $20 |
|
|
341
|
+
| X T4 | Opus `xhigh` | $5 / $25 | Sol `high` + independent Sol `high` reviewer | 2x ($4 / $20) |
|
|
342
|
+
| F T3 | Fable 5 `high` | $10 / $50 | Astra `high` | $10 / $50 (~$1.41/task) |
|
|
343
|
+
| F T4 | Fable 5 `xhigh` | $10 / $50 | Astra `xhigh` | $10 / $50 (~$1.85/task) |
|
|
344
|
+
| F T5 | Fable 5 `max` (essentially never); Fable 5.1 only under the ≤2% cap | $10 / $50 | Astra `max` (essentially never) | $10 / $50 (~$2.57/task) |
|
|
345
|
+
|
|
346
|
+
Prices per MTok; thinking level does not change the unit price, but higher levels emit more
|
|
347
|
+
(billed-as-output) thinking tokens — same rate, more tokens.
|
|
348
|
+
|
|
349
|
+
## Default routing
|
|
350
|
+
|
|
351
|
+
- mechanical/scoped → W T0–T1
|
|
352
|
+
- standard implementation → S T2
|
|
353
|
+
- complex implementation → S T3
|
|
354
|
+
- planning default → S T3; hard planning → X T3–T4; frontier planning only → F T3–T4
|
|
355
|
+
- difficult debug/review → X T3
|
|
356
|
+
- security/payments/concurrency/migrations/critical compatibility → X T4
|
|
357
|
+
- frontier/long-horizon/cross-system/very ambiguous → F T3–T4
|
|
358
|
+
- F T5 = last escalation, never a default
|
|
359
|
+
|
|
360
|
+
## Escalation ladder
|
|
361
|
+
|
|
362
|
+
```
|
|
363
|
+
Claude: Haiku → Sonnet low → Sonnet medium → Sonnet high → Opus high → Opus xhigh → Fable 5 high → Fable 5 xhigh/max → Fable 5.1 (≤2% cap, explicit only)
|
|
364
|
+
Codex: Luna low → Luna medium → Luna xhigh → Luna max → Terra medium → Terra high → Sol medium → Sol high → Sol high + independent Sol high reviewer → Astra high → Astra xhigh → Astra max (essentially never)
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
Escalate incrementally — never jump from S medium to F max. Raise **thinking** first when the
|
|
368
|
+
problem needs deeper reasoning; raise the **model** when the problem needs capacity, judgment,
|
|
369
|
+
autonomy, context or consistency beyond the current tier. Measured on routine tasks: medium ==
|
|
370
|
+
high output quality at 3.5x speed — but do not treat "mid model + high thinking" as universally equal
|
|
371
|
+
to a bigger model; they are not perfectly substitutable.
|
|
372
|
+
|
|
373
|
+
Before escalating after a failure, first remove redundant context, duplicate evidence passes and
|
|
374
|
+
unnecessary dispatches, and fix missing evidence, tool access or environment — those are not
|
|
375
|
+
reasoning failures and no amount of thinking repairs them. Budget **one** targeted escalation after
|
|
376
|
+
a failed attempt, preserve the diff and rerun the failed acceptance check; at a second relevant
|
|
377
|
+
failure, narrow scope or move to a higher-capacity model rather than traversing every intermediate
|
|
378
|
+
setting. Never use a retry policy to lower a required implementation or review floor.
|
|
379
|
+
|
|
380
|
+
**Refusal loop**: a weaker subagent may explicitly refuse a task as beyond its capability →
|
|
381
|
+
re-dispatch one tier up, keeping the thinking level. Never ask it to improvise an unsafe solution.
|
|
382
|
+
|
|
383
|
+
**T4/T5 on Codex**: on the gpt-5.6 family there is no usable effort above `high`, so X T4 stays
|
|
384
|
+
*Sol high + an independent Sol high reviewer* (different agent, no shared history) — that pairing is
|
|
385
|
+
a risk-floor rule, not a capability workaround, and Astra does not replace it. T5 exists only as
|
|
386
|
+
Astra `max` and is essentially never correct; narrow the task instead.
|
|
387
|
+
|
|
388
|
+
**F on Codex**: dispatch Astra at `high` (default F), `xhigh` (F T4, hardest case), `max`
|
|
389
|
+
(essentially never) — one agent, exactly like Fable 5 on Claude. The old decomposition workaround is
|
|
390
|
+
**obsolete as an F substitute**. It survives only as what it always genuinely was: a way to make a
|
|
391
|
+
task *smaller*. If Astra `xhigh` stalls on an F T4 problem, the answer is still to narrow and
|
|
392
|
+
decompose — with Astra as synthesizer, never by forking full history into one agent.
|
|
393
|
+
|
|
394
|
+
## Two scores, not one difficulty
|
|
395
|
+
|
|
396
|
+
Classify each dispatch on separate axes, not a single "difficulty":
|
|
397
|
+
|
|
398
|
+
```
|
|
399
|
+
MODEL CAPACITY = max(complexity, ambiguity, scope, novelty, cross_system, context_size)
|
|
400
|
+
THINKING = max(reasoning_depth, ambiguity, debugging_uncertainty, risk)
|
|
401
|
+
REVIEW FLOOR = risk
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
`context_size` is a floor, not a difficulty signal: a working set near or over a small model's window
|
|
405
|
+
rules that model out regardless of how mechanical the task is — shard it or run it S at T0–T1.
|
|
406
|
+
|
|
407
|
+
Worked example: "recolor 300 components" = complexity 3, risk 1 → W/S. "Change one condition in the
|
|
408
|
+
refund-eligibility function" = complexity 1, risk 5 → S implementation + X T4 independent review.
|
|
409
|
+
**Route by risk, not by LOC.** Client-compatibility, store/billing integrations and payment state are
|
|
410
|
+
far riskier than a UI component of the same size.
|
|
411
|
+
|
|
412
|
+
## Risk floors (review, not implementation)
|
|
413
|
+
|
|
414
|
+
For high-blast-radius work, impose a minimum **review** model even when implementation was cheap. A
|
|
415
|
+
cheap model implementing plus a strong model reviewing beats running the whole task on the expensive
|
|
416
|
+
model. The reviewer must be an independent agent — a separate child with no full-history fork.
|
|
417
|
+
|
|
418
|
+
The **area** column is the registry key: these rows are `registries/routing-matrix.json` →
|
|
419
|
+
`risk_floors`, one row per key, same names, same floors. A project binding adds rows or raises
|
|
420
|
+
floors; it never renames an area.
|
|
421
|
+
|
|
422
|
+
| Area | Implementation floor | Review floor | Independent review | Reading |
|
|
423
|
+
| --- | --- | --- | --- | --- |
|
|
424
|
+
| `text` | S T1 | S T2 | no | copy and strings |
|
|
425
|
+
| `i18n` | S T1 | S T2 | no | catalogs, locale keys |
|
|
426
|
+
| `ui-cosmetic` | W T0–T1 | S T1 | no | spacing, colour, non-semantic markup |
|
|
427
|
+
| `ui-component` | S T2 | S T3 | no | a component with behavior |
|
|
428
|
+
| `api-crud` | S T2 | S T3 | no | ordinary create/read/update/delete |
|
|
429
|
+
| `business-logic` | S T3 | X T3 | yes | rules with invariants |
|
|
430
|
+
| `sql` | S T2 | S T3 | no | queries, not schema |
|
|
431
|
+
| `schema-migration` | S T3 | X T4 | yes | any schema change + provenance |
|
|
432
|
+
| `realtime` | S T3 | X T3 | yes | broadcasting, presence, sockets |
|
|
433
|
+
| `client-compatibility` | X T3 | X T4 | yes | shipped or frozen clients |
|
|
434
|
+
| `auth` | S T3 | X T4 | yes | sessions, tokens, nonces |
|
|
435
|
+
| `security` | S T3 | X T4 | yes | signatures, secrets, permissions |
|
|
436
|
+
| `payments` | S T3 | X T4 | yes | card and gateway paths |
|
|
437
|
+
| `in-app-purchase` | X T3 | X T4 | yes | store purchase flows |
|
|
438
|
+
| `store-billing` | X T3 | X T4 | yes | store catalogs, prices, receipts |
|
|
439
|
+
| `refund` | X T3 | X T4 | yes | reversal and revocation |
|
|
440
|
+
| `entitlement` | X T3 | X T4 | yes | what the user is owed |
|
|
441
|
+
| `concurrency` | X T3 | X T4 | yes | locks, transactions, stale claims |
|
|
442
|
+
| `major-architecture` | X T4 | F T3 | yes | structural change across subsystems |
|
|
443
|
+
| `cross-system-redesign` | F T3 | F T4 | yes | several systems redesigned at once |
|
|
444
|
+
| `test-boilerplate` | W T0–T1 | — | no | scaffolding with no invariant of its own |
|
|
445
|
+
|
|
446
|
+
Concrete models per pair come from the **Tier × thinking resolution table** above: `X T4` is Opus
|
|
447
|
+
`xhigh` on Claude and Sol `high` + an independent second Sol `high` reviewer on Codex, and so on for
|
|
448
|
+
every row. Risk raises the **review** floor; it does not raise the implementation tier beyond the
|
|
449
|
+
row's own implementation floor.
|
|
450
|
+
|
|
451
|
+
**Project risk-floor rows in the consuming project's `## Orchestration bindings (project)` section
|
|
452
|
+
override these upward, never downward.**
|
|
453
|
+
|
|
454
|
+
## Agent defaults
|
|
455
|
+
|
|
456
|
+
| Agent role | Pair | Claude | Codex |
|
|
457
|
+
| --- | --- | --- | --- |
|
|
458
|
+
| explore, route-data-flow-tracer, production-telemetry-collector | W T0–T1 | Haiku, thinking off | Luna `low` |
|
|
459
|
+
| test-engineer, code-simplifier, backend-fixer (standard), frontend-fixer (standard), code-reviewer (default), general | S T2 | Sonnet `medium` | Terra `medium` |
|
|
460
|
+
| db-migration-author, adversarial-skeptic, frontend-specialist | S T3 | Sonnet `high` | Terra `high` |
|
|
461
|
+
| db-concurrency-specialist | X T3 | Opus `high` | Sol `high` |
|
|
462
|
+
| provider-webhook-specialist | X T2 (T3 on broken signatures/idempotency) | Opus `medium`/`high` | Sol `medium`/`high` |
|
|
463
|
+
| orchestrator / planning | S T3 default; X T3–T4 when complex; F only frontier | Sonnet high; Opus high/xhigh; Fable high | Terra high; Sol high for high-risk cross-system work; Astra high for frontier planning |
|
|
464
|
+
|
|
465
|
+
## Flow matrix (task segments)
|
|
466
|
+
|
|
467
|
+
| Flow | Segment | Pair | Claude | Codex |
|
|
468
|
+
| --- | --- | --- | --- | --- |
|
|
469
|
+
| INVESTIGATION | evidence collection (tracer, telemetry, explore) | W T0–T1 | Haiku | Luna low |
|
|
470
|
+
| | evidence synthesis | S T2; X T3 if complex | Sonnet medium; Opus high | Terra medium; Sol high |
|
|
471
|
+
| | adversarial-skeptic | S T3 | Sonnet high | Terra high |
|
|
472
|
+
| FEATURE | plan / design | S T3; X T3–T4 complex; F T4 frontier | Sonnet high; Opus high/xhigh; Fable xhigh | Terra high; Sol high (+2nd Sol at T4); Astra xhigh |
|
|
473
|
+
| | TDD (test-engineer) | S T2 | Sonnet medium | Terra medium |
|
|
474
|
+
| | standard implementation (API CRUD / UI components) | S T2 | Sonnet medium | Terra medium |
|
|
475
|
+
| | money/security implementation | X T3 | Opus high | Sol high |
|
|
476
|
+
| | mechanical subtasks | W T0–T1 | Haiku | Luna low |
|
|
477
|
+
| | review | S T3; risk floors override upward | Sonnet high | Terra high |
|
|
478
|
+
| | re-review (verify fixes landed) | S T1 | Sonnet low | Terra low |
|
|
479
|
+
| BUG_FIX | reproduce / evidence | W/S T0–T1 | Haiku/Sonnet low | Luna low/Terra low |
|
|
480
|
+
| | hypothesis (logic) | S T3 | Sonnet high | Terra high |
|
|
481
|
+
| | hypothesis money/concurrency/security | X T3–T4 | Opus high/xhigh | Sol high (+2nd Sol at T4) |
|
|
482
|
+
| | standard fix | S T2 | Sonnet medium | Terra medium |
|
|
483
|
+
| | money/concurrency/security fix | X T3 | Opus high | Sol high |
|
|
484
|
+
| | regression test | S T2 | Sonnet medium | Terra medium |
|
|
485
|
+
| REFACTOR | analysis + incremental plan | S T2 | Sonnet medium | Terra medium |
|
|
486
|
+
| | mechanical steps (moves, scoped extractions) | W T0 | Haiku | Luna low |
|
|
487
|
+
| | refactor in money areas | S T3 impl + X T4 review | Sonnet high → Opus xhigh | Terra high → Sol high + 2nd Sol high |
|
|
488
|
+
| DEPLOY | pre-checks, smoke | W T0 | Haiku | Luna low |
|
|
489
|
+
| | soak / telemetry interpretation | S T2 | Sonnet medium | Terra medium |
|
|
490
|
+
| CONFIG | standard config change | S T2 | Sonnet medium | Terra medium |
|
|
491
|
+
| | DB migration (migration + provenance) | S T3 | Sonnet high | Terra high |
|
|
492
|
+
| | migration on money tables | S T3 impl + X T4 review | Sonnet high → Opus xhigh | Terra high → Sol high + 2nd Sol high |
|
|
493
|
+
| REVIEW | default review | S T2–T3 | Sonnet medium/high | Terra medium/high |
|
|
494
|
+
| | money/security diff review | X T4 | Opus xhigh | Sol high + 2nd Sol high |
|
|
495
|
+
| RESEARCH | source collection | W T0–T1 | Haiku | Luna low |
|
|
496
|
+
| | synthesis + corroboration | S T2–T3 | Sonnet medium/high | Terra medium/high |
|
|
497
|
+
| INCIDENT | evidence | 4x W/S T1–T2 + S log specialist + S DB/runtime specialist | Haiku/Sonnet + Sonnet + Sonnet | Luna/Terra + Terra + Terra |
|
|
498
|
+
| | synthesis | X T3; F T3 only if X finds no solid hypothesis | Opus high; Fable high | Sol high; Astra high |
|
|
499
|
+
|
|
500
|
+
## Multi-agent orchestration
|
|
501
|
+
|
|
502
|
+
Never use premium models for mechanical evidence collection — a senior model as a grep agent is pure
|
|
503
|
+
waste. Invariant formula:
|
|
504
|
+
|
|
505
|
+
**W collects → S builds → X decides/reviews → F resolves the exceptional.**
|
|
506
|
+
|
|
507
|
+
For complex investigations: multiple W/S evidence agents → X synthesis → F only if the problem stays
|
|
508
|
+
ambiguous. For complex features: X/F planning → S builders → W mechanical subtasks → X review. The
|
|
509
|
+
planning model must not execute all subtasks itself. F appearing **once** in a whole flow (as planner
|
|
510
|
+
or synthesizer) is usually enough.
|
|
511
|
+
|
|
512
|
+
On Codex, when supplying a model override to `spawn_agent`, use `fork_turns="none"` or a bounded
|
|
513
|
+
recent-turn count, never a full-history fork. Independent reviewers and synthesizers must not share
|
|
514
|
+
the implementer's history — on any harness.
|
|
515
|
+
|
|
516
|
+
## Task shape moves the ranking — technology does not (measurably)
|
|
517
|
+
|
|
518
|
+
A model can be stronger on one kind of work and weaker on another. The benchmark evidence **proves
|
|
519
|
+
this for task shape** and **says nothing about technology**. Keep the two apart: rank the same models
|
|
520
|
+
across raw-pass coding, strict end-to-end completion, terminal/agentic loops and document reasoning
|
|
521
|
+
and they reorder by several places. A model that is last at finishing a code change end-to-end can be
|
|
522
|
+
second at shell/agentic loops and document reasoning — which makes it the value pick for deploys,
|
|
523
|
+
CI, container work and log spelunking, and a poor pick for "land this refactor green".
|
|
524
|
+
|
|
525
|
+
Nothing in that evidence separates CSS from JavaScript, one backend language from another, or one
|
|
526
|
+
datastore from another. **Do not invent per-technology routing rules from it.** Unverified stays
|
|
527
|
+
labelled unverified.
|
|
528
|
+
|
|
529
|
+
**Route by verifiability instead — that is the real per-technology axis.**
|
|
530
|
+
|
|
531
|
+
| Work | Model can self-verify? | Consequence |
|
|
532
|
+
|---|---|---|
|
|
533
|
+
| Application logic with a test runner | Yes | Model tier actually moves the outcome. Route by tier |
|
|
534
|
+
| SQL / migrations | Only if it runs the query | Tier matters less than forcing the real database loop + provenance check. A cheap model with the loop beats an expensive one without it |
|
|
535
|
+
| CSS / visual | **No** — not without a screenshot | Tier is nearly irrelevant. Route to browser automation and design skills, not to a bigger model. This is the most common over-escalation |
|
|
536
|
+
| Cache / concurrency | No — interleavings are invisible | Not a fluency problem; it is reasoning about schedules. The risk floor applies; tier does not substitute for it |
|
|
537
|
+
|
|
538
|
+
Corollary: **before escalating a tier on a CSS or visual task, add a screenshot instead.** It is free
|
|
539
|
+
relative to the tier jump and it fixes the actual gap.
|
|
540
|
+
|
|
541
|
+
If per-technology routing is wanted, measure it locally: take 10 closed tasks per stack, replay each
|
|
542
|
+
at a few frontier configs, record first-pass-green and $/task, and write the table from those
|
|
543
|
+
numbers. Until that exists, the per-technology map is empty and honestly so.
|
|
544
|
+
|
|
545
|
+
## F — only when it pays for itself
|
|
546
|
+
|
|
547
|
+
- Multi-system planning with entangled subsystems, hard debugging where X stalled, long-horizon
|
|
548
|
+
autonomous refactors, genuinely frontier ambiguity. Default `high`; `xhigh` only for the hardest
|
|
549
|
+
case; `max` essentially never.
|
|
550
|
+
- **Which F**: provider-flexible F work goes to the cheapest measured frontier config (Astra `high`)
|
|
551
|
+
— same measured score as Fable 5 `max` at a quarter the cost per task. Choose Fable 5 instead when
|
|
552
|
+
the flow is single-provider Claude, when the working set is large enough that long-context
|
|
553
|
+
repricing is a risk, or when the task touches anything the other model's unverified retention
|
|
554
|
+
terms make unwise. Choose Fable 5.1 only under its cap.
|
|
555
|
+
- **F is no longer the expensive tier, so the F band is wider — 10–15% of dispatches.** The old
|
|
556
|
+
1–5% cap existed because F cost 4–5x X; that premium is gone on the cheap frontier config, so
|
|
557
|
+
refusing to escalate no longer saves money — it just buys a worse answer.
|
|
558
|
+
- **But the band belongs to cheap F only.** 10–15% is the budget for the cheap frontier config. The
|
|
559
|
+
expensive ones stay rare. Widening the *tier* share must not widen the *expensive-config* share.
|
|
560
|
+
- **The guardrail is $/task, not the tier label.** Cheap F invites over-escalation; what stops it is
|
|
561
|
+
the flow's mean cost per task. F for a rename is still waste, just waste that hides better.
|
|
562
|
+
- **Fable 5.1 cap**: never a default at any tier; only on explicit user request or after a
|
|
563
|
+
documented Fable 5 F-T4 failure. If it exceeds 2% of dispatches in a flow, the routing is wrong.
|
|
564
|
+
- **Retention caveat**: frontier models with mandatory 30-day retention (no zero-data-retention
|
|
565
|
+
unless expressly authorized) never receive secrets, PII, production tokens or credential-bearing
|
|
566
|
+
code. Safety classifiers may return a refusal stop reason — enable server-side fallbacks so the
|
|
567
|
+
request reroutes automatically; a decline before any output is not billed. Single hard turns can
|
|
568
|
+
run many minutes: stream, and plan timeouts and progress UX.
|
|
569
|
+
|
|
570
|
+
## Dispatch metadata
|
|
571
|
+
|
|
572
|
+
**Selection runs per shard, at dispatch time, against the live inventory — never once per task.**
|
|
573
|
+
Every dispatch is a PlanShard, and every PlanShard carries exactly this `routing` block (the same
|
|
574
|
+
thirteen names used in [dispatch](dispatch.md), [protocol.md](../protocol.md) and
|
|
575
|
+
`schemas/capability-contract.schema.json` — no synonyms):
|
|
576
|
+
|
|
577
|
+
| Field | Meaning |
|
|
578
|
+
| --- | --- |
|
|
579
|
+
| `pair` | The resolved tier × thinking pair, e.g. `S T3` |
|
|
580
|
+
| `tier` | `W` / `S` / `X` / `F` |
|
|
581
|
+
| `thinking_level` | `T0`…`T5` |
|
|
582
|
+
| `model_requested` | What the resolution row names for this pair on this ladder |
|
|
583
|
+
| `effort_requested` | The effort that row names |
|
|
584
|
+
| `model_effective` | What the runtime actually accepted; `null` when the shard is blocked |
|
|
585
|
+
| `effort_effective` | The effort the runtime actually accepted |
|
|
586
|
+
| `review_floor` | The minimum review pair this shard's risk imposes, or `null` |
|
|
587
|
+
| `independent_review` | Whether a separate reviewer with no forked history is required |
|
|
588
|
+
| `selection_reason` | Why this pair and this model — never "complex task" |
|
|
589
|
+
| `inventory_revision` | Which inventory reading the choice was made against |
|
|
590
|
+
| `price_source` | Dated provenance of the `$/task` figure |
|
|
591
|
+
| `est_usd_per_task` | Measured cost for the effective config, or `null` when unmeasured |
|
|
592
|
+
|
|
593
|
+
A runtime substitution that violates a floor invalidates that phase. Never silently fall back: an
|
|
594
|
+
inventory that exposes nothing eligible for the tier yields `blocked: "no eligible model"`, never a
|
|
595
|
+
quieter tier. When the inventory changes mid-flow, re-run selection for the **remaining** shards only.
|
|
596
|
+
|
|
597
|
+
Recorded alongside the block, in `flow:{task_id}` rather than inside it: `harness`, `provider`,
|
|
598
|
+
`role`, `risk`, `reason_for_tier`, `price_as_of`, `benchmark_version`, `inventory_source`,
|
|
599
|
+
`inventory_observed_at`, `availability`, `quota_state`, `window_state` and the acceptance outcome
|
|
600
|
+
(`registries/routing-matrix.json` → `dispatch_metadata_fields`). On Codex the thinking level maps to
|
|
601
|
+
`reasoning_effort`.
|
|
602
|
+
|
|
603
|
+
Choosing X/F, T4/T5, a legacy fallback or any override requires an explicit reason — e.g.
|
|
604
|
+
`provider=claude, model=opus, thinking=T4, risk=high, review_floor=X T4, reason="entitlement state +
|
|
605
|
+
backwards compatibility"`. Generic justifications like "complex task" are not acceptable. Never claim
|
|
606
|
+
the active parent model changed unless the harness confirms it.
|
|
607
|
+
|
|
608
|
+
## Cost discipline
|
|
609
|
+
|
|
610
|
+
Optimize the total cost of the solution, not one call. A W run that causes three reworks costs more
|
|
611
|
+
than S done right the first time; F for a rename is waste.
|
|
612
|
+
|
|
613
|
+
**The primary metric is mean $/task across the flow, not the tier histogram.** Tier shares are a
|
|
614
|
+
sanity check on classification. A healthy flow lands around **$0.40–0.70 mean $/task**: mostly the W
|
|
615
|
+
model for collection and mechanical work, the X model for the bulk of building and reviewing, and the
|
|
616
|
+
cheap frontier config on the genuinely hard 10–15%. Above ~$1.00 the router is escalating work a
|
|
617
|
+
cheaper tier would have solved; below ~$0.25 mechanical models are probably being run on tasks that
|
|
618
|
+
need judgment, and the reworks are hiding in the wall-clock.
|
|
619
|
+
|
|
620
|
+
Target distribution, per provider: **W 30–40%** of dispatches, **S 40–50%**, **X 5–12%**, **F
|
|
621
|
+
10–15%**. If 30%+ of tasks land on F, classification is too aggressive; 50% X is waste and strictly
|
|
622
|
+
dominated.
|
|
623
|
+
|
|
624
|
+
**Cost-effective routing, in one line:** climb the frontier, never step onto a dominated config, and
|
|
625
|
+
stop at the first one that solves the task reliably. Risk-floor rows override this — they buy
|
|
626
|
+
independence and care, not score.
|
|
627
|
+
|
|
628
|
+
Target: **minimum reliable model × minimum sufficient thinking × independent review proportional to
|
|
629
|
+
risk.**
|
|
630
|
+
|
|
631
|
+
## Quota windows — spend the budget, do not merely minimise it
|
|
632
|
+
|
|
633
|
+
The section above optimises **price per solution**. This one optimises **availability**, and the two
|
|
634
|
+
disagree exactly when a window is nearly spent. Providers meter in rolling windows, not one pool: a
|
|
635
|
+
short window (hours), a weekly window, and the billing month. A flow that ignores them either stalls
|
|
636
|
+
mid-task with a review unbought, or finishes a window with most of it unspent — and unspent headroom
|
|
637
|
+
on an expiring window bought nothing.
|
|
638
|
+
|
|
639
|
+
**Read before you spend.** Any flow that will dispatch more than a handful of agents starts by
|
|
640
|
+
reading current consumption from the harness's usage view and writing the reading, with the window it
|
|
641
|
+
belongs to, into the flow's ledger. Where usage is not exposed, record it as unknown — never invent a
|
|
642
|
+
percentage. Routing decisions made blind to the window are guesses.
|
|
643
|
+
|
|
644
|
+
**Budget the flow, not the call.** Before a multi-task flow, estimate dispatches × tier against
|
|
645
|
+
remaining headroom in the *tightest* window, usually the weekly one on multi-day work. If the flow
|
|
646
|
+
does not fit, decide what changes **now**, while every option is still open.
|
|
647
|
+
|
|
648
|
+
**The degradation ladder.** When a window is tight, give things up in this order:
|
|
649
|
+
|
|
650
|
+
| Order | Give up | Why it is cheap |
|
|
651
|
+
| --- | --- | --- |
|
|
652
|
+
| 1 | Parallel breadth on evidence gathering — serialise the fan-out | Costs wall-clock, not correctness |
|
|
653
|
+
| 2 | One thinking notch on dispatches that are **not** on a risk-floor row | Measured: medium ≈ high output quality on routine work |
|
|
654
|
+
| 3 | Full re-review → scoped re-review over the fix range only | Verifies the fix without re-reading the task |
|
|
655
|
+
| 4 | Implementation model tier where the plan carries literal code | Transcription does not need judgment |
|
|
656
|
+
| 5 | Batch same-shape tasks into one dispatch and review the batch as a unit | One context build instead of N |
|
|
657
|
+
|
|
658
|
+
**Never give up, at any consumption level:** the independent-review seat on a risk-floor row, or the
|
|
659
|
+
review model on money, security, concurrency, migrations or client compatibility. A miss there costs
|
|
660
|
+
more than an entire window. **Cut the implementer, never the reviewer.**
|
|
661
|
+
|
|
662
|
+
**Defer beats degrade.** If the only way to fit the remaining work into this window is to cut a
|
|
663
|
+
risk-floor review, stop and wait for the window to roll. Tell the human partner what you are waiting
|
|
664
|
+
for and when it resets.
|
|
665
|
+
|
|
666
|
+
**Watch the burn rate inside a task, not just across the flow.** Long fix loops are the largest
|
|
667
|
+
consumer — a task that reaches fix round 3 typically spends about as much again on rounds 4–5. Decide
|
|
668
|
+
at round 3 whether to fund the rest or park the task. Escalating to a stronger implementer at round 4
|
|
669
|
+
is usually *cheaper* than three more rounds of the same model failing the same way.
|
|
670
|
+
|
|
671
|
+
**Schedule against the window's shape.** Front-load risk-floor reviews while headroom is certain.
|
|
672
|
+
Leave mechanical W-tier work for the tail: it degrades gracefully, resumes cleanly, and is the only
|
|
673
|
+
work safe to run when a window is nearly gone.
|
|
674
|
+
|
|
675
|
+
**Record it.** When quota influenced a routing decision, add `window_state` to that dispatch's
|
|
676
|
+
metadata alongside `reason_for_tier` — otherwise the next reader cannot tell a considered downgrade
|
|
677
|
+
from sloppy routing.
|