Skip to content
Finest Research · August 2026

The Request Compiler

Serving every AI workload at its cheapest sufficient configuration: one model or a specialist team of them, with evidence measured on your traffic, and a floor that never goes away.

Finest Research··11 min read
A single request passes through the Finest gate and fans out to candidate configurations.
One request in. The compiler decides what serves: one proven arm, a cascade, an ensemble, or a specialist plan.
ABSTRACTCompanies overpay for AI because they call frontier models at maximum settings for work that cheaper models, or cheaper combinations of models, perform at equal measured quality. Switching without evidence is terrifying, so nobody switches. We describe the Finest Request Compiler: a system that observes the anatomy of each workload without reading it semantically, measures cheaper configurations against the requested model as an immutable baseline, and executes selectively (substituting, cascading, ensembling, or decomposing requests) only where a confidence-bounded non-inferiority result has been earned on the customer’s own traffic. A database-enforced billing law (debited = min(served, requested)) makes the worst case literally "exactly what you asked for." On a real 82-document benchmark corpus, the method measured 48% lower cost and 26% lower latency with zero added hallucinations on ~90% of documents. Coverage is deliberately incomplete: abstention is a designed outcome, and we report it.

1The overpayment problem

The model wars produced a strange market: quality went flat while prices stayed vertical. Mid-tier models now sit within a few points of the frontier on most workloads at a fraction of the price, and frontier models ship with reasoning modes on by default, so a classification call pays output-token prices to wait while the model thinks about a task that needed none of it. Claude Opus 5 costs $25 per million output tokens and Claude Fable 5 costs $50; Gemini 3.6 Flash costs $7.50, GPT-5.6 Luna costs $1.20, and DeepSeek V4 Flash costs $0.28. The last increment of quality is an order-of-magnitude step.

Engineering teams respond rationally: they pick a frontier model once, set max settings, and never revisit it, because the alternative is re-running evaluations they don't have against models that change monthly. The result is a market-wide overpayment that no one can see, because evidence about models on your workload is exactly what doesn't exist. Everyone sells access to models. Nobody sells proof about them.

within a few points of the frontier · up to 40× cheaper848688909294$0.5/M$1/M$5/M$10/M$50/Mquality →price per million output tokens (log) →deepseek-v4-flash · $0.28/Mclaude-fable-5 · $50/M

prices: provider list, verified aug 2026 (Finest registry) · scores: directional public benchmarks. Finest admits nothing on benchmarks; admissions happen only on evidence measured on your workload.

Figure 1.Price vs. directional quality across the current model market. Prices are provider-official list prices (August 2026, Finest registry); scores are directional public benchmarks shown for orientation only. Finest admits no arm on benchmarks, only on evidence measured against the customer's own workload.

2Workloads have anatomy

The compiler's first move is not a model call. It is a deterministic observation: countable structure, computed in microseconds, never embeddings or a serve-time classifier. Every request carries an anatomy, and the anatomy decides what may be tried. This is the same lesson document pipelines learned the hard way: born-digital versus scanned versus genomic-dense are knowable before any expensive pass, and the safe direction for a classification error is toward the expensive model.

AxisExamplesWhat it decides
Carrier / materialtext, image, scan, table, code tree, structured fileparsers, perception systems, provenance rules
Compositioncontext-vs-directive ratio, enumerated sub-parts, history depthwhether splitting or distillation is applicable
Couplingindependent items · map/reduce · ordered · globally entangledwhether decomposition is safe at all
Repetitionsame template, varying slotsper-template evidence, cache structure
Intenttask class, declared or inferred (precision-first, named abstains)the class of the quality bar
Contractschema, closed leaves, citations, streamingwhat can be verified, when bytes may release
Consequencedisposable draft → user decision → regulated domainthe evidence and review bar

Anatomy is stamped on every receipt as content-free facts, never prompt text, which produces a census of real traffic before any routing is built for it. Each axis earns its build: below a funding bar of measured demand, the observation stands alone as a trust fix and the routing waits.

3Execution: four strategies, one floor

"Best of best" is not always model selection. The compiler admits four execution strategies per request, plus a fifth, passthrough, which is a first-class success state. Every strategy shares one property: any loud failure escalates to the requested model, and the customer is debited no more than that model alone would have cost. The detour is our cost, by law.

REQUESTany shapeSHAPE STAMP~40µs · no modelclaude-opus-5$25/M · frontiergemini-3.6-flash$7.5/M · provenclaude-haiku-4.5$5/M · provenevidence says: this arm

Every request gets a shape stamp in microseconds: no model call, just structure. Evidence says which proven arm clears your bar for that shape, and only that arm serves.

1 request · 1 model · the right one · median latency improves
Figure 2.The four execution strategies. Route: evidence picks the cheapest proven arm. Cascade: a cheap arm answers first under deterministic validators, escalating on loud failure. Ensemble: two independent cheap arms must agree or the requested model decides. Plan: a complex request is decomposed into specialist legs, each validated before the next spends anything.

Why not simply send everything to the cheapest modern model? Because quality cliffs are input-dependent and invisible on easy inputs. The measurements below, from a real extraction benchmark run with production scoring rather than vibes, are the reason evidence gates every routing decision:

ModelClean textHard input (rotated scan / dense)The lesson
Haiku 4.5100% recall18% recall · invented values (rotated scan)perfect on text, unsafe alone on hard vision
GPT-5.4-mini100% recallmis-typed all 75 dense-lab values as "condition"the cliff appears only on dense inputs
GPT-5.4-nano100% recallreturned nothing (rotated scan)silent give-up; undetectable without checks
Gemini 3.5-flash-class100% recall100% recall (both hard shapes)the right fast vision arm, for this workload, this month
Opus 4.6 / 4.8100% recall100% recallthe floor you're paying for, needed only where it's needed
Figure 3.Measured quality cliffs are input-dependent (extraction benchmark, production scoring primitives). Every model is perfect on clean text; the failures only appear on hard inputs, and only measurement finds them before production does.

4Evidence before authority

A plan may influence a response only after it has climbed a ladder that is deliberately hard to climb: observation, then shadow comparison against the requested model at our cost, then a frozen plan confirmed once on a sealed, group-disjoint set, then a sticky canary with a circuit breaker, then, and only then, active service within a declared eligibility envelope. Quality-affecting changes (a model version bump, a prompt edit, a price epoch) invalidate authority until re-confirmed. The model-wars churn that today forces every team to re-evaluate quarterly becomes our scheduled maintenance.

The verifier hierarchy is honest about its limits. Deterministic checks (schema, conservation, provenance) authorize only the property they actually decide. Calibrated learned checks carry measured false-pass behavior. Blinded cross-family judges are supporting evidence, never promotion authority. And the requested model itself is the measured baseline: never ground truth merely because it was requested. Where nothing machine-checkable applies, the system abstains, the receipt says so, and no fee is earned.

Observing
Testing privately
Verified for this workload
Active
always available, and a success state: "No safe plan yet": the requested model serves, fee $0.00.
Figure 4.The evidence ladder as the customer sees it. States are per workload, not per account: one workload may be Active while another is Observing and a third is honestly idled.

5Case study: decomposing a document pipeline

A health-records pipeline began, as most do, by sending every document to the strongest available model. Its operators then decomposed the job into typed capabilities (OCR, extraction, verification, classification), measured twelve models against four document shapes with the production scorers, and re-assigned each leg to the cheapest sufficient executor while keeping the verification gate on the strongest model. The routing engine shipped dark, behind flags, with residency asserted at construction: a configuration that would route data to an ineligible endpoint refuses to build.

Pipeline legBeforeAfter (routed)Why it's safe
OCR · scanned pagesOpus 4.6 · 23.6s · $$$Gemini 3.5-flash · 3.2× fastertranscription only; grounding + verify backstop; consensus on dense/rotated
Extract · clean born-digitalOpus 4.6 · 22.8sHaiku 4.5 · 10.6s · 100% parityfail-closed to Opus on truncation/error; doc-shape override upward
Extract · genomic / denseOpus 4.6Opus 4.6 · unchangeddeterministic classifier measured the recall gap (86-pg genomic report: −37% on Haiku) and routes up
Verify · every fact, alwaysOpus 4.6Opus 4.6 · never routedthe trust gate; a routed model can only degrade a fact to review
Classify · image galleryOpus 4.6Gemini flash-class · cheapoff the ready-path; latency-insensitive
measured result on an 82-document real corpus: 48% cheaper · 26% faster · 0 added hallucinations on ~90% of documents
Figure 5.Per-leg assignments, before and after, on the document pipeline. The measured aggregate (82-document real corpus comparison): 48% cheaper, 26% faster, zero added hallucinations on ~90% of documents. Benchmark aggregates, honestly scoped: not a promise about your workload, which gets its own measurement.

Two details matter more than the headline numbers. First, the failures were found by measurement, not prevented by intuition: an 86-page genomic report lost 37% of its facts on the cheap extractor, so a deterministic doc-shape classifier now routes those documents upward, a classifier that can raise cost but never weaken the gate. Second, the one error class a verifier cannot catch, an OCR misread that grounds against its own transcription, was closed not with a stronger single model but with independence: a second OCR read whose disagreements surface to review. Consensus is disagreement evidence, and it is the only mechanism that works there.

6The economics of the attempt

Two questions kill any system like this if they aren't answered in numbers: who pays for failed cheap attempts, and what happens to latency. Our answers are structural. On money: escalations are capped per request (retries are zero by design), every loss is recorded as signed negative savings on an auditable ledger, and routed cells auto-suspend when their measured escalation rate crosses a ceiling, long before the portfolio math turns negative. On latency: the median improves, because cheap models answer faster than frontier; the tail is escalations, bounded at roughly champion + cheap, controllable per request with one header.

This is our money. We pay for every failed cheap attempt, which is why we cannot afford to be wrong.

FINEST P&L PER 1,000 ROUTED REQUESTS
$0+$200−$100graduated cells ≤8%break-even 76%0%escalation rate100%

illustrative Finest economics at provider list prices · this is our money, and the portfolio stays profitable until ~37–94% escalation depending on price gap; graduated cells measure ≤8%

Figure 6.Finest P&L per 1,000 routed requests against escalation rate, at three champion-to-cheap price gaps. This is our money: cells graduate only after measuring low single-digit escalation, and a bad cell stops costing us money on its own.
RESPONSE TIME, ILLUSTRATIVE DISTRIBUTION
requested modelrouted by Finestthe tail: escalations, ≤8% of routed0s1s2s3s4s

illustrative distribution · median improves because cheap models answer faster; the tail is bounded, measured, and removable with one header

Figure 7.Response-time distributions, requested model vs. routed. The median improves; the tail is escalations, measured per cell and opt-out per request. Multi-leg plans ship to relaxed-latency workloads first.

7The two-minute experience

None of this should be the customer's job. The integration is a key swap; the observation and shadow evidence are free and automatic; the only question is a one-tap activation (provider boundary, posture, latency), asked after the measured report has already shown what overpayment looks like on their own requests.

# the entire integration
ANTHROPIC_BASE_URL=https://api.finest.so/v1
ANTHROPIC_API_KEY=fk_your_key

Everything else is harvested, not asked: schemas from the codebase, shape from traffic, constraints from a one-time boundary declaration. New model releases are re-measured against the customer's workloads automatically. Companies should focus on their core business, not on tracking the model wars. That is the product.

8Limitations

Coverage is deliberately incomplete. Tightly coupled reasoning, holistic creative work, and requests with no verifiable joint are not decomposable by this method; the system abstains, and abstention rates are published per workload, not averaged away.

Correlated errors escape comparison. Two systems can share an omission. The requested model is a baseline, not truth; consensus across provider families and deterministic conservation checks narrow but do not eliminate this class.

Synthetic corpora are not production. Minted corpora give free, exact labels at the decision boundary; they are guarded by real-distribution holdouts, and arms that regress there are re-minted before anything publishes.

The counterfactual can lie if estimated. Pricing the requested model at a cheap arm’s token usage can invent savings (verbosity differs per model). Graph savings stay estimated and fee-free until an observed or reconciled baseline exists.

Benchmark scores here are directional. Prices are provider-official; quality scores are public-benchmark orientation. Finest admits nothing on benchmarks; admissions happen on your workload’s evidence, and your workloads will differ.

Cost-aware routing is established: FrugalGPT [1], RouteLLM [2], and AutoMix [3] built cascades and learned routers; compound-AI framing [4] and Anthropic's workflow taxonomy [5] describe the design space; decomposed prompting [6] shows modular subtask routing while newer work warns that incorrect decomposition and synthesis can degrade end-to-end reasoning [7]; Mixture-of-Agents [8] demonstrates portfolio gains at portfolio cost; DSPy and successors [9] optimize prompts when a metric and examples exist; semantic uncertainty [10] supports calibrated abstention; and judge-evaluation work [11] is why no uncalibrated judge sits on our serving path. Agent-security work [12] informs the trusted-control/untrusted-data separation in the plan runtime.

What these leave open, and what we claim as the product, is the contract around the machinery: an immutable passthrough baseline, evidence-bound activation, per-request receipts, a database-enforced billing law, and abstention as a reported first-class outcome.

References

  1. FrugalGPT: how to use large language models while reducing cost and improving performance
  2. RouteLLM: learning to route LLMs with preference models
  3. AutoMix: automatically mixing language models
  4. Berkeley AI Research: Compound AI Systems, the shift from models to compound systems
  5. Anthropic: Building effective agents, workflows vs. agents; routing, chaining, parallelism, evaluator loops
  6. Decomposed Prompting: a modular approach for solving complex tasks
  7. Reasoning can hurt: decomposition, subtask, and synthesis failures as distinct error classes
  8. Mixture-of-Agents enhances large language model capabilities
  9. DSPy: compiling declarative language model calls into self-improving pipelines
  10. Semantic entropy: detecting confabulations with semantic uncertainty
  11. JudgeBench: a benchmark for evaluating LLM-based judges
  12. AgentDojo: a dynamic environment to evaluate prompt-injection attacks and defenses for LLM agents

Cite this work

@misc{finest-request-compiler-2026, author = {Finest Research}, title = {The Request Compiler: Serving every AI workload at its cheapest sufficient configuration}, year = {2026}, month = aug, url = {https://finest.so/research} }
prices: provider list, verified august 2026 (Finest registry) · benchmark scores directional · the case-study aggregates (48% / 26% / ~90%) are benchmark results on one real 82-document corpus, not production-outcome promises: your workloads are measured, not assumed · "no safe plan yet" is a designed state: coverage and precision are reported separately, never averaged
The Request Compiler | Finest Research · Finest