ai.stream.TurnMeta
Turn metadata as it arrives on the wire. Providers send stop_reason and token counts on different events; each TurnMeta carries what its event had and TurnStream folds non-null fields together (last write wins).
Reference version
Signature
class ai.stream.TurnMetaTurn metadata as it arrives on the wire. Providers send stop_reason and token counts on different events; each TurnMeta carries what its event had and TurnStream folds non-null fields together (last write wins).
Source:<builtin>/ai/ns_stream/stream.bamlbytes 4215–4325