Expand description
Per-model proxy savings accounting.
Headroom’s per-model cost breakdown was the one metric a tester found clearer
than lean-ctx’s single flat number. This module buckets request-side savings
by model and prices them with the shared ModelPricing table so /status
can report estimated USD avoided per model.
Honesty contract: token counts here are request-side estimates (the bytes
the proxy removed before forwarding). They deliberately do NOT try to model
re-reads the agent may perform later, so figures are conservative and
labelled estimated in the output.
Structs§
- Model
Stat - One model’s aggregated, priced savings for the
/statusendpoint.