10000 fix: Support project-based gemini model path to use google_search_tool · samsepassi/adk-python@b2fc774 · GitHub
[go: up one dir, main page]

Skip to content

Commit b2fc774

Browse files
google-genai-botcopybara-github
authored andcommitted
fix: Support project-based gemini model path to use google_search_tool
PiperOrigin-RevId: 770858301
1 parent 29e4ca9 commit b2fc774

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/google/adk/tools/vertex_ai_search_tool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ async def process_llm_request(
7676
tool_context: ToolContext,
7777
llm_request: LlmRequest,
7878
) -> None:
79-
if llm_request.model and llm_request.model.startswith('gemini-'):
80-
if llm_request.model.startswith('gemini-1') and llm_request.config.tools:
79+
if llm_request.model and 'gemini-' in llm_request.model:
80+
if 'gemini-1' in llm_request.model and llm_request.config.tools:
8181
raise ValueError(
8282
'Vertex AI search tool can not be used with other tools in Gemini'
8383
' 1.x.'

0 commit comments

Comments
 (0)
0