InvocationUsage
Complete cumulative token usage for one completed model invocation.
Providers emit this value at most once per invocation. totalTokens uses
the provider total when available; otherwise the provider adapter computes
it as inputTokens + outputTokens.
Class Diagram
Section titled “Class Diagram”---
title: InvocationUsage
config:
look: handDrawn
theme: colorful
class:
hideEmptyMembersBox: true
---
classDiagram
class InvocationUsage {
+int64 inputTokens
+int64 outputTokens
+int64 totalTokens
}
Yaml Example
Section titled “Yaml Example”inputTokens: 150outputTokens: 42totalTokens: 192Properties
Section titled “Properties”| Name | Type | Description |
|---|---|---|
| inputTokens | int64 | Number of input tokens consumed by the completed invocation |
| outputTokens | int64 | Number of output tokens generated by the completed invocation |
| totalTokens | int64 | Total tokens consumed by the completed invocation |