anthropic.internal.AnthStreamState$stream

What a stream carried that `ai.stream.Event` cannot yet express: tool calls, extended thinking, cache-token counts and the raw stop reason. The decoder folds them here so nothing is silently dropped; wiring them to the consumer needs the stdlib extensions listed in the workstream report.

Reference version

Signature

class anthropic.internal.AnthStreamState$stream

What a stream carried that ai.stream.Event cannot yet express: tool calls, extended thinking, cache-token counts and the raw stop reason. The decoder folds them here so nothing is silently dropped; wiring them to the consumer needs the stdlib extensions listed in the workstream report.

Source:<builtin>/anthropic/ns_internal/messages.bamlbytes 0–0

Fields

thinking

string | null

signature

string | null

cache_read_input_tokens

int | null

cache_creation_input_tokens

int | null

reasoning_tokens

int | null

stop_reason_raw

string | null

model

string | null