TokenUsage
Raw token counters, verbatim from the durable record. Not directly summable across providers — sum the counted-once derivations instead.
Fields and variants
Section titled “Fields and variants”cacheReadTokenscacheWriteTokenscachedTokensinputTokensoutputTokensreasoningTokens
Source
schema/msp/experimental/msp.schema.json#/types/TokenUsage
{ "description": "Raw token counters, verbatim from the durable record. Not directly summable across providers —\nsum the counted-once derivations instead.", "properties": { "cacheReadTokens": { "description": "Cache read tokens, only when the provider distinguishes writes/reads.", "type": "integer" }, "cacheWriteTokens": { "description": "Cache write tokens, only when the provider distinguishes\nwrites/reads.", "type": "integer" }, "cachedTokens": { "description": "Provider-reported cache tokens (inside or beside `inputTokens`,\nprovider-convention-dependent — the reason `promptTokens` exists).", "type": "integer" }, "inputTokens": { "description": "Provider-reported input tokens.", "type": "integer" }, "outputTokens": { "description": "Provider-reported output tokens.", "type": "integer" }, "reasoningTokens": { "description": "Output tokens spent on reasoning, when the provider reports it.", "type": "integer" } }, "required": [ "cachedTokens", "inputTokens", "outputTokens", "reasoningTokens" ], "type": "object"}