Skip to content

Commit 38e3529

Browse files
authored
fix: make line_ranges optional in read_file tool schema (#9254)
The OpenAI tool schema required both 'path' and 'line_ranges' in FileEntry, but the TypeScript type definition marks lineRanges as optional. This caused the AI to fail when trying to read files without specifying line_ranges. Changes: - Updated read_file tool schema to only require 'path' parameter - line_ranges remains available but optional, matching TypeScript types - Aligns with implementation which treats lineRanges as optional throughout Fixes issue where read_file tool kept failing with missing parameters.
1 parent 01cb12f commit 38e3529

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/prompts/tools/native-tools/read_file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const read_file = {
3030
},
3131
},
3232
},
33-
required: ["path", "line_ranges"],
33+
required: ["path"],
3434
additionalProperties: false,
3535
},
3636
minItems: 1,

0 commit comments

Comments
 (0)