Skip to main content
Every routed request is recorded with the model that served it, its token counts, and its cost. You can see that data in two places.

Where to look

  • Weave app — the Router report under AI reports, alongside the rest of your engineering data, with the standard team, engineer, and date filters.
  • router.workweave.ai/dashboard — the same charts for teams that only use the router.
Both show request volume, cost saved, model mix, spend by model, cumulative savings, savings rate, and a cost breakdown. Router-cost drilldown is nested as user → session → requested/decision model pair, so you can move from an identity’s total to the sessions and routing decisions behind it. Router identities linked to the same Weave account are combined; otherwise recorded email or router identity is used. Router cost is also exposed as the router_cost metric through the Weave MCP server, with the same user → session → model-pair hierarchy in drill-down mode. If your team wants the underlying rows rather than charts, the analytics export streams every routing decision, unaggregated, into your own warehouse.

How savings are calculated

Savings compare what you actually paid against what the same work would have cost if every request had gone to one fixed model: your cost comparison model (set under Models & routing → Cost comparison model). The savings rate is that difference divided by what the comparison model would have cost. Savings and the savings rate count routed users only: passthrough users never save, so their spend is left out of both. A plain comparison would price the router’s tokens at the comparison model’s rates. That assumes every model uses the same number of tokens for the same work, and solves the same tasks. Neither holds, so Weave measures both and adjusts for them.

What we measure

  • Token efficiency. In controlled trials, Weave pins each model through the router on the same set of realistic coding tasks, inside the same harness (such as Claude Code or Codex), and records how many input and output tokens each needs. For every pair of models this gives a work ratio: how many tokens the comparison model needs for the work a routed model did. Because the harness shapes token use more than the model does, ratios are measured separately for each harness.
  • Task success. On a benchmark of hard, pass/fail tasks, Weave runs the router as it normally routes against the comparison model pinned for every request, on the same tasks. The ratio of their pass rates says how often the cheaper route has to be redone.
Each estimate comes from several attempts per task across many tasks, with an uncertainty interval computed over tasks.

How a request is priced

For each request the router chose a model for:
  1. Price the request’s tokens at the comparison model’s catalog rates, including cache reads and writes, 1-hour cache writes and any long-context pricing tier. Cache writes caused only by a model switch are priced as cache reads, since staying on one model would have kept its prompt cache warm.
  2. Scale that by the work ratio between the comparison model and the model that served the request.
  3. Scale that down by the task-success gap when the comparison model passes more often than the router, so both sides are priced per task the router solved.
That is the request’s comparison cost. Its saving is the comparison cost minus what the request actually cost, which is negative when routing cost more.

Conservative by design

Where the measurements are uncertain, the dashboard takes the reading least favourable to the router:
  • Work ratios use the cautious end of their range. For a model native to the harness (Claude models in Claude Code, OpenAI models in Codex) the measured estimate is used; for other models, the low end of its range. A ratio above 1 (the comparison model needs more tokens, which adds savings) counts only when even the low end of its range is above 1 and it was measured on at least 9 tasks; it then uses that low end. Otherwise it is held at 1.
  • The task-success adjustment uses the high end of the gap’s range: Weave is 95% confident the comparison model’s pass rate over the router’s is no higher than the gap it applies. It is never applied in the router’s favour.
  • Unmeasured work ratios count as $0. Requests the router didn’t choose a model for count as zero savings. So do passthrough requests (routing is off for that user, so the requested model is served unrouted), forced requests, utility requests (such as title generation and compaction), and models without measured work ratios against your comparison model. Harnesses without task-success measurements still receive token-efficiency savings, without a task-success adjustment.
  • Subscription-served requests count as $0. They cost you nothing per request, so routing them saves nothing in dollars.

Keeping the measurements current

The ratios and pass rates are stored as a versioned measurement set, not hard-coded. When the router’s model lineup changes, Weave reruns the trials and reviews the new set before activating it. Each set stays on record with the period it applied to.
Savings are measured against your own comparison model, not against another vendor or tool. A savings chart answers “how much cheaper than running all of this on the model I compare against”, not “how Weave compares to another product”.

Tracing a single session

  • /router-session in Claude Code prints the session ID that correlates the session in Weave’s telemetry — include it when you report a routing problem.
  • For request-by-request rows, filter the analytics export on session_id. There is no local decision log on the machine.
  • /router-feedback <text> (/rf) sends feedback about a routing decision straight to Weave, attached to that session.

Reading a session’s cost from the API

Claude Code’s own total_cost_usd is a client-side estimate: it prices the response against Claude Code’s local table, so it cannot account for the model the router actually picked, a provider fallback, or Weave’s pricing. To get the real number, ask Weave:
$SESSION_ID is the session ID your client already has — the one Claude Code sends as X-Claude-Code-Session-Id and reports in its result. Any Weave public API key works; the key establishes which organization’s sessions you can read, so a session ID alone never exposes another organization’s spend. The response gives the actual cost in USD micros, alongside what the same work would have cost on the model you originally requested:
The cost includes router-originated work your client never asked for, such as handover and compaction summaries, so request_count can exceed the number of requests you sent.
The response is a point in time. It covers everything committed when the query ran, so call it after your session has stopped issuing work if you need a final total. Telemetry is written asynchronously, so a session that just ended may briefly return 404 — retry if you expect data.

Freshness

Spend and savings in the Weave app, the router dashboard, the analytics export, and the router_cost metric — anything that flows through the reporting pipeline — normally land within about an hour of the request. The /router/sessions/{session_id}/cost public API endpoint reads the primary router database directly, so it is current beyond the hour-long reporting pipeline: it returns everything committed by the time the query ran. There is no ClickHouse rollup, no denorm table, and no holdback. The latency budget is just “each indexed aggregate hit the primary Postgres”, typically tens of milliseconds.
Last modified on November 24, 2026