Skip to content

fix(6615):prevent silent drop of co-framed tool calls - #6677

Open
llalitkumarrr wants to merge 2 commits into
google:mainfrom
llalitkumarrr:fix-tool-call-coframed-with-turn-complete
Open

fix(6615):prevent silent drop of co-framed tool calls#6677
llalitkumarrr wants to merge 2 commits into
google:mainfrom
llalitkumarrr:fix-tool-call-coframed-with-turn-complete

Conversation

@llalitkumarrr

Copy link
Copy Markdown
Collaborator
  1. Link to an existing issue (if applicable):**

2. Or, if no issue exists, describe the change:

Problem:
A control-flow bug in GeminiLlmConnection.receive() (Issue #6615) caused tool calls to be silently discarded if they were co-framed frame as turn_complete=True. The receive loop encountered an early break when evaluating turn completion, completely bypassing the tool_call block.

Solution:
Rearranged the order of the steps inside the loop. First it gathers all the text and audio, second it looks for any tool calls and safely stores them and finally it checks if the model has finished its turn (turn_complete).

Testing Plan

Added a dedicated async unit test (test_receive_tool_call_and_turn_complete_in_same_message) that mocks a LiveServerMessage containing both server_content (with turn_complete=True) and tool_call in the same payload.

@adk-bot adk-bot added the live [Component] This issue is related to live, voice and video chat label Aug 11, 2026
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.

Live mode: tool_call can be silently dropped when co-framed with turn_complete in gemini_llm_connection.py

3 participants