| Name | Type |
|---|---|
| model_name | str |
| provider | str |
| kind | UsageKind |
| input_tokens | int |
| output_tokens | int |
| cache_read_tokens | int |
| cache_write_tokens | int |
| cost_usd | float | None |
| usage_metadata | Mapping[str, Any] |
| finalized | bool |
| message_ids | frozenset[str] |
| ledger_key | UsageLedgerKey | None |
| request_bucket | str | None |
| invocation_id | str | None |
| aliases | frozenset[UsageLedgerKey] |
Provider and framework message IDs observed for this invocation.
What a stream consumer last recorded for one request.
Held so a later chunk of the same request can retract that exact contribution and re-record the running totals, keeping one API call to one request and one per-model row.