Improvements for the search_file_content (isolated for model 3).

This commit is contained in:
Alisa Novikova
2026-02-12 21:42:58 -08:00
parent f961e0d6b1
commit 4e70f3b261
2 changed files with 13 additions and 2 deletions

View File

@@ -1089,7 +1089,7 @@ exports[`coreTools snapshots for specific models > Model: gemini-3-pro-preview >
exports[`coreTools snapshots for specific models > Model: gemini-3-pro-preview > snapshot for tool: grep_search_ripgrep 1`] = `
{
"description": "Searches for a regular expression pattern within file contents.",
"description": "Searches for a regular expression pattern within file contents. This tool is FAST and optimized, powered by ripgrep. PREFERRED over standard \`run_shell_command("grep ...")\` due to better performance and automatic output limiting (max 20k matches).",
"name": "grep_search",
"parametersJsonSchema": {
"properties": {

View File

@@ -88,7 +88,18 @@ export const RIP_GREP_DEFINITION: ToolDefinition = {
get base() {
return DEFAULT_LEGACY_SET.grep_search_ripgrep;
},
overrides: (modelId) => getToolSet(modelId).grep_search_ripgrep,
overrides: (modelId: string) => {
if (
modelId.includes('gemini-3-pro-preview') ||
modelId.includes('gemini-3-flash-preview')
) {
return {
description:
'Searches for a regular expression pattern within file contents. This tool is FAST and optimized, powered by ripgrep. PREFERRED over standard `run_shell_command("grep ...")` due to better performance and automatic output limiting (max 20k matches).',
};
}
return undefined;
},
};
export const WEB_SEARCH_DEFINITION: ToolDefinition = {