Lite LLMToken Consumption
Token-based consumption for the LiteLLM provider.
Tracks tokens with detailed breakdown:
inputTokens: Tokens in the prompt/input
outputTokens: Tokens in the completion/output
totalTokens: Total tokens consumed
Types
Factory for reconstructing LiteLLMTokenConsumption from its pretty-JSON form.
Properties
Functions
Adds two consumptions of the same flavor. Implementations reject mismatched flavors.
The flavor-specific fields as pretty JSON (without the top-level "unit" field).
Human-readable form, typically with input/output breakdown where applicable.
Total-only short form, e.g. "330,329.00 tokens" / "150.00 credits". Used where the input/output breakdown would be misleading or off-topic — most notably the spend-limit abort message, where there is no such thing as a separate input/output cap (cap is a single total).