SIGN IN SIGN UP

fix(sdk): adopt server metadata on same-id optimistic message echo (#2692)

## Summary

Optimistic humans kept winning over the values echo, so committed
additional_kwargs (e.g. attachment paths) stayed off stream.messages
until hydration. Prefer the server copy when content matches; streamed
tokens still win when they have moved past the snapshot.

- Same-id `values` echoes of an optimistic human now take
server-authored metadata (`additional_kwargs`, etc.) on
`stream.messages` instead of keeping the plain optimistic copy until
reload.
- In-flight AI token streaming is unchanged: streamed content still wins
when it has moved past the snapshot.
C
Christian Bromann committed
a86f813954e010fbf30711c37baa5c53444613d5
Parent: 3ce9f8d
Committed by GitHub <noreply@github.com> on 8/19/2026, 5:29:39 AM