Class LlmUsage

Assembly: redb.Route.Llm.dll

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

Object→LlmUsage

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; }

Empty

Empty usage record.

public static LlmUsage Empty { get; }

InputTokens

Prompt tokens billed at full price.

public int InputTokens { get; init; }

OutputTokens

Generated tokens.

public int OutputTokens { get; init; }

Constructors

LlmUsage(int, int, int, int)

Token usage reported by the provider.