-
Notifications
You must be signed in to change notification settings - Fork 2.7k
refactor: provider-specific native edit tool variants #10258
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
Open
hannesrudolph
wants to merge
12
commits into
main
Choose a base branch
from
refactor/edit-file-provider-variants
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,270
−667
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Re-review complete. All previously flagged items appear resolved, and no new issues found in the latest commit.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
93324b3 to
665ff96
Compare
d6531e2 to
d6072dd
Compare
a560d87 to
6a7cccd
Compare
- Rename apply_diff.ts -> edit_file_roo.ts - Rename apply_patch.ts -> edit_file_codex.ts - Rename edit_file.ts -> edit_file_gemini.ts - Rename search_replace.ts -> edit_file_grok.ts - Add edit_file_anthropic.ts - Remove search_and_replace.ts - Update related imports and tool filtering logic
- Add old_string, new_string, patch to EDIT_OPERATION_PARAMS - Support file_path parameter used by edit_file_grok/gemini variants - Add codex patch parsing to extract and validate embedded file paths
- multiApplyDiffTool.spec.ts: import from EditFileRooTool instead of ApplyDiffTool - searchAndReplaceTool.spec.ts: import from EditFileAnthropicTool, use edit_file_anthropic tool name, use edits/old_text/new_text params
6a7cccd to
7432fa3
Compare
mrubens
approved these changes
Dec 24, 2025
…Variant - Change EditFileGeminiTool to use 'edit_file_gemini' as tool name for proper analytics tracking instead of generic 'edit_file' - Fix EditFileAnthropicTool handleError to use 'edit_file_anthropic' instead of 'search and replace' - Remove duplicate recordToolUsage call from EditFileAnthropicTool (already recorded by presentAssistantMessage) - Standardize editToolVariant to 'gemini' for Minimax, xAI/Grok, and ZAI models - Add missing editToolVariant to ZAI model configs - Update tests to use correct tool variant names
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
- Remove expectation for recordToolUsage call (metrics are recorded by presentAssistantMessage) - Fix handleError assertion to use 'edit_file_anthropic' instead of 'search and replace'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Issue/PR - Triage
New issue. Needs quick review to confirm validity and assign labels.
lgtm
This PR has been approved by a maintainer
size:XXL
This PR changes 1000+ lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does
edit_filetool into provider-specific variants (e.g.edit_file_roo,edit_file_anthropic,edit_file_grok,edit_file_gemini,edit_file_codex).edit_file_*variant.Why
User impact
Models prefer using edit_file over tool names such as apply_diff, this will make it easier for the model to decide what tool to use when editing a file.