Skip to content

Stream partial tool results through the AI SDK adapter - #82

Merged
msullivan merged 1 commit into
mainfrom
aggregate-outbound
May 8, 2026
Merged

Stream partial tool results through the AI SDK adapter#82
msullivan merged 1 commit into
mainfrom
aggregate-outbound

Conversation

@msullivan

Copy link
Copy Markdown
Contributor

Each PartialToolCallResult now feeds the tool's aggregator and emits a
preliminary ToolOutputAvailablePart with the running snapshot. A
MessageBundle snapshot (from MessageAggregator) is converted to a
list[UIMessage] so the frontend gets the protocol-native shape.

The SSE serializer learns to encode pydantic models via model_dump
(json.dumps default=), so any aggregator snapshot or tool output
that's a pydantic model now goes on the wire correctly.

Each PartialToolCallResult now feeds the tool's aggregator and emits a
preliminary ToolOutputAvailablePart with the running snapshot. A
MessageBundle snapshot (from MessageAggregator) is converted to a
list[UIMessage] so the frontend gets the protocol-native shape.

The SSE serializer learns to encode pydantic models via model_dump
(json.dumps default=), so any aggregator snapshot or tool output
that's a pydantic model now goes on the wire correctly.
@vercel

vercel Bot commented May 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
py-ai Ready Ready Preview, Comment May 7, 2026 11:31pm

Request Review

@msullivan
msullivan merged commit e1ab25b into main May 8, 2026
6 checks passed
@msullivan
msullivan deleted the aggregate-outbound branch May 8, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants