Undercut — tiered dispatch for coding agents

Free for individuals, forever · MIT · Team plan in development

Cut your AI coding bill up to 71%. Not your pass rate.

A routing policy your coding agent follows — cheap tier first, escalate only on evidence, never on a vibe. Measured on public benchmarks, not promised.

Get team early access14-day trial
−71%
GSM8K cost, OpenAI
−95%
HumanEval cost, Gemini
−68%
avg. blended cost, Anthropic
=
pass rate, every cell

Raw, reproducible results →

dispatch — live routing
{{ row.unit }} {{ row.flags }} {{ row.result }}
$
Works anywhere a SKILL.md is read
Claude Code Codex Cursor Copilot OpenCode

Savings calculator

What's tiered routing actually worth to you — or your team?

The savings % below comes from the blended code/reasoning/mechanical results in RESULTS.md, not a marketing multiplier. Plug in real spend to see it in dollars.

$
Estimated savings{{ calcSpendLabelSuffix }}
${{ calcSavingsAmountFmt }}/mo −{{ calcSavingsPctFmt }}%
≈ ${{ calcSavingsAnnualFmt }}/yr back in the budget
Without Undercut${{ calcCurrentTotalFmt }}/mo
With Undercut${{ calcWithUndercutFmt }}/mo
Same spend, other vendors
{{ v.label }}{{ v.activeTag }} −{{ v.pctLabel }}% · ${{ v.savingsFmt }}/mo

Estimate, not a quote. Built from the 30-task blended suite in RESULTS.md (5 seeds, deterministic graders). Real workloads escalate more than benchmarks, so treat this as a ceiling, not a guarantee — and it assumes Team-tier enforcement so the policy actually applies to every seat, not just the devs who opted in.

For your team

One skill. Three reasons to care.

For platform & DevEx engineers

Objective escalation triggers, not confidence thresholds. Vendor-agnostic rubric. Published, reproducible methodology — re-run our exact benchmarks on your own tasks.

For finance & ops

No new vendor contract. No network-layer access, no proxy sitting between your agent and its model calls. MIT license, free, and every cost claim on this page is backed by public, auditable results — not a vendor's internal number.

For product people and vibe coders

Your coding agent gets cheaper automatically. Nothing to configure, nothing to learn about routing rubrics — install it, and the easy work stops burning top-tier tokens.

The problem

Your agent picks one model per session — and defaults to the expensive one for everything.

Claude Code, Codex, Cursor, and Copilot let you set a model once per session. That session then handles trivial, mechanical work at the same tier as genuinely hard reasoning. One Claude Code Max subscriber's self-reported usage data showed 93.8% of their tokens going to the top-tier model — with nothing pulling cheap, mechanical work back down.

It's one user's numbers, not an industry audit — the GitHub issue has stayed open with real engagement, which suggests the pattern isn't unique to one account.

The obvious fix doesn't work.

Ask the model how confident it is, and route on that. Except LLM self-reported confidence is poorly calibrated — a model that's wrong is often just as "confident" as one that's right. A confidence threshold buys the feeling of a safety check without the substance.

Undercut replaces confidence with three objective triggers: a failed verification, a measured disagreement between two cheap-tier runs, or an explicit uncertainty flag. Nothing escalates on a vibe.

vs. cap-based routers

Caps throttle spend. Undercut routes work.

Most "cost control" tooling watches the meter: every unit still runs at the top tier until a budget cap stops the whole session. Undercut decides the tier per unit, before it runs — the cap never has to save you because the spend never happens.

Spend-cap routerreacts after the spend
rename variables ×214frontier · $$$
format JSON outputfrontier · $$$
design auth flowfrontier · $$$
budget92% — approaching hard stop
⛔ hard stop — session halted mid-task

Every unit runs at the same tier. The only lever is stopping — quality of routing never changes, spending just ends.

Undercutroutes before the spend
rename variables ×214cheap · $
format JSON outputcheap · $
design auth flowfrontier · $$$
1 unit failed check ×2↑ +1 tier · residue only
✓ batch complete — nothing halted, nothing overpaid

Each unit gets the cheapest tier that can pass verification. Escalation happens on evidence, one tier at a time — and only for the units that need it.

They compose: Undercut routes first, your gateway's caps and compression still apply to whatever runs.

The proof — measured, not modeled

Controlled A/B. Same tasks, same grader, only the routing policy changes.

Vendor-constantEvery arm compared within one vendor, never across.
Deterministic gradersCode executed against official test cases; math is exact-match. No LLM judge.
5 seeds per armTemperature > 0.

GSM8K — math reasoning · 250 units/cell

Vendorall-standardtieredCostPass
OpenAI241/250 · $0.60249/250 · $0.17−71%+8
Gemini250/250 · $1.28248/250 · $0.53−59%−2 (seed noise)
Anthropic249/250 · $0.36250/250 · $0.35−4%+1
Open-weights240/250 · $0.02245/250 · $0.07+228%*+5

*Open-weights price ladders invert — see caveats. Absolute overhead is ~$0.01–0.02.

HumanEval — Python code · 100 units/cell

Vendorall-standardtieredCostPass
Gemini100/100 · $1.13100/100 · $0.05−95%=
Anthropic100/100 · $0.30100/100 · $0.12−61%=
OpenAI100/100 · $0.46100/100 · $1.23NA*=
Open-weights100/100 · $0.01100/100 · $0.02+77%*=

*OpenAI's cheapest tier can't write Python, so every task escalates the full ladder. Quality holds at 100/100 — the escalator works — there's just no cost headroom to exploit on that family for this benchmark.

Secondary evidence — clearly labeled oursOn our own 30-task synthetic suite (code, reasoning, mechanical — 150 units/cell), tiered was never worse than all-standard on any cell, and beat it on 6 of 12. The escalator recovers failures a fixed single tier gives up on — it's not just cheaper, it's smarter on the cells where it wins.

Read the benchmarks

How it works

Six flags assign a tier. Three triggers are the only way up.

Every unit of work gets scored against six flags, then assigned the cheapest tier that can plausibly handle it. It only moves up a tier when something objective proves it needs to — a failed check, a measured disagreement, an explicit uncertainty flag. It never moves up on a guess, and it never moves back down mid-task.

unit of work
6-flag rubric
0 flags
cheap~90% of units land here ✓
1–2
standard
3+/own
frontier
↑ escalate +1 tier only on: fail ×2 · two runs disagree · tagged "uncertain" residue only — never redoes the batch
See the rubric

Step 1 — Base tier, six-flag rubric

Unverifiable — can output be checked mechanically? (tests, schema, diff, grep)
Ambiguous — one right answer, or several defensible ones?
Blast — reversible? touches money, auth, user data, production, deletes?
Cross-cutting — one file/source, or reasoning across many?
Novel — pattern-following, or genuinely new design?
Format-strict — must output match an exact schema?

0 flags → cheap · 1–2 → standard · 3+ or any ownership/judgment call → frontier. Apex only when you can write one sentence stating why the marginal intelligence pays for the cost.

The override — single biggest lever

Cheap-to-verify ⇒ cheap-to-generate. If output can be checked mechanically, it starts at the lowest tier regardless of how hard it looks — verification catches failure. Only unverifiable work needs to start high.

Step 2 — Escalate exactly one tier, on evidence only

  • Verification fails twice at the current tier
  • Two cheap-tier runs disagree on ambiguous-flagged work
  • The worker tags an item "uncertain"

Residue-only handoff

The next tier up gets only the failed or uncertain items, plus verification notes. It resolves the residue — it never redoes the batch.

Hysteresis — guardrails

Never de-escalate mid-task. Max one retry per tier. Anything still unresolved goes to a single batched apex tie-break call. One hard file in a 700-file job doesn't drag the other 699 up a tier.

 unit of work
      |
  6-flag rubric
      |
  +---+----+
  | 0 flags|--> cheap
  | 1-2    |--> standard
  | 3+/own |--> frontier
  +---+----+
      | fail x2 / disagree / uncertain
      v
  escalate +1 tier
  (residue only)
      |
  still unresolved?
      v
  single batched
  apex tie-break

Why it holds up

Flags steer. Verification and escalation decide.

Even when the rubric flags are scored imperfectly, the escalator still routes work to the right tier almost every time — because a wrong flag only ever costs one extra cheap attempt, never a wrong answer or a big bill.

See the data

A stock dispatcher model reproduces the rubric flags imperfectly — Haiku hits 90% agreement, Sonnet 93%. The weakest flag (format-strict) is only 60%. None of that matters: under the shipped policy, both dispatchers still route 100% of units to the correct tier. A wrong flag changes the ladder cap, never the base tier — worst case, one extra cheap attempt.

Haiku dispatcher
90% flag agreement
100% tier-match
Sonnet dispatcher
93% flag agreement
100% tier-match

The rules are about the work, not the model.

Every rule is a property of the unit of work — verifiable, ambiguous, blast-radius — never a specific model's known weakness. Vendor cards go stale as models change; work properties don't. It's also hard-won — a format-strict rule that worked on Anthropic backfired on Gemini, which is exactly why the rubric no longer encodes per-vendor behavior.

Honest limits — and what this means for governance

What this doesn't do.

  • Not a proxy. Doesn't enforce anything at the network layer.
  • Not a gateway or compression proxy. Composes with those — routes first, they compress second.
  • Doesn't auto-flag in production. The dispatching agent scores the flags itself (measured robust to getting them wrong — see above).
  • Doesn't help when the cheapest tier lacks the capability entirely (OpenAI + Python is the documented case — no headroom to save).
  • Doesn't replace the planning decision. Planning is separate from execution routing; this ladder is for execution units.
  • Doesn't promise a dollar figure for your workload. Savings are workload-dependent — real workloads escalate more than benchmarks and land below these numbers, not above.

For finance & procurement

No new vendor contract to negotiate. No network-layer access — it's a policy file your agent reads, not a service that sits between your agent and its model calls. MIT licensed, free to run. Every cost and quality claim on this page traces to public, re-runnable benchmark data — not an internal vendor number you have to take on faith.

For teams — the launch tier

Available at launch Enterprise — contact us

One skill is a habit. A team needs a policy.

The free skill only saves what every individual dev remembers to install and follow. Teams turns the same rubric into something the org can point to, measure, and rely on — without adding a network-layer gateway.

Org-wide policy enforcement

The rubric and escalation ladder apply to every seat by default — savings stop depending on which devs happened to opt in.

Per-account savings metering

Cost and quality rolled up by seat and by project, so finance sees the delta in dollars — not just a policy file in a repo.

Verifiable escalation ledger

Every tier-up decision — why, on what evidence — is logged and auditable. "Trust the routing" becomes "verify the routing."

Always-updated tier→model map

The tier→model ladder is re-validated against new releases with the same evidence-backed harness in testing/, so it doesn't go stale as models ship.

SSO / directory sync

Provision and de-provision seats through the identity provider you already run — no separate account system to babysit.

Free for individuals stays free. Teams is the paid layer above it, not a gate in front of it.

See Teams pricing →

Still not a proxy. Teams enforces the policy through org-wide configuration and the escalation ledger above — not by sitting on the network path between your agent and its model calls. It composes with whatever gateway you already run.

Pricing

Free for individuals, forever. Teams and Enterprise ship at launch.

Nothing below is live yet — the skill is; Teams and Enterprise are what we're building toward, priced honestly ahead of shipping instead of dropped on you at launch.

Free
$0
forever, per individual
  • The full 6-flag rubric & escalation ladder (SKILL.md)
  • Works with Claude Code, Codex, Cursor, Copilot, OpenCode
  • MIT licensed — audit it, fork it, keep it forever
  • Community support via GitHub issues
In development Teams
$29/ user / mo
14-day trial at launch, billed monthly
  • Everything in Free, for every seat
  • Org-wide routing policy enforcement
  • Per-account savings metering & reporting
  • Verifiable escalation ledger
  • Always-updated tier→model mapping
  • SSO / directory sync
Get early access

Opens a GitHub issue — Teams isn't live yet, this puts you on the list.

Enterprise
Contact us
no public pricing, sales-led
  • Everything in Teams
  • On-prem / self-hosted deployment option
  • Compliance path: SOC 2, data residency
  • Dedicated support & onboarding
  • Custom integrations
Contact sales

Compare in detail

Feature Free Teams Enterprise
{{ row.feature }} {{ row.free }} {{ row.team }} {{ row.ent }}

Pricing and feature scope for Teams/Enterprise are the current build target, not a signed rate card — see docs/business/business-model.md for the working plan. They'll firm up at launch.

Try it

Free. MIT. Nothing installs, nothing proxies your traffic.

$ npx skills add undercutsh/firstpass

or copy skills/firstpass/ straight into your agent's skills directory.

Validate it yourself

  1. 1Read the published results — testing/README.md and the raw JSON in testing/results/
  2. 2Reproduce for free, no API key, no spend: node src/main.js --mock
  3. 3Run live on your own vendor/benchmark with an OpenRouter key — a full 4-vendor × 2-benchmark run is ~$4–5 total, a single-vendor smoke test is pennies
  4. 4Diff any two saved runs: node src/main.js --compare a.json b.json

Zero lock-in. It's a policy your agent follows — remove the skill and you're back to status quo.

Not the one setting this up? Forward this page. Everything above the install command reads without a technical background — the engineer on your team just needs the command block.

Prior art

Others have tried cheaper-model routing. Here's what's different.

peragwin's subagent-model-routing gist and soumabali/token-router both explored assigning cheaper models to subagent work. Undercut adds the objective escalation loop on top: measured disagreement instead of self-reported confidence, hysteresis so a run can't thrash between tiers, residue-only escalation with a structured handoff, a calibration feedback loop, and — the part that's actually rare in this category — published, reproducible A/B results. Anyone can re-verify any cell in the tables above.

Not competing with your gateway.

Compression proxies like Edgee shrink what goes over the wire for a given call. Undercut decides which model handles the call in the first place. Route first, compress second — they stack.

FAQ

{{ faq.q }}

{{ faq.a }}

Undercut the top tier. Not the quality bar.

Nothing about this page expires. What does keep happening is the token bill, one session at a time, on whatever your agent is currently doing with mechanical work.

View on GitHub