Skip to content

GH-3366 Fix: Retain toolCalls in MessageAggregator for streaming responses #3548

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

WOONBE
Copy link
Contributor

@WOONBE WOONBE commented Jun 16, 2025

As mentioned in the issue, the MessageAggregator currently does not retain toolCalls when processing streaming API responses, causing them to be absent from the final AssistantMessage.

This PR includes the following changes:

  • Enhances the MessageAggregator to correctly aggregate toolCalls from all chunks in a stream.
  • Adds a corresponding unit test to verify the fix and prevent regressions.

Fixed #3366

Signed-off-by: WOONBE <[email protected]>
@ilayaperumalg ilayaperumalg self-assigned this Jun 16, 2025
@ilayaperumalg ilayaperumalg added this to the 1.1.x milestone Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Streaming mode AssistantMessage does not retain toolCalls, causing issues with tool confirmation workflows
2 participants