Class LlmUsage
Token usage reported by the provider.
InputTokens is the UNCACHED remainder, not the whole prompt.
The prompt is the sum of all three: what was billed at full price, what was written to cache
this turn, and what was read back from it. A long agentic run that reports four thousand input
tokens has not shrunk — the rest came from cache.
public sealed record LlmUsage : IEquatable<LlmUsage>
Inheritance
Implements
Properties
CacheCreationInputTokens
Tokens written to the cache this turn, billed at a premium over normal input. Staying at zero
public int CacheCreationInputTokens { get; init; }
CacheReadInputTokens
Tokens served from cache, billed at a fraction of normal input. This is the number that says
public int CacheReadInputTokens { get; init; }
Constructors
LlmUsage(int, int, int, int)
Token usage reported by the provider.