From 2584c713a17c1417c6e76c98e240d4c5c2b4138f Mon Sep 17 00:00:00 2001 From: Roo Code Date: Thu, 18 Sep 2025 14:10:48 +0000 Subject: [PATCH] fix: enable line range support for Grok models in read_file tool - Remove grok-code-fast-1 from shouldUseSingleFileRead function - This allows Grok models to use the full-featured read_file tool with args structure - Fixes issue where Grok models could not read specific line ranges from files Fixes #8146 --- packages/types/src/single-file-read-models.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/types/src/single-file-read-models.ts b/packages/types/src/single-file-read-models.ts index b83a781507..219c54f360 100644 --- a/packages/types/src/single-file-read-models.ts +++ b/packages/types/src/single-file-read-models.ts @@ -6,9 +6,11 @@ /** * Check if a model should use single file read format - * @param modelId The model ID to check + * @param _modelId The model ID to check (unused - all models now use full format) * @returns true if the model should use single file reads */ -export function shouldUseSingleFileRead(modelId: string): boolean { - return modelId.includes("grok-code-fast-1") +export function shouldUseSingleFileRead(_modelId: string): boolean { + // Currently no models require the simplified format + // Grok models now support the full args format with line ranges + return false }