DEV Community

xactum
xactum

Posted on Edited on

In Router we trust??

 ## Catching a silent price inflation in LiteLLM, before it hits your bill

Most LLM gateways and routers report a price and a model name, and callers trust both. We wanted a cheap, independent tripwire for when either one drifts from what you actually agreed to pay for — without adding a dependency your calls rely on.

What it does

A LiteLLM CustomLogger callback with two hooks:

  • Pre-call: reads the price your proxy is configured to charge for a model, and checks it against an independent reference via XACTUM (api.xactum.com).
  • Post-call: checks that the model that actually answered matches the one you were billed for.

A real run against our production endpoint

We quoted $3 input / $15 output per million tokens for anthropic/claude-sonnet-5.5. XACTUM's reference (drawn from 3 independent sources: a facilitator, Anthropic's own list price, and OpenRouter) put it at $2/$10 — a 1.5x gap on every dimension, flagged FLAG_HIGH with medium confidence. That's exactly the kind of drift that's easy to miss in a config file and expensive to miss in production.

Design choices that matter

  • Never a proxy. XACTUM doesn't see your prompts or route your call. It answers a structured yes/no question about price or model identity — nothing else.
  • Fails open. If XACTUM is slow or down, the callback logs a warning and your LLM call proceeds untouched. It's a monitor, not a gate.
  • Pay-per-check, not a subscription. Each paid answer is 0.03 USDC via x402 on Base, paid from your own wallet. Inconclusive answers (not enough reference data yet) are free — and right now, during XACTUM's launch period, every answer is free.

Try it

The callback, plus quickstarts for LangChain, Vercel AI SDK and the OpenAI Agents SDK, are open source (MIT) at github.com/xactum/xactum-client.

Top comments (0)