Skip to content

fix: preserve live resumption transparency#5784

Open
he-yufeng wants to merge 1 commit into
google:mainfrom
he-yufeng:fix/live-resumption-transparent
Open

fix: preserve live resumption transparency#5784
he-yufeng wants to merge 1 commit into
google:mainfrom
he-yufeng:fix/live-resumption-transparent

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

  • stop forcing session_resumption.transparent = True when run_live() reconnects with a saved handle
  • keep the caller's original SessionResumptionConfig.transparent value intact
  • add a regression test for the default basic session-resumption path

Why

Gemini Developer API supports live session resumption, but not transparent session resumption. The reconnect path was mutating the config from a basic resumption request into transparent resumption, which makes Gemini reject the reconnect.

To verify

  • uv run pytest tests/unittests/flows/llm_flows/test_base_llm_flow.py -q
  • uv run pyink --check src/google/adk/flows/llm_flows/base_llm_flow.py tests/unittests/flows/llm_flows/test_base_llm_flow.py
  • git diff --check

Fixes #5771

@adk-bot adk-bot added the live [Component] This issue is related to live, voice and video chat label May 21, 2026
@he-yufeng he-yufeng force-pushed the fix/live-resumption-transparent branch from 3538438 to 73ea2e2 Compare May 22, 2026 14:27
@he-yufeng
Copy link
Copy Markdown
Author

Rebased this onto current main and reran the focused checks.

Validation:

PYTHONUTF8=1 .\.venv\Scripts\python.exe -m pytest tests\unittests\flows\llm_flows\test_base_llm_flow.py -q --basetemp .tmp\pytest-5784-rebase
# 31 passed, 1 warning

PYTHONUTF8=1 .\.venv\Scripts\python.exe -m pyink src\google\adk\flows\llm_flows\base_llm_flow.py tests\unittests\flows\llm_flows\test_base_llm_flow.py --check
PYTHONUTF8=1 .\.venv\Scripts\python.exe -m py_compile src\google\adk\flows\llm_flows\base_llm_flow.py tests\unittests\flows\llm_flows\test_base_llm_flow.py
git diff --check upstream/main..HEAD

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.

Bug: run_live() forces session_resumption.transparent=True on reconnect, breaking Gemini Developer API session resumption

2 participants