Selected for GitHub's Secure Open Source Fund. See how it's shaping the future of AI agent security.

Learn more

Route

Cost scales with task difficulty, not with your most conservative default.

Every request has more than one capable model, at very different prices. The LLM Router optimizes your token spend by picking the right one every time: it classifies the task, scores quality against cost, learns from every outcome, and switches only at moments where switching is free.

02 · Decision layer

Gate · Classify · Score · Learn

01 · Dispatch layer

One API · Fallbacks · Allowlists · Keys · Limits · Spend

Two layers, one router: dependable dispatch beneath, an intelligent decision layer on top.

01 · Dispatch

Every provider, one integration

A complete dispatch layer, out of the box: one API across every provider, automatic failover, governed keys and limits, and spend visibility from the first request.

  • One API

    Every provider behind one consistent surface. Swap models without a deploy.

  • Fallback chains

    An ordered chain takes over when a model errors, times out, or is unavailable.

  • Provider sort

    Prefer balanced, lowest price, lowest latency, or highest uptime per deployment.

  • Wildcard allowlists

    Pattern rules over model names, with a live count of what currently matches.

  • Virtual keys

    Per-team keys, so provider credentials are never handed to callers.

  • Rate limits

    Request ceilings per key and team, enforced at dispatch.

  • Spend tracking

    Every call recorded with its cost, the raw feed TokenOps reads.

  • OTEL export

    Routing traces land in the observability stack you already run.

  • BYOK

    Provider credentials come from the credential manager, not from config files.

02 · The decision layer

Four moves per request

Gate, classify, score, learn: four moves on every request. The scoring stage is live below, running the real formula with the weights in your hands.

  1. 01 · Gate

    Route only at clean boundaries.

    Model switches land at conversation start or an agent handoff, the moments a switch is free. Prompt-cache savings and tool context are preserved through every task.

  2. 02 · Classify

    Read the request without a model call.

    Deterministic patterns sort each request into one of seven task categories, code generation through factual lookup. Zero added latency, and accuracy you can inspect per category.

  3. 03 · Score

    Quality estimate versus cost pressure.

    Every eligible model carries a learned per-category quality estimate, blended with its normalised cost under governed weights. New models start from declared tier and strengths, productive from the first request.

  4. 04 · Learn

    Outcomes update the estimate.

    Every decision is logged with its spend, and every outcome sharpens the estimate. Drift tracking keeps scores current as models evolve. The router gets better the more you run.

Scoring simulator

Balanced
0.80 / 0.20
Model tiers: learned quality estimate for the selected category, cost per million tokens, and the blended score. The highest score is routed.
Model$ / 1MScoreRouted
nano-30.52$0.400.616
mid-3 (routed)0.74$4.200.755
max-30.93$21.000.744
Routed
mid-3
Gap to pay up (w_c / w_q)
0.25
vs always-max
−80%

score = w_q · Q̂(category) + w_c · (1 − cost̂). That's the router's real scoring rule. Drag the weights, switch the task, watch the choice change.

03 · The boundary rule

Routing is free only at boundaries

Switches land at exactly two moments, the first turn of a session or a formal agent handoff, because those are the moments a switch costs nothing. Four disciplines make that guarantee real.

  • Cache economics

    Every cached token keeps working.

    Cached input runs up to 10× cheaper, and boundary discipline preserves the cache through the whole task, so the discount compounds instead of resetting.

  • Tool continuity

    Tool context stays whole.

    The model that makes the tool calls is the model that finishes the task: full context, clean results, no retracing.

  • Clean handoffs

    Fresh context, by design.

    Every switch lands exactly where a fresh reasoning context begins, so nothing is lost in the handover.

  • Coherence

    One voice per task.

    Reasoning style stays consistent from the first token to the last, so your users see one seamless answer.

Precise by design

Boundaries come from your framework's own lifecycle events, never guessed from conversation content. Every boundary decision is visible on the dashboard, live.

04 · Exploration

Routing that keeps getting smarter

Exploration-aware selection keeps re-testing every candidate, so a model that improves (or a new one you add) earns traffic on evidence. Naive greedy routing locks onto one model and stops looking; Route never does, and it wins on quality per dollar at every setting.

Quality per dollar by weight setting: greedy selection versus Route. Higher is better.
Weights (Q / C)GreedyRouteΔ
0.9 / 0.12.593.28+27%
0.8 / 0.22.965.72+93%
0.7 / 0.37.4412.54+69%

Quality per dollar, higher is better. Route wins at every weight setting, and at the default it spends 53% less doing it. Benchmark: 3,000 queries across two model tiers.

05 · Governed weights

Per-team weights, not one global slider

One global dial can't govern a company. Route's weights are set per team and per deployment, governed like any other policy. Each setting is an explicit, predictable threshold for when extra quality is worth paying for.

  • Cost-first

    Weights (Q / C)
    0.7 / 0.3
    Gap to pay up
    0.43
    Quality per dollar
    12.54

    Batch enrichment, tagging, backfills: tolerant work where the cheap model is almost always right.

  • Balanced

    Default
    Weights (Q / C)
    0.8 / 0.2
    Gap to pay up
    0.25
    Spend saved
    −53%

    Product surfaces with a human reading the output. What a team gets if it sets nothing.

  • Quality-first

    Weights (Q / C)
    0.9 / 0.1
    Gap to pay up
    0.11
    Exploration
    always on

    Work where a weak answer costs more than the strong model does. The router pays up on an 11-point edge.

  • Candidate set

    Registered models ∩ the governance allowlist. A blocked model is never scored, so policy runs upstream of the decision.

  • Budget headroom

    w_cost tightens automatically as a team approaches its spend limit, instead of staying static while the budget burns.

  • Config lock

    Routing config can be tightened by policy but never loosened by a caller.

  • One ledger

    Every decision lands in the same spend ledger TokenOps monitors. Route is its acting arm.

06 · Guarantees

What Route holds itself to

Five commitments, each one measurable on the dashboard, so trusting the router never has to mean taking its word for it.

  • More quality per dollar

    Routing is scored against always-picking-the-strongest-model, continuously. The gap between the two lines is the product working.

  • Every model stays in play

    Candidates keep getting re-tested, so a model that improves (or a new one you add) earns traffic on evidence, not on someone remembering to re-benchmark.

  • Caches and tool state stay intact

    Switches happen only at clean boundaries, so prompt-cache discounts and tool continuity are never sacrificed to save a cent.

  • Accuracy you can inspect per task type

    Classification is reported per category, never averaged away, so a weak class is visible the day it appears, with a tracked reason.

  • Numbers that reproduce

    Every reported figure regenerates from committed code on demand, so an eval you read is an eval you can run.