Published 2026-12-04 · updated 2026-12-04 — Adrian Cockcroft
Every new model release asks the same question: which one should I use? I've spent months answering it with retort, a benchmark that measures whole coding stacks (model × thinking level × agent × serving layer) by how often an unattended run completely implements a spec, in thirteen programming languages. The answer it keeps giving is that there isn't one best model. The cheapest stack that reliably works is different for Rust than for C#, different for a routine REST API than for a twelve-capability MCP server, and sometimes it's a free model running on my laptop.
So I stopped picking. I handed the decision to a router, let it choose a stack for every language, and measured what happened. All 26 runs passed on the first attempt (13 languages × 2 benchmarks), for $0.72 on the routine benchmark and $4.83 on the hard one. The cheapest single model that also passes every language, Claude Opus 5.5 at low effort, costs $6.26 and $29.66 to do the same work. That's about a ninth and a sixth of the price. Against Fable 5.2 it's 1/17 and 1/15.
This post explains how the router works, what it chose, and where the result is weaker than that headline.
The router: ruvnet's metaharness
MetaHarness is ruvnet's project for building agent harnesses. One of its packages, @metaharness/router, does exactly one thing: given a set of candidate models, each with a price and some labelled examples of how well it did on past queries, it sends a new query to the cheapest candidate predicted to be good enough. It predicts each candidate's quality by k-nearest-neighbours over that candidate's examples, then picks the cheapest one that clears a quality bar you set. It has no dependencies, no model files and makes no network calls. You bring the vectors and the labels.
The idea comes from ruvnet's own benchmark work, which found that wrapping a strong model in more structure didn't buy quality, but routing each query to the right, cheapest model was a measurable win. The project's design notes say as much. One proposes swapping a hard-wired model for a Router call "trained on real outcome labels". Another, in ruvnet's Ruflo project, admits its own router's seed data is hand-coded rather than measured.
That's the gap retort fills. Measured outcome labels for coding work are exactly what it produces.
How it works
retort runs experiments ──► master.db (every run, every language, every stack) ▲ │ │ ▼ │ retort report optimal --routing-json │ │ │ ▼ │ optimal.json ◄── or YOUR local optimal.json │ │ │ ▼ │ retort-route: translate to metaharness's │ training format (metaharness-routing-dataset@1) │ │ │ ▼ │ @metaharness/router picks a stack per language │ │ └──── retort runs the routed design ◄──┘ optimal.json is retort's published routing feed. For every task and language it lists the cheapest cloud stack and the cheapest local stack that have been measured to pass, with the pass rate, the number of runs behind it, and the mean cost per run. A small package, retort-route, turns that file into metaharness's own training format and asks the router:
- Candidates are every (model, thinking level) pair the feed routes to, so the router picks the thinking level too. Claude Haiku 5.5 at
lowand athighare different candidates with different prices. - Each language is a training row, embedded as a one-hot vector, with each candidate's measured pass rate as its label. With k=1, the language's own measured result decides.
- A missing result is an explicit zero. The feed only lists stacks that cleared the bar, so "not listed" means "not shown to work". Without the zero, k-NN would borrow a neighbouring language's result and could route an untested model into a language it has never been tried in.
- Price is mean cost per run. Local models served on my 64 GB Mac cost \$0, so they win every language where they're proven. The router takes one price per model, so there's one router per benchmark.
- The bar is 1.00. Only a stack that fully passed every measured run qualifies.
Two design choices matter beyond retort. Nothing measured is hard-wired: regenerate optimal.json and the routes follow. And a local optimal.json wins: if you've run retort on your own machine, your file describes your own local models and your own benchmarks, which the published one can't. Several feeds can also be merged, so your local results and the published frontier results route together.
The experiment
Experiment 99 asked the router to route every language of both of retort's benchmarks: a routine REST API (rest-api-crud) and a hard twelve-capability MCP server (brazil-soccer-mcp). It was trained on optimal.json as published that morning (1,819 runs behind it). retort then ran each routed cell once, with the same harness, judge and pass gate as every other experiment. Here's what it chose, and what each run did:
| language | routine: routed to | pass | \$ | min | hard: routed to | pass | \$ | min |
|---|---|---|---|---|---|---|---|---|
| c | GPT-6.1 Terra low | 1.00 | 0.044 | 2.2 | GPT-6.2 Sol low | 1.00 | 0.468 | 8.4 |
| clojure | Haiku 5.5 low | 1.00 | 0.017 | 1.7 | Haiku 5.5 low | 1.00 | 0.366 | 7.2 |
| cpp | Haiku 5.5 low | 1.00 | 0.018 | 1.3 | Haiku 5.5 low | 1.00 | 0.634 | 10.1 |
| csharp | GPT-5.6 Terra default | 1.00 | 0.485 | 7.1 | Haiku 5.5 low | 1.00 | 0.161 | 5.2 |
| elixir | Haiku 5.5 low | 1.00 | 0.024 | 2.1 | GPT-6.2 Sol low | 1.00 | 0.402 | 8.1 |
| erlang | Haiku 5.5 low | 1.00 | 0.028 | 2.3 | Haiku 5.5 low | 1.00 | 0.925 | 24.5 |
| go | Qwen3-Coder-Next 80B (local) | 1.00 | 0 | 11.6 | GPT-5.6 Terra low | 1.00 | 0.405 | 4.6 |
| java | ThinkingCap 27B (local) | 1.00 | 0 | 27.7 | Haiku 5.5 low | 1.00 | 0.154 | 5.2 |
| objc | GPT-6.1 Terra low | 1.00 | 0.050 | 2.5 | Haiku 5.5 low | 1.00 | 0.155 | 5.3 |
| python | Qwen3-Coder-Next 80B (local) | 1.00 | 0 | 4.2 | Haiku 5.5 low | 1.00 | 0.307 | 7.2 |
| rust | Haiku 5.5 low | 1.00 | 0.020 | 1.5 | Haiku 5.5 low | 1.00 | 0.489 | 8.8 |
| swift | Haiku 5.5 low | 1.00 | 0.019 | 2.2 | Haiku 5.5 low | 1.00 | 0.310 | 7.4 |
| typescript | Haiku 5.5 low | 1.00 | 0.012 | 0.7 | Haiku 5.5 low | 1.00 | 0.060 | 4.0 |
Three languages went to free local models (Qwen3-Coder-Next 80B and ThinkingCap 27B, served by oMLX and driven by the Hermes agent). The rest went to the cheapest cloud model that had passed there, nearly always at low effort. No local model clears the hard benchmark in any language, so that half is all cloud.
Why two versions of GPT Terra? The router sent two cells to GPT-5.6 Terra even though GPT-6.1 Terra has replaced it. That's the data talking, not a mistake. On routine C#, 5.6 Terra passed its one run, while 6.1 Terra scored 0.67: two of its three passes needed a second attempt, which retort counts as half credit, because the metric is "did one unattended run work". On hard Go, 5.6 Terra passed, and 6.1 Terra has never been run on the hard benchmark. Removing the old model by hand would mean overriding the measurements the router exists to follow. The right fix is to measure 6.1 Terra in those two cells.
The results
What does it cost to run each benchmark once in every language? Every fixed cloud model and thinking level that has been measured in all thirteen languages, against the routed stack:
rest-api-crud (routine) — one run in each of 13 languages
| stack | languages fully passed | mean pass | cost to run the benchmark | wall-clock (min) | runs behind it |
|---|---|---|---|---|---|
| gpt-6-luna @ low | 3/13 | 0.64 | $0.11 | 15 | 39 |
| claude-haiku-5-5 @ low | 12/13 | 0.99 | $0.32 | 26 | 45 |
| gpt-6.1-terra @ low | 11/13 | 0.94 | $0.68 | 27 | 23 |
| metaharness-routed (measured) | 13/13 | 1.00 | $0.72 | 67 | 13 |
| gpt-6.2-sol @ low | 12/13 | 0.96 | $1.67 | 31 | 13 |
| gpt-6.2-astra @ low | 12/13 | 0.96 | $4.12 | 21 | 13 |
| claude-opus-5-5 @ low | 13/13 | 1.00 | $6.26 | 22 | 78 |
| claude-fable-5-2 @ low | 13/13 | 1.00 | $12.17 | 23 | 13 |
| claude-fable-5 @ default | 13/13 | 1.00 | $28.53 | 52 | 24 |
| claude-opus-5 @ default | 12/13 | 0.96 | $37.43 (partly unpriced) | 130 | 16 |
brazil-soccer-mcp (hard) — one run in each of 13 languages
| stack | languages fully passed | mean pass | cost to run the benchmark | wall-clock (min) | runs behind it |
|---|---|---|---|---|---|
| claude-haiku-5-5 @ low | 12/13 | 0.97 | $4.28 | 102 | 39 |
| metaharness-routed (measured) | 13/13 | 1.00 | $4.83 | 106 | 13 |
| gpt-5.6-terra @ low | 2/13 | 0.23 | $5.15 | 45 | 13 |
| gpt-6.2-sol @ low | 12/13 | 0.92 | $6.35 | 110 | 13 |
| gpt-6.2-astra @ low | 12/13 | 0.92 | $10.80 | 55 | 13 |
| claude-opus-5-5 @ low | 13/13 | 1.00 | $29.66 | 112 | 32 |
| claude-fable-5-2 @ low | 13/13 | 1.00 | $70.59 | 165 | 13 |
| claude-fable-5 @ default | 13/13 | 1.00 | $148.11 | 243 | 21 |
| claude-opus-5 @ default | 11/13 | 0.92 | $260.00 (partly unpriced) | 570 | 13 |
rest-api-crud (routine), without csharp — one run in each of 12 languages
| stack | languages fully passed | mean pass | cost to run the benchmark | wall-clock (min) | runs behind it |
|---|---|---|---|---|---|
| gpt-6-luna @ low | 3/12 | 0.64 | $0.11 | 13 | 36 |
| metaharness-routed (measured) | 12/12 | 1.00 | $0.23 | 60 | 12 |
| claude-haiku-5-5 @ low | 12/12 | 1.00 | $0.31 | 25 | 42 |
| gpt-6.1-terra @ low | 11/12 | 0.96 | $0.56 | 22 | 20 |
| gpt-6.2-sol @ low | 12/12 | 1.00 | $1.52 | 29 | 12 |
| gpt-6.2-astra @ low | 11/12 | 0.96 | $3.57 | 18 | 12 |
| claude-opus-5-5 @ low | 12/12 | 1.00 | $5.87 | 20 | 72 |
| claude-fable-5-2 @ low | 12/12 | 1.00 | $11.42 | 22 | 12 |
| claude-opus-4-8 @ default | 11/12 | 0.99 | $13.14 | 59 | 49 |
| claude-fable-5 @ default | 12/12 | 1.00 | $25.27 | 48 | 23 |
| claude-opus-5 @ default | 11/12 | 0.96 | $35.26 (partly unpriced) | 123 | 15 |
Left out because csharp is the one routine language no cheap stack clears unattended (Haiku 5.5 low is 0.83 there), so the router sends it to a far dearer cloud stack, and that one cell dominates the routed total.
Cost = sum over languages of the cell's mean USD/run (list price; local stacks $0). Fixed stacks are every frontier (cloud) model@effort measured in all languages of the task; routed runs are excluded from them. Generated by retort report optimal --write.
On both benchmarks the routed stack is the only entry that passes every language for less than Opus 5.5. The cheaper fixed stacks each miss at least one language. Haiku 5.5 at low is the interesting one: it's cheaper than the routed stack overall, but it misses routine C# (0.83) and hard C (0.67). The routed stack pays about $0.40 and $0.55 more to cover exactly those two cells. That's the router doing its job: you pay for a stronger model only where the cheap one has been seen to fail.
One language drove most of the routine bill. C# is the only routine language no cheap stack clears unattended, so the router had to send it to GPT-5.6 Terra, which cost $0.49 of the $0.72 total. Take C# out (the third table) and the routed stack is the cheapest stack that passes all twelve remaining languages: $0.23, 25% less than Haiku 5.5, 1/25 of Opus 5.5 and 1/49 of Fable 5.2. The saving over Haiku comes entirely from the three free local cells.
What it costs you instead of money
Time. The router minimises dollars and nothing else. The three free local cells took 44 of the routine benchmark's 67 minutes; ThinkingCap spent 27.7 minutes on Java that Haiku does in about two. Opus 5.5 runs the same benchmark in 22 minutes. If wall-clock matters, --cloud-only drops the local candidates.
Prediction error. The router's prices are means over few runs, so the realised bill came in higher than predicted: $0.72 against \$0.49 routine, and $4.83 against $4.15 hard. Most of the gap is two cells. C# on GPT-5.6 Terra cost \$0.49 against its one-run price of $0.26. A Haiku Erlang run on the hard benchmark wandered for 24.5 minutes and 10.5 million tokens, costing $0.93 against a three-run mean of $0.54. The routed results are also one run per language, while the fixed stacks are means over more runs. Treat the 25% margin over Haiku as indicative. The 6×–49× margins over the frontier models are not in doubt.
One price per model. The router takes a single price for each candidate, its mean across the benchmark, so a model that's cheap on average can beat one that's cheaper in a particular language. It didn't happen this time, and the receipt retort writes would show it if it did. I've asked ruvnet about per-example costs.
The loop closes
The routed runs are ordinary retort runs, so they flow back into optimal.json. Two routes moved on the next regeneration. Routine Objective-C moved from GPT-6.1 Terra to Haiku 5.5, because Terra's new run was dearer. Hard Erlang moved from Haiku to GPT-6.2 Sol, because that expensive Haiku run raised Haiku's average there. The Sol route rests on a single run, which is exactly the kind of decision the router should be cautious about. The next routed experiment will act on both changes. That's the point of the loop: more measurements make the routes better, and every routed run is another measurement.
Try it
The router, the translator and the routes are open source. From any repository with Node 20+ (until the package is on npm, run it from a retort checkout as node packages/retort-route/bin/retort-route.mjs):
# which stack should do routine work in Rust? (pulls retort's published optimal.json) retort-route route --task rest-api-crud --language rust # cloud only, as JSON, for the hard benchmark retort-route route --task brazil-soccer-mcp --cloud-only --json # your own measurements first, published frontier results second retort-route route --task rest-api-crud --feed ./optimal.json --feed published # export metaharness's training format to feed @metaharness/router yourself retort-route dataset --task rest-api-crud --out routing-dataset.json Every answer says which feed it was trained on (path, SHA-256, generation time, runs behind it), how many runs the chosen cell rests on, and every other candidate the router considered.
What's next
- A better free model. Qwen4-35B-A3B came out this week, the next generation of the local model behind much of this. If it clears more languages than the current local stacks, the router will send them to it at $0 without any change to the routing code.
- Fill the thin cells. Run GPT-6.1 Terra on routine C# and hard Go, and repeat the single-run hard routes (Erlang, C, Elixir), so fewer routes rest on one run.
- Upstream. I've offered the measured dataset to ruvnet as a seed corpus for metaharness, and asked about evidence weighting and per-example costs: ruvnet/metaharness#558.
The full write-up, raw data and every run's archived workspace are in the retort repo: the optimal stack, experiment 99, and how the routing works.

