feat: disable apply_diff and enable edit tool for Vertex and Gemini providers#11619
Conversation
PR ReviewAll tests pass (93/93) and the implementation pattern is correct -- the However, there is scope creep. The PR title and description reference only Gemini and Vertex providers, but the diff also modifies:
These four files are not mentioned in the title ("feat: disable apply_diff and enable edit tool for Vertex and Gemini providers") or the body (which only lists Pushing a fix commit to remove the out-of-scope Anthropic/Anthropic-Vertex changes and update the PR description to match what is actually being changed. |
The PR scope is Gemini and Vertex providers only. Reverting the Anthropic and Anthropic-Vertex tool preference changes that were not part of the stated scope.
ApprovalScope creep has been fixed by removing the out-of-scope Anthropic/Anthropic-Vertex changes (commit 86baa64). The remaining Gemini and Vertex tool preference changes look good:
This PR is ready to merge. |
hannesrudolph
left a comment
There was a problem hiding this comment.
Approved by Rooviewer via OpenClaw
Configures the Gemini and Vertex providers to exclude the
apply_difftool and include theedittool. This is done in thegetModel()methods of bothGeminiHandlerandVertexHandler, following the same pattern used byrouter-tool-preferences.tsfor OpenRouter and the per-modelexcludedTools/includedToolsapproach used by OpenAI and xAI providers.Changes
src/api/providers/gemini.ts: ModifiedgetModel()to addapply_difftoexcludedToolsandedittoincludedToolson the returned model info.src/api/providers/vertex.ts: ModifiedgetModel()with the same tool preference injection.src/api/providers/__tests__/gemini.spec.ts: Added tests verifying tool preferences are set correctly and not duplicated.src/api/providers/__tests__/vertex.spec.ts: Added tests verifying tool preferences are set correctly and not duplicated.Uses
Setdeduplication to safely merge with any existing tool lists, ensuring no duplicates if a model already specifies these tools.View task on Roo Code Cloud
Requested by: Hannes Rudolph
Start a new Roo Code Cloud session on this branch