Summary
Simplify V2 assistant content and provider-state event payloads.
Source discussion: https://discord.com/channels/1391832426048651334/1522263729318658181
Decisions / direction
Fragment lifecycle convention:
*.started // durable boundary: fragment exists
*.delta // live-only streaming update
*.ended // durable boundary: final full value
Applies to text, reasoning, tool input, and compaction streaming.
Remove textID and reasoningID unless provider adapters prove multiple text/reasoning fragments can overlap/interleave inside one assistant step. Assistant text/reasoning content parts do not need IDs just for UI keys.
Keep callID for tools because it is real provider/protocol correlation data and tool settlements need it.
Rename provider continuation payloads:
providerMetadata -> state
state is opaque provider-generated continuation/replay data. It is not app/plugin metadata, not provider identity, and should not be nested by provider ID when the owning message/model already determines the provider.
Tool lifecycle accepted
tool.input.started
tool.input.delta
tool.input.ended
tool.called
tool.success / tool.failed
tool.input.delta remains live-only; started/ended/called/settled are durable as appropriate.
Follow-up check
Confirm provider adapters cannot interleave multiple active text/reasoning fragments. If they can, retain a domain fragment ID only where required.
Summary
Simplify V2 assistant content and provider-state event payloads.
Source discussion: https://discord.com/channels/1391832426048651334/1522263729318658181
Decisions / direction
Fragment lifecycle convention:
Applies to text, reasoning, tool input, and compaction streaming.
Remove
textIDandreasoningIDunless provider adapters prove multiple text/reasoning fragments can overlap/interleave inside one assistant step. Assistant text/reasoning content parts do not need IDs just for UI keys.Keep
callIDfor tools because it is real provider/protocol correlation data and tool settlements need it.Rename provider continuation payloads:
stateis opaque provider-generated continuation/replay data. It is not app/plugin metadata, not provider identity, and should not be nested by provider ID when the owning message/model already determines the provider.Tool lifecycle accepted
tool.input.deltaremains live-only; started/ended/called/settled are durable as appropriate.Follow-up check
Confirm provider adapters cannot interleave multiple active text/reasoning fragments. If they can, retain a domain fragment ID only where required.