Repository navigation
Release v7.186.0
Agent session usage now carries a snapshot of the provider's allowance at the moment the usage was recorded, so usage and remaining capacity can be read together without a second query.
Added
RecordAgentSessionUsageWithCapacitycommand (/api/a-i/usage/recording) that records session usage and, on the same session stream, anAgentSessionCapacityObservedevent with the provider's allowance windows, freshness state and reason as captured by the server (#375)- Provider allowance snapshot types (
AIProviderCapacitySnapshot, allowance windows and states), captured from the cached capacity observations without blocking or calling the provider - TypeScript proxy for the new command, exported from
@cratis/ai - Documentation on provider capacity boundaries and how to read usage together with its allowance snapshot: https://github.com/Cratis/AI/blob/main/Documentation/provider-capacity-boundaries.md
Changed
- Managed language models and pooled chat clients now record usage through the new command; the
UsageRecordedevent and the existingRecordAgentSessionUsagecommand and route are unchanged, and a failed allowance capture never prevents usage from being recorded