Module token_usage

Module token_usage 

Source

Structsยง

CacheCreationTokens
Tokens used to create new cache entries
CacheReadTokens
Tokens read from existing cache entries (these still consume context)
ContextLimit
Context window limit (maximum tokens allowed)
ContextWindowUsage
Complete snapshot of token usage for a single turn.
FreshInputTokens
Fresh input tokens (new content, not from cache)
OutputTokens
Output tokens generated by the model
TokenCount
Total token count (always non-negative)