From e054cdc4f069f3a642c57665a1e4b6f09cd0db2c Mon Sep 17 00:00:00 2001 From: Nubenetes Bot Date: Fri, 22 May 2026 19:43:51 +0200 Subject: [PATCH] fix: update Gemini grounding tool name to google_search to resolve API 400 error --- src/gemini_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gemini_utils.py b/src/gemini_utils.py index 47e2c0a0..a48b192e 100644 --- a/src/gemini_utils.py +++ b/src/gemini_utils.py @@ -336,7 +336,7 @@ async def call_gemini_with_retry(prompt: str, response_format: str = "json", max # --- TOOL ENABLING (MCP-LIKE GROUNDING) --- payload = { "contents": [{"parts": [{"text": prompt}]}], - "tools": [{"google_search_retrieval": {}}] if use_grounding else [] + "tools": [{"google_search": {}}] if use_grounding else [] } # TELEMETRY: Log Payload Size