-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: simple read_file tool for single-file-only models #7222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Created simpleReadFileTool for models that only support single file reads - Uses simpler XML format: <read_file><path>file/path</path></read_file> - Added SINGLE_FILE_READ_MODELS configuration in types package - Tool routing automatically selects simple vs multi-file version based on model ID - Prompt generation adapts to show appropriate tool description This allows less capable models to use a simpler read_file format while maintaining backward compatibility for models that support concurrent multi-file reads.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! I've reviewed the changes and found some issues that need attention. The implementation looks good overall, but there are critical gaps in test coverage and some opportunities for improvement.
|
could you explain why you chose grok-code-fast not to use the regular read_line tool? as it can't read parts of file at the moment.. |
Adds a simplified read_file tool and routes it by model.
Important
Introduces
simpleReadFileToolfor single-file reads, routing logic, and configuration for specific models, with updates to prompts and tool descriptions.simpleReadFileToolinsimpleReadFileTool.tsfor single-file reads using<read_file><path>...</path></read_file>format.simpleReadFileToolorreadFileToolbased onshouldUseSingleFileRead(modelId)inpresentAssistantMessage.ts.SINGLE_FILE_READ_MODELSinsingle-file-read-models.tsto list models using single-file reads.shouldUseSingleFileRead()function insingle-file-read-models.tsfor model ID checks.generatePrompt()andSYSTEM_PROMPTinsystem.tsto includemodelIdfor tool description selection.getToolDescriptionsForMode()intools/index.tsto choose between simple and regular read file descriptions based on model ID.getSimpleReadFileToolDescription()insimple-read-file.tsfor generating tool descriptions.This description was created by
for 4cf6082. You can customize this summary. It will automatically update as commits are pushed.