close
Skip to content

fix: forward thinking config to live Gemini sessions#5823

Closed
he-yufeng wants to merge 2 commits into
google:mainfrom
he-yufeng:fix/live-thinking-config-5805
Closed

fix: forward thinking config to live Gemini sessions#5823
he-yufeng wants to merge 2 commits into
google:mainfrom
he-yufeng:fix/live-thinking-config-5805

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

  • Forward GenerateContentConfig.thinking_config into LiveConnectConfig before opening a Gemini live session
  • Preserve existing behavior when no thinking config is set
  • Add a connect-level regression test for the live config handoff

Fixes #5805.

To verify

  • python -m py_compile src\google\adk\models\google_llm.py tests\unittests\models\test_google_llm.py
  • uv run pytest tests\unittests\models\test_google_llm.py::test_connect_forwards_thinking_config_to_live_config tests\unittests\models\test_google_llm.py::test_connect_without_custom_headers -q
  • uv run pytest tests\unittests\models\test_google_llm.py -q
  • uv run ruff check src\google\adk\models\google_llm.py
  • git diff --check

Note: uv run ruff check src\google\adk\models\google_llm.py tests\unittests\models\test_google_llm.py reports pre-existing lint in test_google_llm.py (os unused, and an older unused connection binding). I left those unrelated lines untouched.

@adk-bot adk-bot added the live [Component] This issue is related to live, voice and video chat label May 23, 2026
@rohityan rohityan self-assigned this May 26, 2026
@rohityan rohityan added the request clarification [Status] The maintainer need clarification or more information from the author label May 26, 2026
@he-yufeng he-yufeng force-pushed the fix/live-thinking-config-5805 branch from ad54597 to 351645a Compare May 27, 2026 09:15
@he-yufeng
Copy link
Copy Markdown
Author

Rebased onto current upstream/main. Current head is 351645a.

Validation on Windows after rebase:

  • uv run --no-sync pytest tests\unittests\models\test_google_llm.py -q --basetemp .tmp\pytest-5823-20260527 -p no:cacheprovider -> 62 passed, 3 warnings
  • uv run --no-sync python -m py_compile src\google\adk\models\google_llm.py tests\unittests\models\test_google_llm.py
  • uv run --no-sync pyink --check src\google\adk\models\google_llm.py tests\unittests\models\test_google_llm.py
  • git diff --check upstream/main...HEAD

The warnings are existing experimental feature warnings from this test file.

@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

@rohityan
Copy link
Copy Markdown
Collaborator

Hi @he-yufeng duplicate #5812

@rohityan rohityan closed this May 27, 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 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.

thinking_config silently ignored in Runner.run_live() for streaming models

3 participants