fix(live): forward thinking config#5905
Conversation
|
Response from ADK Triaging Agent Hello @he-yufeng, thank you for creating this PR! This PR looks great and has a clear explanation and associated issue. To help the reviewers merge your PR more efficiently, could you please provide the following information as per our contribution guidelines:
Thank you for your contribution! |
c295c81 to
77138dd
Compare
|
Rebased this onto current Pytest summary: I also ran the file-level checks: For the live-session evidence, I used a mocked live client so no real API key or network call was needed. The captured call into |
|
I will use the 📝 Summary of Analysis
The full, structured report has been saved as an artifact at: Recommendation: Approve — This is a well-designed, extremely clean, non-intrusive, and robust fix that solves the target issue perfectly. |
|
Hi @he-yufeng , Thank you for your contribution! We appreciate you taking the time to submit this pull request. |
|
Hi @GWeale , can you please review this. |
|
Updated the branch to include the mTLS Gemini endpoint in the Live API base URL coverage. This should address the hardcoded googleapis.com file-content gate for the changed model test file. Validated locally:
Focused model tests passed: 3 passed, 60 deselected. |
4dd2e53 to
79826e5
Compare
|
Final update pushed as Besides the mTLS endpoint coverage for the file-content gate, I also cleaned up an accidental behavior change in the branch: the Gemini API guard for transparent session resumption is back under the session-resumption check, so normal Live API connections are not blocked. Validated locally:
Focused model tests passed: 3 passed, 60 deselected. |
|
I will start by reading the instructions in the The complete structured assessment has been generated and saved directly to the active workspace as an artifact here: 💡 Keys takeaway Highlights
Recommendation: Approve — This is a highly elegant, target-focused, bug fix that is completely ready to be merged. |
Summary
GenerateContentConfig.thinking_configintoLiveConnectConfigbefore opening Gemini live sessionslive_connect_config.thinking_configuntouched when the request config has no thinking configGemini.connect()Fixes #5805.
To verify
$env:PYTHONPATH=(Resolve-Path src).Path; python -m pytest tests\unittests\models\test_google_llm.py -q$env:PYTHONPATH=(Resolve-Path src).Path; python -m py_compile src\google\adk\models\google_llm.py tests\unittests\models\test_google_llm.pypython -m pyink --check src\google\adk\models\google_llm.py tests\unittests\models\test_google_llm.pygit diff --checkNote: pylint on the full
google_llm.pymodule still reports pre-existing warnings unrelated to this change, so I did not treat that as a blocker.