Skip to content

fix(google-genai): keep streamed function calls and coalesce streamed text - #656

Merged
nik13 merged 1 commit into
devfrom
fix/google-genai-py-wave9-on-dev
Nov 10, 2026
Merged

nik13 merged 1 commit into
devfrom
fix/google-genai-py-wave9-on-dev

Conversation

@nik13

@nik13 nik13 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

What was broken

  • Streamed function calls could be lost or merged, and interrupted streams did not always end their span.

What changed

  • Streamed function calls are matched by id without merging distinct parallel calls, and the span ends exactly once on completion, early close or cancellation.
  • Consecutive streamed text chunks are recorded as one text part, while function calls stay separate parts in their original order, so a streamed answer looks the same as a non-streamed one.

Verification

Paired run against the current dev branch on a clean, offline sandbox: dev's own suite 22 passed; the new tests fail on dev for the call and text cases; the full package suite passes 67 of 67 with the change, including the unchanged lifecycle tests.

Compatibility

No dependency, version or Python range change. Only python/frameworks/google-genai changes.

… text

- Streamed function calls are kept, matched by id without merging distinct
  parallel calls, and interrupted streams end their span once.
- Consecutive streamed text chunks are recorded as one text part, while
  function calls stay separate parts in order.
@nik13
nik13 merged commit 5717037 into dev Nov 10, 2026
10 checks passed
@nik13
nik13 deleted the fix/google-genai-py-wave9-on-dev branch November 10, 2026 13:06
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.

1 participant