Lite LLMConsumption Capturing Prompt Executor
LiteLLM variant: reads inputTokensCount / outputTokensCount / totalTokensCount from the first response that carries token metadata.
LiteLLM populates these fields on the first (and typically only) response in the list; subsequent responses are tool-call objects with no token data.
Functions
Returns the consumption accumulated since the previous call (or since construction), then resets the accumulator. Returns null when nothing was captured.
Runs the call through delegate and accumulates any LLMConsumption reported by extractConsumption for the returned responses. Accumulation is thread-safe.
Delegates streaming to delegate; no consumption is captured from streamed frames.
Executes prompt against model, requesting a structured response of type OutputStructT, and returns the parsed data.
Delegates moderation to delegate; no consumption is captured.