Discrepancy in Message Rendering Order During Streaming with New AI SDK Features
I've observed that with the latest AI SDK features implemented in chat/route.ts, the rendering order of messages during streaming does not match the final rendered output after a page refresh. Specifically, during streaming:
-
Streaming Behavior: Only one aggregated message is displayed. As additional text is streamed, it pushes the tool component forward (i.e., the tool invocation appears to shift its position relative to the streamed text).
-
Post-Refresh Behavior: After refreshing the page, the message is split into two separate messages with the tool component rendered first, as expected.
same problem here, any solution ? Is the version with the bug located ?
same problem here, any solution ? Is the version with the bug located ?
I have temporarily reverted to version 'ai': '4.0.11', until the issue is resolved.
any fix to it?
is someone one using the last ai version without this problem?
t seems that messages are being merged somewhere in the frontend. In route.ts, the saved messages contain 2 or 3 items, but on the frontend, they are reduced to just one.
The issue is marked as completed, Where is the fix ?