Commit 1ab925e
authored
fix: skip FunctionCallingConfig when only native tools are present (#7407)
* fix: skip FunctionCallingConfig when only native tools are present
When native tools (google_search, url_context) are enabled without any
function_declarations, _prepare_query_config was still creating a
FunctionCallingConfig, which makes Gemini API return 400 INVALID_ARGUMENT.
Now we only set tool_config when tool_list actually contains
function_declarations.
Fixes #7406
* style: ruff format1 parent 301df11 commit 1ab925e
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
| 219 | + | |
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
| |||
0 commit comments