anthropic.internal.AnthStreamState
What a stream carried that `ai.stream.Event` cannot yet express: tool calls, extended thinking 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.
Signature
class anthropic.internal.AnthStreamStateWhat a stream carried that ai.stream.Event cannot yet express:
tool calls, extended thinking 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 40810–41941
Fields
thinking
stringsignature
stringtool_calls
stop_reason_raw
string | nullmodel
string | nullStatic methods
new
() -> anthropic.internal.AnthStreamState throws neverInstance methods
tool_uses
(self) -> ai.content.ToolUse[] throws neverThe assembled tool calls as canonical content blocks. An argument fragment stream that never completed decodes as an empty argument map rather than throwing.