diff --git a/src/google/adk/tools/google_search_tool.py b/src/google/adk/tools/google_search_tool.py index e029a09..164229b 100644 --- a/src/google/adk/tools/google_search_tool.py +++ b/src/google/adk/tools/google_search_tool.py @@ -46,7 +46,7 @@ class GoogleSearchTool(BaseTool): ) -> None: llm_request.config = llm_request.config or types.GenerateContentConfig() llm_request.config.tools = llm_request.config.tools or [] - if llm_request.model and llm_request.model.startswith('gemini-1'): + if llm_request.model and 'gemini-1' in llm_request.model: if llm_request.config.tools: print(llm_request.config.tools) raise ValueError( @@ -55,7 +55,7 @@ class GoogleSearchTool(BaseTool): llm_request.config.tools.append( types.Tool(google_search_retrieval=types.GoogleSearchRetrieval()) ) - elif llm_request.model and llm_request.model.startswith('gemini-2'): + elif llm_request.model and 'gemini-2' in llm_request.model: llm_request.config.tools.append( types.Tool(google_search=types.GoogleSearch()) )