From bc93213d16bdd3fcc0a0e30d0e9ac8b600ccda2b Mon Sep 17 00:00:00 2001 From: vikingowl Date: Sat, 25 Apr 2026 13:34:07 +0200 Subject: [PATCH] fix(ai): switch grounding tool from GoogleSearchRetrieval to GoogleSearch Gemini API no longer supports googleSearchRetrieval; requests fail with INVALID_ARGUMENT. Replace with the google_search tool as required. --- backend/internal/pkg/ai/gemini.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/internal/pkg/ai/gemini.go b/backend/internal/pkg/ai/gemini.go index f9c95e2..fdfa28c 100644 --- a/backend/internal/pkg/ai/gemini.go +++ b/backend/internal/pkg/ai/gemini.go @@ -237,7 +237,7 @@ func (p *GeminiProvider) Chat(ctx context.Context, req *ChatRequest) (*ChatRespo // Google Search grounding if req.Grounded { cfg.Tools = []*genai.Tool{ - {GoogleSearchRetrieval: &genai.GoogleSearchRetrieval{}}, + {GoogleSearch: &genai.GoogleSearch{}}, } }