You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: preserve anthropic assistant ids in tool-first streams (#480)
* fix: preserve anthropic assistant ids in tool-first streams
* fix(adapters): set AG-UI parentMessageId on tool-first tool calls
Bind TOOL_CALL_START to the stream's stable assistant message id via
AG-UI `parentMessageId` in every text adapter, so a tool call that
streams before any text no longer forces the assistant message id to
change mid-stream (which destabilises UIMessage.id and can remount the
message subtree in useChat). Fixes#477.
Extends #480 (Anthropic only) to:
- @tanstack/openai-base (Responses + Chat Completions)
- @tanstack/ai-openrouter (Responses + Chat Completions)
- @tanstack/ai-gemini (text + experimental text-interactions)
- @tanstack/ai-ollama
Adds a tool-first regression per adapter asserting the TOOL_CALL_START
parentMessageId equals the TEXT_MESSAGE_START messageId.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Tom Beckenham <34339192+tombeckenham@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments