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.
This commit is contained in:
@@ -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{}},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user