fix: update Gemini grounding tool name to google_search to resolve API 400 error

This commit is contained in:
Nubenetes Bot
2026-05-22 19:43:51 +02:00
parent 183b8d4bfc
commit e054cdc4f0

View File

@@ -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