Skip to content

fix(streaming): preserve SSE tool calls in session history#368

Open
kiwigitops wants to merge 2 commits into
google:mainfrom
kiwigitops:fix-nonprogressive-sse-tool-history
Open

fix(streaming): preserve SSE tool calls in session history#368
kiwigitops wants to merge 2 commits into
google:mainfrom
kiwigitops:fix-nonprogressive-sse-tool-history

Conversation

@kiwigitops
Copy link
Copy Markdown

Summary

  • preserve tool-call parts in non-progressive SSE final aggregated responses
  • keep generated function-call ids and add a regression covering text plus multiple tool calls

Closes #355.

Testing

  • npm run build --workspace core
  • npx vitest run --project unit:core core/test/utils/streaming_utils_test.ts

@kiwigitops kiwigitops force-pushed the fix-nonprogressive-sse-tool-history branch from 9dceb82 to 0af8a94 Compare May 24, 2026 05:10
@kiwigitops
Copy link
Copy Markdown
Author

Updated after the latest CI failure. Non-progressive SSE now flushes accumulated text and emits tool-call parts once, instead of returning the calls again from close(). That keeps the calls saveable in session history without re-invoking them from the final aggregate.

Verified:

  • npm run build
  • npx vitest run --project unit:core core/test/utils/streaming_utils_test.ts core/test/models/google_llm_test.ts
  • npx vitest run --project integration tests/integration/a2a/basic/a2a_agent_test.ts

@kiwigitops kiwigitops force-pushed the fix-nonprogressive-sse-tool-history branch from 75c759a to b345755 Compare May 29, 2026 03:08
@kiwigitops
Copy link
Copy Markdown
Author

Rebased onto current main after the Windows validation failure. The stale lint errors from the previous merge base are gone on this branch now.

Checks after rebase:

  • npm run build
  • npx vitest run --project unit:core core/test/utils/streaming_utils_test.ts core/test/models/google_llm_test.ts
  • npm run lint
  • git diff --check

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.

Bug: StreamingMode.SSE causes agent to drop tool calls in subsequent turns

1 participant