Skip to main content

Module token_usage

Module token_usage 

Source

Structs§

ParsedUsage
Parsed usage ready for database insertion.
RawTokenUsage
Raw token usage as returned by the Claude API response metadata.
UsageSummaryRow
Aggregated usage summary grouped by agent and model.

Functions§

estimate_cost
Estimate cost in USD for a given model and token counts.
parse_api_usage
Parse raw API usage into a fully resolved ParsedUsage with cost estimate.