Expand description
Session-level aggregation for canonical token envelopes.
Structs§
- Compression
Overview - Compression totals and the model with the highest savings ratio.
- Model
Usage Entry - Aggregated usage for one model.
- Provider
Usage Entry - Aggregated usage for one provider.
- Session
Usage - Aggregated usage for one session.
Functions§
- compression_
overview - Returns aggregate compression metrics for the current session.
- model_
breakdown - Returns per-model usage sorted by descending input and output tokens.
- provider_
breakdown - Returns per-provider usage sorted by descending total tokens.
- record_
envelope - Records one canonical envelope in the global session snapshot.
- reset_
usage - Clears all accumulated usage while preserving the allocated global mutex.
- session_
usage - Returns a clone of the current session usage.