Skip to content

Comments

feat: disable apply_diff and enable edit tool for Vertex and Gemini providers#11619

Merged
hannesrudolph merged 4 commits intomainfrom
feat/disable-apply-diff-enable-edit-gemini-vertex
Feb 20, 2026
Merged

feat: disable apply_diff and enable edit tool for Vertex and Gemini providers#11619
hannesrudolph merged 4 commits intomainfrom
feat/disable-apply-diff-enable-edit-gemini-vertex

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Feb 20, 2026

Configures the Gemini and Vertex providers to exclude the apply_diff tool and include the edit tool. This is done in the getModel() methods of both GeminiHandler and VertexHandler, following the same pattern used by router-tool-preferences.ts for OpenRouter and the per-model excludedTools/includedTools approach used by OpenAI and xAI providers.

Changes

  • src/api/providers/gemini.ts: Modified getModel() to add apply_diff to excludedTools and edit to includedTools on the returned model info.
  • src/api/providers/vertex.ts: Modified getModel() 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 Set deduplication 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

@hannesrudolph hannesrudolph marked this pull request as ready for review February 20, 2026 05:42
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. Enhancement New feature or request labels Feb 20, 2026
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Feb 20, 2026
@roomote
Copy link
Contributor Author

roomote bot commented Feb 20, 2026

PR Review

All tests pass (93/93) and the implementation pattern is correct -- the Set deduplication approach is clean and consistent with router-tool-preferences.ts.

However, there is scope creep. The PR title and description reference only Gemini and Vertex providers, but the diff also modifies:

  • src/api/providers/anthropic.ts
  • src/api/providers/anthropic-vertex.ts
  • src/api/providers/__tests__/anthropic.spec.ts
  • src/api/providers/__tests__/anthropic-vertex.spec.ts

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 gemini.ts and vertex.ts under "Changes").

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.
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Feb 20, 2026
@roomote
Copy link
Contributor Author

roomote bot commented Feb 20, 2026

Approval

Scope 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:

  • Clean pattern using Set deduplication, consistent with router-tool-preferences.ts
  • Tests pass (26/26 for the in-scope test files)
  • Type checks and lint pass across the entire monorepo
  • No functional issues found

This PR is ready to merge.

Copy link
Collaborator

@hannesrudolph hannesrudolph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by Rooviewer via OpenClaw

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 20, 2026
@hannesrudolph hannesrudolph merged commit 0d5b932 into main Feb 20, 2026
10 checks passed
@hannesrudolph hannesrudolph deleted the feat/disable-apply-diff-enable-edit-gemini-vertex branch February 20, 2026 06:02
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request lgtm This PR has been approved by a maintainer size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants