Commit 71d8c84
fix(live): forward thinking config
Merge #5905
## Summary
- forward `GenerateContentConfig.thinking_config` into `LiveConnectConfig` before opening Gemini live sessions
- keep existing `live_connect_config.thinking_config` untouched when the request config has no thinking config
- add a regression test for `Gemini.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.py`
- `python -m pyink --check src\google\adk\models\google_llm.py tests\unittests\models\test_google_llm.py`
- `git diff --check`
Note: pylint on the full `google_llm.py` module still reports pre-existing warnings unrelated to this change, so I did not treat that as a blocker.
Co-authored-by: George Weale <gweale@google.com>
COPYBARA_INTEGRATE_REVIEW=#5905 from he-yufeng:fix/live-thinking-config-forwarding ab445dd
PiperOrigin-RevId: 9339845591 parent 9dc8ed7 commit 71d8c84
2 files changed
Lines changed: 53 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
458 | 462 | | |
459 | 463 | | |
460 | 464 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
733 | 732 | | |
734 | 733 | | |
735 | 734 | | |
736 | | - | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
737 | 751 | | |
738 | 752 | | |
739 | | - | |
| 753 | + | |
740 | 754 | | |
741 | 755 | | |
742 | 756 | | |
743 | 757 | | |
744 | 758 | | |
745 | | - | |
| 759 | + | |
746 | 760 | | |
747 | 761 | | |
748 | 762 | | |
| |||
833 | 847 | | |
834 | 848 | | |
835 | 849 | | |
836 | | - | |
| 850 | + | |
837 | 851 | | |
838 | 852 | | |
839 | 853 | | |
| |||
853 | 867 | | |
854 | 868 | | |
855 | 869 | | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
856 | 900 | | |
857 | 901 | | |
858 | 902 | | |
| |||
0 commit comments