Fabryka · RicardoPlate I — Foundationsher.fabryka.ai

The Economics
of Routing.

Two centuries of price theory, applied to one question: which model should run your task — and what is that choice worth?

David Ricardo
1817 · comparative advantage
specialise & trade
— the thesis01Route each task to the model that holds the advantage there, per dollar — even when another model is absolutely better at everything. Specialisation beats one frontier model.
quality / $ code task web task cheap model wins here frontier wins here the right call flips
fig. 01 — the advantage flips per task · measured
Vilfredo Pareto
1906 · efficiency frontier
no free lunch left
— the proof02Keep only the models on the price–quality frontier. Anything dominated — worse and not cheaper — is dropped automatically. The frontier is the receipt.
0.780.66 $0.0006/task$/task · log → gpt-5-nano ds-flash ds-pro kimi gpt-4.1-mini · dominated
fig. 02 — the frontier, observed · BizAgentBench v1, 2026-06-10
Friedrich Hayek
1945 · the price system
knowledge in society
— the signal03The price signal coordinates which model handles what. Routing is decentralised knowledge aggregation — no central planner could pick better than the market does.
(task, model, price, outcome) — scattered, local routing table code → flash web → pro chat → local biz → pro
fig. 03 — scattered knowledge → one price signal · schematic
Lloyd Shapley
1953 · value & matching
who earned the win
— the hard part04In a multi-step agent, attribute the outcome to the decision that earned it — the Shapley value of each model call. Plus stable task↔model matching.
one agent task · outcome 0.90 — who earned it? plan search + tools write-up φ = .18 φ = .45 φ = .27 Σφ = 0.90 — credit lands on the call that moved the outcome, so the router learns per decision, not per transcript.
fig. 04 — Shapley credit per model call · schematic
Kenneth Arrow
1951 · social choice
aggregate the votes
— the table05Aggregate many verified verdicts into one ranking per task type. The routing table is preference aggregation over ground-truth outcomes.
per-task verdicts (judge-scored) task 07 · pro ≻ kimi ≻ mini task 12 · flash ≻ pro ≻ nano task 31 · pro ≻ flash ≻ mini task 44 · nano ≻ flash ≻ kimi one ranking 1 · ds-pro 2 · flash 3 · nano
fig. 05 — many verdicts → one routing column · schematic
Alvin Roth
1990s · market design · Nobel 2012
matching markets
— the router06Design the market that matches tasks to models — the same engineering that matched doctors to hospitals and kidneys to patients, pointed at inference.
codewebchatbiz ds-flashds-prolocal qwends-pro green = stable match · grey = rejected pairings
fig. 06 — task ↔ model matching market · schematic
Léon Walras
1874 · general equilibrium
clear the market
— equilibrium07The Walrasian auctioneer finds the prices that clear the market. Ricardo is that auctioneer for the task↔model allocation — settling supply, demand and price every call.
$ / quality pt traffic routed to a model → demand · tasks wanting quality supply · capacity at price λ* — the clearing price of quality
fig. 07 — the auctioneer clears the task↔model market · schematic

Sources & further reading

01 Ricardo, On the Principles of Political Economy and Taxation (1817), ch. 7 — comparative advantage.
02 Pareto, Manuale di economia politica (1906) — Pareto efficiency / optimality.
03 Hayek, “The Use of Knowledge in Society,” American Economic Review 35(4) (1945).
04 Shapley, “A Value for n-Person Games” (1953); Gale & Shapley, “College Admissions and the Stability of Marriage” (1962).
05 Arrow, Social Choice and Individual Values (1951); Nobel Prize 1972.
06 Roth & Sotomayor, Two-Sided Matching (1990); Nobel Prize 2012 (with Shapley).
07 Walras, Éléments d’économie politique pure (1874) — general equilibrium.
Ricardo · the routing layer“Each devotes its capital to the employments most beneficial.” — Ricardo, 1817Plate I