Skip to content

fix: preserve live thinking config#5812

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

fix: preserve live thinking config#5812
he-yufeng wants to merge 1 commit into
google:mainfrom
he-yufeng:fix/live-thinking-config

Conversation

@he-yufeng
Copy link
Copy Markdown

Summary

  • copy GenerateContentConfig.thinking_config into the Gemini live connect config
  • keep existing live connection behavior for headers, system instruction, and tools
  • add a regression test that verifies aio.live.connect() receives the thinking config

To verify

  • uv run pytest tests/unittests/models/test_google_llm.py -q
  • uv run pyink --check src/google/adk/models/google_llm.py tests/unittests/models/test_google_llm.py
  • python -m py_compile C:\dev\GITHUB-clean\adk-python\src\google\adk\models\google_llm.py C:\dev\GITHUB-clean\adk-python\tests\unittests\models\test_google_llm.py
  • git diff --check -- src/google/adk/models/google_llm.py tests/unittests/models/test_google_llm.py

Fixes #5805

@adk-bot adk-bot added the live [Component] This issue is related to live, voice and video chat label May 22, 2026
@adk-bot
Copy link
Copy Markdown
Collaborator

adk-bot commented May 22, 2026

Response from ADK Triaging Agent

Hello @he-yufeng, thank you for creating this PR!

This PR is a bug fix, and while you have provided a detailed "To verify" section, could you please also:

  • Provide a summary of the passed pytest results as per our unit testing guidelines.
  • Provide logs or screenshots after the fix is applied (where applicable) to help reviewers understand and verify the fix more easily.

This information will help our reviewers review your PR more efficiently. Thanks!

@he-yufeng he-yufeng force-pushed the fix/live-thinking-config branch from 40f5ae3 to eb4aa44 Compare May 22, 2026 20:49
@he-yufeng
Copy link
Copy Markdown
Author

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

Validation on Windows:

uv run --no-sync pytest tests/unittests/models/test_google_llm.py::test_connect_copies_thinking_config_to_live_config -q --basetemp .tmp\pytest -p no:cacheprovider
# 1 passed

uv run --no-sync pytest tests/unittests/models/test_google_llm.py -q --basetemp .tmp\pytest -p no:cacheprovider
# 62 passed, 3 warnings

uv run --no-sync pyink --check src/google/adk/models/google_llm.py tests/unittests/models/test_google_llm.py
uv run --no-sync python -m py_compile src/google/adk/models/google_llm.py tests/unittests/models/test_google_llm.py
git diff --check upstream/main...HEAD

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

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.

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

2 participants