Skip to content

fix: preserve nontransparent live resumption#5676

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

fix: preserve nontransparent live resumption#5676
he-yufeng wants to merge 1 commit into
google:mainfrom
he-yufeng:fix/non-vertex-live-resumption

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

Fixes #5675.

BaseLlmFlow.run_live always set session_resumption.transparent = True when reconnecting with a saved live-session handle. That overwrote an explicit transparent=False config, which is the configuration needed for direct Gemini API live-session resumption because GoogleLLM.connect rejects transparent resumption on the Gemini API backend.

This keeps the existing default behavior for reconnects that have no session resumption config yet, but preserves a caller-provided non-transparent config.

Validation

python -m pytest tests/unittests/flows/llm_flows/test_base_llm_flow.py -q
# 29 passed

pyink --check src/google/adk/flows/llm_flows/base_llm_flow.py tests/unittests/flows/llm_flows/test_base_llm_flow.py
isort --check-only src/google/adk/flows/llm_flows/base_llm_flow.py tests/unittests/flows/llm_flows/test_base_llm_flow.py
python -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

@he-yufeng he-yufeng force-pushed the fix/non-vertex-live-resumption branch 2 times, most recently from 0862fa5 to 40d1f38 Compare May 15, 2026 05:56
@rohityan rohityan self-assigned this May 18, 2026
@rohityan rohityan added live [Component] This issue is related to live, voice and video chat request clarification [Status] The maintainer need clarification or more information from the author labels May 19, 2026
@he-yufeng he-yufeng force-pushed the fix/non-vertex-live-resumption branch from 39cad79 to cf3a10c Compare May 20, 2026 04:52
@rohityan
Copy link
Copy Markdown
Collaborator

Hi @he-yufeng ,Thank you for your contribution! We appreciate you taking the time to submit this pull request. Please fix formatting errors by running autoformat.sh

@he-yufeng he-yufeng force-pushed the fix/non-vertex-live-resumption branch from 735c935 to 69033ca Compare May 21, 2026 04:57
@he-yufeng
Copy link
Copy Markdown
Author

Rebased onto current upstream/main and re-ran the focused checks locally.

Validation:

PYTHONUTF8=1 .\.venv\Scripts\python.exe -m pytest tests\unittests\flows\llm_flows\test_base_llm_flow.py -q --basetemp .tmp\pytest-5676
# 29 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

The previous failure was the pre-commit formatting check; this branch is now a single commit on current main.

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 request clarification [Status] The maintainer need clarification or more information from the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session resumption crashes on non-Vertex AI backend — blocks usage of Gemini 3.1 Flash Live

2 participants