medium85%
message_to_events drops AIMessage.additional_kwargs during replay
When converting a finalized AIMessage into the v3 protocol event stream using message_to_events(), the generated message-finish event does not include the AIMessage.additional_kwargs field. This causes provider-specific data to be lost during cache replay, making replayed execution inconsistent with the original live streaming path.
