Star on GitHub

Honesty-first LLM gateway

Shadow modeTraffic untouched

Cut LLM spend. Keep the proof.

Trace every dollar, test cheaper models in shadow, and route only after quality holds. One base-URL swap gives your team an auditable path from visibility to savings.

  • OpenAI + Anthropic
  • Apache-2.0
  • Self-hosted
  • Air-gap safe

See the route before you take it

Live routing simulation
TokenTriage routing illustrationRequest cards are scanned, tagged with the policies they matched, and switched to one of three model tiers, with a live routing log recording each decision.gpt-5 minifastestsonnet 5balancedopus 4.8top qualitysupport replyyourslow costfast response
live routing log
analysistop quality→ sonnet 5failover
greetingexact match→ cacheno model call
code reviewlong context→ sonnet 5
Illustrative routing simulation — no real traffic.

Why honesty-first

TokenTriage would rather say “I can’t prove that” than show you a pretty lie.

Competitors compete on provider count and throughput. We compete on trust — provenance, quality-proven routing, and a dashboard where every number survives an audit.

The problem

LLM spend is exploding — and opaque. Cutting it blind risks quality.

If more than one of these is true, there is almost certainly a number worth finding.

The insight

Only cut cost when you can prove quality holds — auditably.

Cheaper models are safe to use far more often than teams dare, and dangerous exactly when no one is measuring. TokenTriage measures first: it costs every request, computes the cheaper counterfactual in shadow, and enforces a route only once the evidence clears the bar. When it can’t prove a win, it says so — and shows you why.

How it works

The trust ladder: ledger → shadow → route

You earn enforcement one rung at a time. Climb only when the evidence says the next rung is safe.

  1. Ledger

    See every dollar

    Observe and cost every request — per model, per token type, per trace, per agent, per tool. Zero request mutation. This is where you start.

  2. Shadow

    Prove the savings are safe

    Compute the would-route decision and its counterfactual cost, so the report shows the savings you’d get — without touching a single response.

  3. Route

    Enforce, only once earned

    Rewrite the model, pick the cheaper upstream, honor cache pins — but only after the evidence says the next rung is safe. You never route blind.

See the request flow and the honesty invariants →

The drop-in

One line changes. Then you can see it.

TokenTriage speaks the OpenAI (/v1/chat/completions) and Anthropic (/v1/messages) dialects. Point your base URL at it and every request is costed and logged.

from openai import OpenAI

# The only change: point the base URL at TokenTriage.
# Everything else in your app stays the same.
client = OpenAI(base_url="http://localhost:8787/v1")

resp = client.chat.completions.create(
    model="gpt-5",
    messages=[{"role": "user", "content": "Summarize this ticket."}],
)

The trust dashboard

A dashboard where every number survives an audit

The overview: spend to date, projected period-end, and savings vs. baseline — each stamped with its pricing snapshot, EST flags where estimated, and UNPRICED rows counted, never hidden.

localhost:9090/uiDemo data
TokenTriage overview: spend to date $61.25, projected period-end, savings vs baseline with an EST flag and a verdict link, the trust-ladder sidebar, and a spend-over-time chart — all marked DEMO DATA.TokenTriage overview: spend to date $61.25, projected period-end, savings vs baseline with an EST flag and a verdict link, the trust-ladder sidebar, and a spend-over-time chart — all marked DEMO DATA.
The real TokenTriage dashboard in demo mode. The DEMO DATA watermark and sample figures come from a synthetic ledger — the product ships this so you can explore before wiring real traffic.

What you get

Three surfaces, one source of truth

Proof, not adjectives

Measured house benchmarks

Numbers from a run on our box (Intel Core Ultra 9 285K, Go 1.25.x, windows/amd64, CGO-free). Every figure is one an actual run produced — never extrapolated or invented.

The bigger picture

Toward the decision plane

The endgame isn’t a cheaper router — it’s the decision plane: the cheapest LLM execution plan that can be shown to meet each workload’s quality, latency, cost, and policy requirements. Cost reduction with bounded risk and defensible evidence.

Open core, honest gates

The ledger, verdicts, provenance, the shadow report, self-hosting, and exports are free forever — never crippled to upsell. Where paid value comes later (SSO, fleet management, long-retention hosted analytics) it is additive, never a fork. The honesty invariants apply at every tier.

See where your LLM spend goes

One binary. One base-URL swap. Five minutes to your first costed request — and not a single number you can’t trace.