Cherry pick fixes to v1#5900
Merged
Merged
Conversation
…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
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:
We appreciate your contributions! |
wyf7107
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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