Expand description
On-disk record of the proxy’s measured provider spend (proxy_usage.json).
The proxy’s usage meter (proxy::usage_meter) aggregates the real
provider usage of every finalized turn into these per-model sums and
persists them; the dashboard, CLI, stats and the savings ledger (which run
in other processes) read them back through load_persisted to learn
the user’s real provider bill.
Structs§
- Cohort
Usage - Cumulative holdout cohort totals. Keyed by arm name:
"control"|"treatment"for output savings (#895 Track B),"compression:control"|"compression:treatment"for input compression (#1905). The average tokens per turn are*_tokens / requests. Only populated while a holdout is active. - Last
Model - The model the proxy saw last, with the time it saw it.
- Measured
Slice - Token/cost sums of the turns that reported a measured provider charge.
- Model
Usage - Cumulative real token counts for one model. Cost is derived at read time so a pricing-table change re-values historical usage consistently.
- Persisted
Usage - On-disk shape of the measured spend totals.
- Response
Observation - Payload-free local measurement. Unknown cost stays unknown; neither HTTP status nor receipt of usage supplies the private runtime’s quality label.
Enums§
- Usage
Boundary - Where provider usage was observed, not an assertion of answer quality or successful generation. Terminal usage also accompanies failed responses.
Functions§
- load_
persisted - Cross-process read of the persisted measured spend (dashboard / CLI / ledger).
- persisted_
dominant_ model - The model carrying the most measured tokens (excludes the “unknown” bucket). Used to value savings against the real dominant model when no explicit model is configured.
- usage_
path - Where the measured spend totals live in the data directory.