Skip to main content

Module run_usage

Module run_usage 

Source
Expand description

Run usage / cost event.

RunUsage stores immutable usage totals for a Run.

§How to use this object

  • Create it after the run, model call batch, or accounting phase has produced stable token totals.
  • Keep it append-only; if Libra needs additional rollups, compute them in projections.

§How it works with other objects

  • run_id links usage to the owning Run.
  • Provenance supplies the corresponding provider/model configuration.

§How Libra should call it

Libra should aggregate analytics, quotas, and billing views from stored RunUsage records instead of backfilling usage into Provenance or Run.

Structs§

RunUsage
Immutable token / cost summary for one Run.