@@ -5665,6 +5665,8 @@ type BetaRawContentBlockDeltaUnion struct {
56655665 // This field is from variant [BetaCitationsDelta].
56665666 Citation BetaCitationsDeltaCitationUnion `json:"citation"`
56675667 // This field is from variant [BetaThinkingDelta].
5668+ EstimatedTokens int64 `json:"estimated_tokens"`
5669+ // This field is from variant [BetaThinkingDelta].
56685670 Thinking string `json:"thinking"`
56695671 // This field is from variant [BetaSignatureDelta].
56705672 Signature string `json:"signature"`
@@ -5677,6 +5679,7 @@ type BetaRawContentBlockDeltaUnion struct {
56775679 Type respjson.Field
56785680 PartialJSON respjson.Field
56795681 Citation respjson.Field
5682+ EstimatedTokens respjson.Field
56805683 Thinking respjson.Field
56815684 Signature respjson.Field
56825685 Content respjson.Field
@@ -6479,6 +6482,8 @@ type BetaRawMessageStreamEventUnionDelta struct {
64796482 // This field is from variant [BetaRawContentBlockDeltaUnion].
64806483 Citation BetaCitationsDeltaCitationUnion `json:"citation"`
64816484 // This field is from variant [BetaRawContentBlockDeltaUnion].
6485+ EstimatedTokens int64 `json:"estimated_tokens"`
6486+ // This field is from variant [BetaRawContentBlockDeltaUnion].
64826487 Thinking string `json:"thinking"`
64836488 // This field is from variant [BetaRawContentBlockDeltaUnion].
64846489 Signature string `json:"signature"`
@@ -6495,6 +6500,7 @@ type BetaRawMessageStreamEventUnionDelta struct {
64956500 Type respjson.Field
64966501 PartialJSON respjson.Field
64976502 Citation respjson.Field
6503+ EstimatedTokens respjson.Field
64986504 Thinking respjson.Field
64996505 Signature respjson.Field
65006506 Content respjson.Field
@@ -8305,14 +8311,24 @@ func init() {
83058311}
83068312
83078313type BetaThinkingDelta struct {
8308- Thinking string `json:"thinking" api:"required"`
8309- Type constant.ThinkingDelta `json:"type" default:"thinking_delta"`
8314+ // Per-frame increment of a coarse, running estimate of the tokens this thinking
8315+ // block has produced so far. Present whenever the
8316+ // `thinking-token-count-2026-05-13` beta is set; `null` unless `thinking.display`
8317+ // resolves to `"omitted"` and a count is due this frame. Sum the increments across
8318+ // `thinking_delta` frames on this block for a progress indicator. Each increment
8319+ // is a non-negative multiple of a fixed quantum and the cadence is rate-limited,
8320+ // so this is a deliberately lossy display hint, not a billable count;
8321+ // `usage.output_tokens` remains authoritative.
8322+ EstimatedTokens int64 `json:"estimated_tokens" api:"required"`
8323+ Thinking string `json:"thinking" api:"required"`
8324+ Type constant.ThinkingDelta `json:"type" default:"thinking_delta"`
83108325 // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
83118326 JSON struct {
8312- Thinking respjson.Field
8313- Type respjson.Field
8314- ExtraFields map [string ]respjson.Field
8315- raw string
8327+ EstimatedTokens respjson.Field
8328+ Thinking respjson.Field
8329+ Type respjson.Field
8330+ ExtraFields map [string ]respjson.Field
8331+ raw string
83168332 } `json:"-"`
83178333}
83188334
0 commit comments