Skip to content
Prompty

UsageChunk

Cumulative token usage emitted once after provider content and tool chunks.

---
title: UsageChunk
config:
  look: handDrawn
  theme: colorful
  class:
    hideEmptyMembersBox: true
---
classDiagram
    class StreamChunk {
      <<abstract>>
        +string kind
    }
    StreamChunk <|-- UsageChunk
    class UsageChunk {
        +string kind
        +InvocationUsage usage
    }
    class InvocationUsage {
        +int64 inputTokens
        +int64 outputTokens
        +int64 totalTokens
    }
    UsageChunk *-- InvocationUsage
Name Type Description
kind string The kind identifier for usage chunks
usage InvocationUsage Complete cumulative token usage for the completed provider invocation

The following types are composed within UsageChunk: