fix: Update google_search_tool.py to support updated Gemini LIVE model naming

Merge https://github.com/google/adk-python/pull/1518

## Description
Fixes [#1512](https://github.com/google/adk-python/issues/1512) by updating google_search_tool.py to support new Gemini LIVE model naming

## Changes
- Update the model name checking in google_search_tool.py

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/1518 from rayira:rayira-patch-1 4c98f88290af6e0a4690652019ca1d7a08689340
PiperOrigin-RevId: 775941268
This commit is contained in:
Ray Iramaneerat
2025-06-25 19:56:09 -07:00
committed by Copybara-Service
parent 04de3e197d
commit 77b869f5e3
+1 -1
View File
@@ -54,7 +54,7 @@ class GoogleSearchTool(BaseTool):
llm_request.config.tools.append(
types.Tool(google_search_retrieval=types.GoogleSearchRetrieval())
)
elif llm_request.model and 'gemini-2' in llm_request.model:
elif llm_request.model and 'gemini-' in llm_request.model:
llm_request.config.tools.append(
types.Tool(google_search=types.GoogleSearch())
)