Skip to content

Conversation

@mini2s
Copy link
Collaborator

@mini2s mini2s commented Nov 29, 2025

Related GitHub Issue

Closes: #

Description

f9eb6d9

Test Procedure

Type of Change

  • 🐛 Bug Fix: Non-breaking change that fixes an issue.
  • New Feature: Non-breaking change that adds functionality.
  • 💥 Breaking Change: Fix or feature that would cause existing functionality to not work as expected.
  • ♻️ Refactor: Code change that neither fixes a bug nor adds a feature.
  • 💅 Style: Changes that do not affect the meaning of the code (white-space, formatting, etc.).
  • 📚 Documentation: Updates to documentation files.
  • ⚙️ Build/CI: Changes to the build process or CI configuration.
  • 🧹 Chore: Other changes that don't modify src or test files.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Code Quality:
    • My code adheres to the project's style guidelines.
    • There are no new linting errors or warnings (npm run lint).
    • All debug code (e.g., console.log) has been removed.
  • Testing:
    • New and/or updated tests have been added to cover my changes.
    • All tests pass locally (npm test).
    • The application builds successfully with my changes.
  • Branch Hygiene: My branch is up-to-date (rebased) with the main branch.
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Changeset: A changeset has been created using npm run changeset if this PR includes user-facing changes or dependency updates.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

Documentation Updates

Additional Notes

Get in Touch

daniel-lxs and others added 30 commits November 13, 2025 20:50
* fix: filter native tools by mode restrictions

Native tools are now filtered based on mode restrictions before being sent to the API, matching the behavior of XML tools. Previously, all native tools were sent to the API regardless of mode, causing the model to attempt using disallowed tools.

Changes:
- Created filterNativeToolsForMode() and filterMcpToolsForMode() utility functions
- Extracted filtering logic from Task.ts into dedicated module
- Applied same filtering approach used for XML tools in system prompt
- Added comprehensive test coverage (10 tests)

Impact:
- Model only sees tools allowed by current mode
- No more failed tool attempts due to mode restrictions
- Consistent behavior between XML and Native protocols
- Better UX with appropriate tool suggestions per mode

* refactor: eliminate repetitive tool checking using group-based approach

- Add getAvailableToolsInGroup() helper to check tools by group instead of individually
- Refactor filterNativeToolsForMode() to reuse getToolsForMode() instead of duplicating logic
- Simplify capabilities.ts by using group-based checks (60% reduction)
- Refactor rules.ts to use group helper (56% reduction)
- Remove debug console.log statements
- Update tests and snapshots

Benefits:
- Eliminates code duplication
- Leverages existing TOOL_GROUPS structure
- More maintainable - new tools in groups work automatically
- All tests passing (26/26)

* fix: add fallback to default mode when mode config not found

Ensures the agent always has functional tools even if:
- A custom mode is deleted while tasks still reference it
- Mode configuration becomes corrupted
- An invalid mode slug is provided

Without this fallback, the agent would have zero tools (not even
ask_followup_question or attempt_completion), completely breaking it.
fix(webview-ui): make Share button popover work by forwarding ref in LucideIconButton

- Convert LucideIconButton to forwardRef so Radix PopoverTrigger(asChild) receives a focusable element
- Enables Share popover and shareCurrentTask flow
- Verified with ShareButton/TaskActions Vitest suites
* Reasoning effort: capability-driven; add disable/none/minimal; remove GPT-5 minimal special-casing; document UI semantics; remove temporary logs

* Remove Unused supportsReasoningNone

* Roo reasoning: omit field on 'disable'; UI: do not flip enableReasoningEffort when selecting 'disable'

* Update packages/types/src/model.ts

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* Update webview-ui/src/components/settings/SimpleThinkingBudget.tsx

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

---------

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
)

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.
… drift after context-management event (condense/truncate)" (RooCodeInc#9261)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>
… read_file (RooCodeInc#9272)

When read_file encountered errors (e.g., file not found), it would call
handleError() which internally calls pushToolResult(), then continue to
call pushToolResult() again with the final XML. In native protocol mode,
this created two tool_result blocks with the same tool_call_id, causing
400 errors on subsequent API calls.

This fix replaces handleError() with task.say() for error notifications.
The agent still receives error details through the XML in the single
final pushToolResult() call.

This change works for both protocols:
- Native: Only one tool_result per tool_call_id (fixes duplicate issue)
- XML: Only one text block with complete XML (cleaner than before)

Agent visibility preserved: Errors are included in the XML response
sent to the agent via pushToolResult().

Tests: All 44 tests passing. Updated test to verify say() is called.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>
* refactor: centralize toolProtocol configuration checks

- Created src/utils/toolProtocol.ts with getToolProtocolFromSettings() utility
- Replaced all direct vscode.workspace.getConfiguration() calls with centralized utility
- Updated 6 files to use the new utility function
- All tests pass and TypeScript compilation succeeds

* refactor: use isNativeProtocol function from types package
* fix: format tool responses for native protocol

- Add toolResultFormatting utilities for protocol detection
- ReadFileTool now builds both XML and native formats
- Native format returns clean, readable text without XML tags
- Legacy conversation history conversion is protocol-aware
- All tests passing (55 total)

* refactor: use isNativeProtocol from @roo-code/types

Remove duplicate implementation and import from types package instead
…odeInc#9195)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>
mrubens and others added 29 commits November 27, 2025 00:08
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>
…9655)

The pendingNewTaskToolCallId was being set AFTER startSubtask() returned.
However, startSubtask() contains a 500ms delay during which the subtask
could complete. If the subtask completed during this window, completeSubtask()
would be called before pendingNewTaskToolCallId was set, causing it to
fall through to the XML protocol path and add a text message instead of
a proper tool_result block, breaking the API conversation structure.

This fix moves the pendingNewTaskToolCallId assignment to happen BEFORE
calling startSubtask(), ensuring the ID is set before the subtask starts.
If the subtask creation fails, the pending ID is cleared.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <[email protected]>
…ludedTools (RooCodeInc#9641)

* feat: add model-specific tool customization via excludedTools and includedTools

- Add excludedTools and includedTools to ModelInfo schema
- Implement applyModelToolCustomization helper to filter tools based on model config
- Integrate model tool filtering into filterNativeToolsForMode for native protocol
- Add comprehensive tests for tool customization functionality
- Wire up modelInfo through buildNativeToolsArray and Task.ts

This allows providers to override which native tools are available on a per-model basis via MODEL_DEFAULTS, enabling better control over tool selection for models with specific needs.

* feat: add customTools for opt-in only tools

- Add customTools array to ToolGroupConfig for defining opt-in only tools
- Update getToolsForMode() to exclude customTools from default tool set
- Modify applyModelToolCustomization() to include customTools only via includedTools
- Add tests for customTools functionality
- Add comprehensive documentation with usage examples

customTools allows defining tools that are NOT available by default,
even when a mode includes their group. These tools are only available
when explicitly included via a model's includedTools configuration.

This enables:
- Gradual rollout of experimental tools
- Model-specific specialized capabilities
- Safe experimentation without affecting default tool sets

* Add assertions for customTools tests per review feedback

* test: add tests for including customTools via includedTools

* Update src/core/prompts/tools/__tests__/filter-tools-for-mode.spec.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
…n options (RooCodeInc#9637)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
…odeInc#9671)

Add supportsNativeTools: true to DeepSeek and Doubao model definitions,
enabling native OpenAI-compatible tool calling for these providers.

Both providers already extend OpenAiHandler which has built-in support
for native tools, so this change is all that's needed to enable the feature.
- Import resolveToolProtocol and TOOL_PROTOCOL from @roo-code/types
- Add tools and tool_choice to completion params when native protocol is enabled
- Handle tool_call_partial chunks in streaming response
- Add comprehensive tests for native tool support
)

Add supportsNativeTools: true to all Gemini-based models in the Vertex
provider. The VertexHandler extends GeminiHandler which already has full
native tool handling logic implemented.

Models updated:
- gemini-3-pro-preview
- gemini-2.5-flash-preview-05-20:thinking
- gemini-2.5-flash-preview-05-20
- gemini-2.5-flash
- gemini-2.5-flash-preview-04-17:thinking
- gemini-2.5-flash-preview-04-17
- gemini-2.5-pro-preview-03-25
- gemini-2.5-pro-preview-05-06
- gemini-2.5-pro-preview-06-05
- gemini-2.5-pro
- gemini-2.5-pro-exp-03-25
- gemini-2.0-pro-exp-02-05
- gemini-2.0-flash-001
- gemini-2.0-flash-lite-001
- gemini-2.0-flash-thinking-exp-01-21
- gemini-1.5-flash-002
- gemini-1.5-pro-002
- gemini-2.5-flash-lite-preview-06-17
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
@mini2s mini2s merged commit d9068ca into main Nov 29, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.