Skip to content

Cherry pick fixes to v1#5934

Merged
wyf7107 merged 3 commits into
v1from
cherry-pick-fixes-to-v1
Jun 1, 2026
Merged

Cherry pick fixes to v1#5934
wyf7107 merged 3 commits into
v1from
cherry-pick-fixes-to-v1

Conversation

@wukath

@wukath wukath commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Cherry-pick the following commits from main into v1:

9126acb: Support turn_complete_reason in Live responses to capture safety info
e896c62: Prevent grounding metadata loss in Gemini 3.1
e5af12c: Resolve 1007 error and support Gemini 3.1 Flash Live protocol

wukath added 2 commits May 29, 2026 16:25
…re safety info

Allows clients to capture the safety filter and turn completion reasons when using the Gemini Live API (v3.1+).
Previously in Live v2.5, SafetyFilterMetadata was passed back, but with Live v3.1 it has been moved to turn_complete_reason. This change adds support for turn_complete_reason in LlmResponse and populates it from the server content.

Change-Id: Ie6d970e65f3937fb1cfa3bf7f01df79f4f1a71d8
In Gemini 3.1 Live, grounding metadata is often emitted early alongside partial chunks or immediately after tool execution, causing the runner to discard it because it is associated with partial=True events.

- Retain pending grounding metadata during the turn in GeminiLlmConnection.receive and yield it on the final non-partial event.
- Add test_receive_grounding_metadata_pending unit test to verify the fix.

Change-Id: I4d8ab1f231a3fed63c4375cbfcd8831d6535721e
@adk-bot adk-bot added the live [Component] This issue is related to live, voice and video chat label Jun 1, 2026
@adk-bot

adk-bot commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Response from ADK Triaging Agent

Hello @wukath, thank you for creating this PR!

To help us review and merge your contribution as quickly as possible, please ensure the pull request follows our contribution guidelines. Currently, we noticed the following details are missing:

  • Associated Issue: All PRs (except small documentation/typos) should have an associated GitHub Issue. If a relevant issue doesn't exist, please create one first, or describe the bug/feature directly within the PR description following our issue template structure.
  • Testing Plan: Please include a dedicated testing plan section in your PR description to describe how you tested or will test these cherry-picked changes.

Providing this information will help our reviewers understand and verify the changes more efficiently. Thank you!

Resolves protocol handling discrepancies when connecting to Gemini 3.1 Flash Live models:
- Sets initial_history_in_client_content=True when seeding conversation history during connection handshake.
- Appends turn_complete=True on the final history turn during setup.
- Iterates sequentially through all parts of model_turn to unpack multiplexed audio and text responses.
- Prunes unsupported proactivity and affective dialogue configurations when assembling LiveConnectConfig.

Change-Id: I2d0ff38d8a6eb40ea17b37f65a4ddd093230842c
@wyf7107 wyf7107 merged commit 459782f into v1 Jun 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

live [Component] This issue is related to live, voice and video chat

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants