Expand description
The token accounting both submilli:llm and submilli:embedding budget
against: a per-execution reservation that also charges a server-wide
aggregate, with held reserve for spend a provider never reported.
This module owns the arithmetic and the concurrency. It knows nothing about
either capability’s error type, flag names, or message text: a refusal comes
back as a LedgerRefusal naming which ceiling was hit, and the capability
wrapper renders it in its own vocabulary.
Structs§
- Ledger
Limits - The two ceilings one execution’s ledger enforces. The server-wide cap lives on
the
SharedTokenBudget. - Shared
Token Budget - An aggregate token budget several executions reserve against.
- Token
Ledger - One execution’s reservations against its own ceiling and the shared aggregate together.
Enums§
- Ledger
Refusal - Which ceiling refused a reservation, with the numbers the capability’s message needs.