ultrarouter docs
Concepts

Savings methodology

How ultrarouter computes honest, procurement-defensible savings.

ultrarouter reports savings you can defend in front of procurement. The numbers come from an append-only ledger, not an estimate, and the math never claims a discount that is not ours.

The ledger

Every served request appends one gateway_call ledger row in the same transaction as the request log:

  • list cost — the authoritative hot-path cost at published (list) prices.
  • effective cost — the cost after your rate card, if one applies (an exact model match is preferred over a provider-wide card, time-window bounded).
  • savings — list − effective.

Compression and cache discounts append their own savings rows (compression_saving, cache_saving) when they actually saved, as pure savings lines (no double counting with the call cost). Error rows (no served model) are not metered.

Net-effective pricing

The net price a customer faces is their rate card, else list. Savings math never uses raw list against a customer's own negotiated discount — so a statement never claims your own discount as ours (doc 07 §5). The monthly statement lines are:

  • baseline = Σ gateway-call list cost,
  • effective = Σ gateway-call effective cost,
  • total savings = Σ every event's savings (rate-card delta + compression + cache
    • migration deltas).

Statements

A monthly worker aggregates each period's ledger into one immutable savings snapshot; a restatement is a new superseding row, never an edit. You can also generate the current statement on demand and download it as CSV or JSON. The dashboard /savings screen shows this month's running savings, the methodology explainer, and the immutable statements list.

Rate cards and commitments are entered in the dashboard (manual or CSV import); CSV import is all-or-nothing with per-line errors.