Skip to content

Cherry pick fixes to v1#5900

Merged
wyf7107 merged 2 commits into
v1from
cherry-pick-fixes-to-v1
May 29, 2026
Merged

Cherry pick fixes to v1#5900
wyf7107 merged 2 commits into
v1from
cherry-pick-fixes-to-v1

Conversation

@wukath

@wukath wukath commented May 29, 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

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
@wukath wukath requested a review from wyf7107 May 29, 2026 23:32
@adk-bot adk-bot added the live [Component] This issue is related to live, voice and video chat label May 29, 2026
@adk-bot

adk-bot commented May 29, 2026

Copy link
Copy Markdown
Collaborator

Response from ADK Triaging Agent

Hello @wukath, thank you for creating this PR!

This PR is a cherry-pick of two commits from main into v1. To help the reviewers review your changes more efficiently, please make sure your PR follows the contribution guidelines:

  • Associated Issue: All PRs (except small documentation/typo fixes) should have an associated issue. If there isn't one already, please create one or update the PR description to describe the bug/feature directly following our issue templates.
  • Testing Plan: Please include a testing plan section in your PR description detailing how you verified these cherry-picked changes (such as running the newly added unit tests in test_gemini_llm_connection.py on the v1 branch).
  • Logs or Screenshots: If applicable, please provide any logs or screenshots of the testing output to help verify that the changes are working correctly on this branch.

We appreciate your contributions!

@wyf7107 wyf7107 merged commit 8e9d2df into v1 May 29, 2026
9 checks passed
@wyf7107 wyf7107 deleted the cherry-pick-fixes-to-v1 branch May 30, 2026 00:09
@wukath wukath restored the cherry-pick-fixes-to-v1 branch June 1, 2026 22:42
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.

3 participants