Skip to content

fix: preserve Live session id on tool responses#5705

Closed
he-yufeng wants to merge 2 commits into
google:mainfrom
he-yufeng:fix/live-tool-response-session-id
Closed

fix: preserve Live session id on tool responses#5705
he-yufeng wants to merge 2 commits into
google:mainfrom
he-yufeng:fix/live-tool-response-session-id

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

  • preserve the Live session id when handle_function_calls_live() builds the matching tool response event
  • keep the same session id when parallel Live tool responses are merged
  • add regression coverage for single-tool Live responses and merged response events

Fixes #5702.

To verify

  • .\.venv\Scripts\python.exe -m pytest tests\unittests\flows\llm_flows\test_functions_simple.py -q --basetemp .tmp\pytest -p no:cacheprovider
  • .\.venv\Scripts\python.exe -m py_compile src\google\adk\flows\llm_flows\functions.py tests\unittests\flows\llm_flows\test_functions_simple.py
  • .\.venv\Scripts\python.exe -m pyink --check src\google\adk\flows\llm_flows\functions.py tests\unittests\flows\llm_flows\test_functions_simple.py
  • .\.venv\Scripts\python.exe -m isort --check-only src\google\adk\flows\llm_flows\functions.py tests\unittests\flows\llm_flows\test_functions_simple.py

@he-yufeng he-yufeng force-pushed the fix/live-tool-response-session-id branch from fbd5c0b to 8b9748a Compare May 14, 2026 18:59
@he-yufeng
Copy link
Copy Markdown
Author

Rebased onto current main after the branch briefly showed behind.

Re-ran the focused local checks:

  • .\.venv\Scripts\python.exe -m pytest tests\unittests\flows\llm_flows\test_functions_simple.py -q --basetemp .tmp\pytest -p no:cacheprovider (28 passed)
  • .\.venv\Scripts\python.exe -m py_compile src\google\adk\flows\llm_flows\functions.py tests\unittests\flows\llm_flows\test_functions_simple.py
  • .\.venv\Scripts\python.exe -m pyink --check src\google\adk\flows\llm_flows\functions.py tests\unittests\flows\llm_flows\test_functions_simple.py
  • .\.venv\Scripts\python.exe -m isort --check-only src\google\adk\flows\llm_flows\functions.py tests\unittests\flows\llm_flows\test_functions_simple.py

@xuanyang15
Copy link
Copy Markdown
Collaborator

Hi @he-yufeng, thanks for creating this PR! Since there is already fix for the issue which is under internal review, I will proceed with that one for now.

@xuanyang15 xuanyang15 closed this May 14, 2026
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.

Live tool function_response lacks live_session_id, causing orphan response ValueError after reconnect/history rebuild

2 participants