Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions core/src/main/java/com/google/adk/tools/GoogleSearchTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
import org.slf4j.LoggerFactory;

/**
* A built-in tool that is automatically invoked by Gemini 2 models to retrieve search results from
* Google Search.
* A built-in tool that is automatically invoked by Gemini 2 and 3 models to retrieve search results
* from Google Search.
*
* <p>This tool operates internally within the model and does not require or perform local code
* execution.
Expand Down Expand Up @@ -76,7 +76,7 @@ public Completable processLlmRequest(
updatedToolsBuilder.add(
Tool.builder().googleSearchRetrieval(GoogleSearchRetrieval.builder().build()).build());
configBuilder.tools(updatedToolsBuilder.build());
} else if (model != null && model.startsWith("gemini-2")) {
} else if (model != null && (model.startsWith("gemini-2") || model.startsWith("gemini-3"))) {

updatedToolsBuilder.add(Tool.builder().googleSearch(GoogleSearch.builder().build()).build());
configBuilder.tools(updatedToolsBuilder.build());
Expand Down