Skip to content

Conversation

@hannesrudolph
Copy link
Collaborator

@hannesrudolph hannesrudolph commented Oct 31, 2025

Summary
This upgrades the in‑chat browsing experience with persistent sessions, clearer feedback, a dedicated browser panel, and more natural action descriptions.

Extension.Development.Host.rc10.2025-11-05.13-47-15.mp4

What's new

  • Persistent Browser Sessions
    • The browser stays open across steps so you can send follow‑ups without relaunching.
    • You’ll see a "Browser Session" header and a "Session started" note when active.
  • Dedicated Browser Session panel
    • Open a full‑size view when you need more space, while keeping the chat context in view.
  • Live, readable action feed
    • Actions are presented in plain language: Launch, Click, Type, Press, Hover, Scroll.
    • Keyboard events now appear as "Press Enter" or "Press Esc" for easier scanning.
    • Broader keyboard coverage: navigation keys and common shortcuts are supported for more natural control.
  • Inline console logs
    • Console output is surfaced inline with a clear "No new logs" state.
    • Noise-reduced by default: only new entries since the previous step are shown to cut repeat noise.
    • Filter by type (Errors, Warnings, Logs) so you can focus on what matters.
  • Clear session controls
    • A prominent Disconnect/Close control makes it easy to end a session when you’re done.
  • Interactive in-session controls
    • Follow-ups attach to the active session so you can guide the assistant mid-flow without restarting.
    • Suggested follow-ups appear inline to keep momentum.
  • More accurate interactions
    • Improved click, scroll, and hover reliability across screen sizes with a consistent preview aspect ratio.
  • Seamless follow‑ups
    • Keep chatting while the session is open; the assistant continues from the same context.
  • Fully localized
    • New labels and action text are translated across all supported languages.

What you'll notice in the UI

  • "Browser Session" appears in chat when a session is active.
  • A "Session started" status line confirms the start.
  • Follow-up suggestions appear inside the Browser Session row when active.
  • Keyboard actions are summarized clearly (e.g., "Press Tab", "Shift+Tab", "Arrow keys").
  • New action wording like "Press Enter" or "Hover (x, y)".
  • Console Logs are visible inline, with a "No new logs" indicator and a noise‑reduced view that shows only new entries since the last step.
  • Type filters (All, Errors, Warnings, Logs) above the log list to quickly narrow the feed.
  • A quick Disconnect button to end the session.

Important

This PR enhances the in-chat browsing experience with persistent sessions, a dedicated browser panel, improved action descriptions, and various UI and backend updates to support these features.

  • Behavior:
    • Introduces persistent browser sessions, allowing the browser to stay open across steps.
    • Adds a dedicated browser session panel for a full-size view while keeping chat context visible.
    • Implements a live, readable action feed with plain language descriptions for actions like Launch, Click, Type, etc.
    • Adds inline console logs with filtering options by type (Errors, Warnings, Logs).
    • Provides clear session controls with a prominent Disconnect/Close button.
    • Supports interactive in-session controls for seamless follow-ups.
    • Improves interaction accuracy with consistent preview aspect ratio.
    • Fully localizes new labels and action text.
  • UI Changes:
    • Displays "Browser Session" in chat when active, with a "Session started" status line.
    • Shows follow-up suggestions inside the Browser Session row.
    • Summarizes keyboard actions clearly (e.g., "Press Tab", "Shift+Tab").
    • Displays console logs inline with a "No new logs" indicator.
    • Adds type filters above the log list for quick narrowing.
    • Includes a quick Disconnect button to end the session.
  • Code Changes:
    • Adds browser-panel.tsx to vite.config.ts input.
    • Updates presentAssistantMessage() in presentAssistantMessage.ts to handle browser session logic.
    • Modifies getEnvironmentDetails.ts to include browser session status.
    • Adds BrowserSessionPanelManager.ts for managing the browser session panel.
    • Updates BrowserSession.ts to handle new session behaviors and interactions.
    • Adds tests for new browser session functionalities in BrowserSession.spec.ts and BrowserActionTool.coordinateScaling.spec.ts.

This description was created by Ellipsis for 2dde656. You can customize this summary. It will automatically update as commits are pushed.

Copilot AI review requested due to automatic review settings October 31, 2025 01:29
@hannesrudolph hannesrudolph requested review from cte and jr as code owners October 31, 2025 01:29
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. UI/UX UI/UX related or focused labels Oct 31, 2025
@roomote
Copy link
Contributor

roomote bot commented Oct 31, 2025

Oroocle Clock   Follow along on Roo Cloud

Review status: Reviewed latest changes at commit 20bdf53. Found one new issue around coordinate fallback in getViewportCoordinate; existing browser session TODOs remain open.

  • Race condition in browser session state callback
  • Missing size parameter in launch action
  • Coordinate fallback in getViewportCoordinate when viewport dimensions are unavailable
  • Coordinate format mismatch
  • ResizeObserver cleanup missing mounted check
  • Wrong parameter passed to getBrowserActionText
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 31, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new Browser Session panel feature that provides a dedicated UI for viewing and controlling browser automation sessions. Key improvements include:

  • New standalone browser session panel with navigation controls
  • Enhanced coordinate scaling for accurate click/hover actions on downscaled screenshots
  • New keyboard press action support
  • Improved browser session lifecycle management
  • Real-time browser session status tracking

Reviewed Changes

Copilot reviewed 54 out of 54 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
webview-ui/vite.config.ts Adds browser-panel.html as a new build entry point
webview-ui/src/i18n/locales/*/chat.json Adds translations for new browser session UI labels (session, press, hover actions)
webview-ui/src/components/chat/BrowserSessionRow.tsx Major refactor: adds full browser-like UI with navigation, toolbar, and improved screenshot display
webview-ui/src/components/chat/BrowserActionRow.tsx New component to display browser actions inline in chat with auto-panel-opening logic
webview-ui/src/components/browser-session/* New components for standalone browser session panel
src/services/browser/BrowserSession.ts Adds press() method, cursor visualization, viewport tracking, and state change callbacks
src/core/tools/browserActionTool.ts Implements coordinate scaling from screenshot to viewport dimensions
src/core/webview/BrowserSessionPanelManager.ts New manager for browser panel lifecycle and communication
src/shared/*Message.ts Adds new message types for browser panel communication

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@roomote roomote bot left a comment

Choose a reason for hiding this comment

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

Review complete. I found 3 issues that should be addressed before approval. Please see the inline comments and checklist above.

@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Nov 4, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Nov 4, 2025
@hannesrudolph hannesrudolph moved this from PR [Needs Prelim Review] to PR [Draft / In Progress] in Roo Code Roadmap Nov 5, 2025
@hannesrudolph hannesrudolph moved this from PR [Draft / In Progress] to PR [Needs Prelim Review] in Roo Code Roadmap Nov 6, 2025
@mrubens mrubens merged commit ee93530 into main Nov 21, 2025
10 checks passed
@mrubens mrubens deleted the Browser-Use-2.0 branch November 21, 2025 22:26
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Nov 21, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Prelim Review] to Done in Roo Code Roadmap Nov 21, 2025
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Nov 22, 2025
* Changeset version bump (RooCodeInc#9005)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>

* config(rooignore): remove ignored directories from exclusion list

* fix: correct OpenRouter Mistral model dimension from 3072 to 1536 (RooCodeInc#9028)

* Revert "fix: prevent UI flicker and enable resumption after task cancellation" (RooCodeInc#9032)

* chore: add changeset for v3.30.1 (RooCodeInc#9033)

* Changeset version bump (RooCodeInc#9034)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: eliminate UI flicker during task cancellation (RooCodeInc#9037)

* fix: eliminate UI flicker during task cancellation

- Modify ClineProvider.createTaskWithHistoryItem() to detect when rehydrating current task
- Implement in-place task replacement to avoid empty stack state that causes UI flicker
- Add comprehensive unit tests for flicker-free cancel behavior
- Maintain backward compatibility and proper event listener cleanup

Fixes the jarring navigation to home view when cancelling tasks

* fix: ensure proper garbage collection of old task during flicker-free rehydration

- Call abortTask(true) on old task before replacement to stop processes and mark as abandoned
- This ensures proper cleanup and prevents memory leaks during task cancellation
- Add test verification for abortTask cleanup

* feat: add file path tooltips with centralized PathTooltip component (RooCodeInc#9030)

- Add PathTooltip component that wraps StandardTooltip with proper styling
- Use maxWidth='min(300px,100vw)' via inline style to override defaults
- Apply '[text-wrap:wrap]' class to override text-balance behavior
- Add formatPathTooltip helper for consistent path content formatting
- Update CodeAccordian, ChatRow, and BatchFilePermission to use PathTooltip
- Centralizes tooltip behavior and reduces duplication

Supersedes PR RooCodeInc#8797.

* fix: keep pinned models fixed at top of scrollable list (RooCodeInc#8813)

* fix: keep pinned models fixed at top of scrollable list

- Separated pinned and unpinned configs into different containers
- Pinned configs now stay fixed at the top
- Only unpinned configs are scrollable
- Added tests to verify the fixed behavior

Fixes RooCodeInc#8812

* fix: resolve sticky header visual artifact in ApiConfigSelector

- Changed sticky header background from bg-vscode-editorWidget-background to bg-vscode-dropdown-background to match popover container
- Moved separator logic into sticky container as conditional bottom border to prevent scroll artifacts
- Updated tests to match new separator structure
- All 21 tests passing

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Set Claude Sonnet 4.5 as default for key providers (RooCodeInc#8922)

* fix(checkpoints): resolve incorrect commit location when GIT_DIR set in Dev Containers (RooCodeInc#8811)

* Update cerebras.ts (RooCodeInc#9024)

* fix: update Opus 4.1 max tokens from 8K to 32K (RooCodeInc#9046)

Aligns claude-opus-4-1-20250805 max token limit with claude-opus-4-20250514,
both models now supporting 32K output tokens (overridable to 8K when
enableReasoningEffort is false).

Fixes RooCodeInc#9045

Co-authored-by: Roo Code <roomote@roocode.com>

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* feat(api): add mode parameter to ZgsmAiHandler and add tooltips to ChatRow buttons

* chore: simplify Google Analytics to standard implementation (RooCodeInc#9044)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: add conditional test running to pre-push hook (RooCodeInc#9055)

* Fix dynamic provider model validation to prevent cross-contamination (RooCodeInc#9054)

* Fix Bedrock user agent to report full SDK details (RooCodeInc#9043)

* feat: add Qwen3 embedding models (0.6B and 4B) to OpenRouter support (RooCodeInc#9060)

Co-authored-by: Roo Code <roomote@roocode.com>

* web: Agent Landing Page A/B testing toolkit (RooCodeInc#9018)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: Global Inference for Bedrock models (RooCodeInc#8750) (RooCodeInc#8940)

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

* Release v3.30.2 (RooCodeInc#9065)

chore: add changeset for v3.30.2

* Changeset version bump (RooCodeInc#9066)

* changeset version bump

* Revise CHANGELOG for version 3.30.2

Updated changelog for version 3.30.2 with new features and fixes.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Merge branch 'main' of github.com:zgsm-ai/costrict into roo-to-main

* feat(error-handling): add HTTP 413 payload too large error handling

* fix(webview): correct default value for useZgsmCustomConfig and fix settings message order

* feat: add kimi-k2-thinking model to moonshot provider (RooCodeInc#9079)

* ux: Home screen visuals (RooCodeInc#9057)

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: Roo Code <roomote@roocode.com>

* feat: add MiniMax-M2-Stable model and enable prompt caching (RooCodeInc#9072)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>

* fix(task): auto-retry on empty assistant response (RooCodeInc#9076) (RooCodeInc#9083)

* feat(chat): Improve diff appearance in main chat view (RooCodeInc#8932)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Clarify: setting 0 disables Error & Repetition Limit (RooCodeInc#8965)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: use system role for OpenAI Compatible provider when streaming is disabled (RooCodeInc#8216)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: prevent shell injection in pre-push hook environment loading (RooCodeInc#9059)

* feat: auto-switch to imported mode with architect fallback (RooCodeInc#9003)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Seth Miller <sethmillerp@gmail.com>
Co-authored-by: heyseth <sethmillerp@gmail.com>
Co-authored-by: Roo Code <roomote@roocode.com>

* fix: prevent notification sound on attempt_completion with queued messages (RooCodeInc#8540)

Co-authored-by: Roo Code <roomote@roocode.com>

* chore(deps): update dependency @changesets/cli to v2.29.7 (RooCodeInc#8490)

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

* chore: add changeset for v3.30.3 (RooCodeInc#9092)

* Changeset version bump (RooCodeInc#9094)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: respect custom OpenRouter URL for all API operations (RooCodeInc#8951)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: Add comprehensive error logging to Roo Cloud provider (RooCodeInc#9098)

feat: add comprehensive error logging to Roo Cloud provider

- Add detailed error logging in handleOpenAIError() to capture error details before transformation
- Enhanced getRooModels() to log HTTP response details on failed requests
- Added error context logging to RooHandler streaming and model loading
- All existing tests passing (48 total)

* ux: Less Caffeine (RooCodeInc#9104)

Prevents stress on Roo's hip bones

* fix: prevent crash when streaming chunks have null choices array (RooCodeInc#9105)

* ux: Improvements to to-do lists and task headers (RooCodeInc#9096)

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

* fix: prevent context condensing on settings save when provider/model unchanged (RooCodeInc#9108)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release v3.31.0 (RooCodeInc#9111)

* Changeset version bump (RooCodeInc#9112)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: improve mobile responsiveness of hero section on /reviewer page (RooCodeInc#9138)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat(integrations): update export markdown filename to include 'costrict' prefix

* feat(core): enhance attempt_completion parsing with flexible result handling

* test(core): update test configurations and CSP settings

* feat: add Google Tag Manager to marketing website (RooCodeInc#9148)

* feat: add Google Tag Manager to marketing website using Next.js Script component

* refactor: remove Google Ads implementation in favor of Tag Manager

* fix: wrap GTM script in consent-checking client component for GDPR compliance

---------

Co-authored-by: Roo Code <roomote@roocode.com>

* IPC command for sending messages to the current task (RooCodeInc#9149)

* fix: prevent command_output ask from blocking in cloud/headless environments (RooCodeInc#9152)

* chore: add changeset for v3.31.1 (RooCodeInc#9153)

* Release: v1.85.0 (RooCodeInc#9155)

* Gate XML out when native tool protocol is ON (RooCodeInc#9107)

* Add native tool definitions (RooCodeInc#9156)

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <roomote@roocode.com>

* Move auto-approval from `ChatView` to `Task` (RooCodeInc#9157)

* feat(i18n): add internationalization for unexpected API response error message

* fix(task): use consistent error message for API response failures and ensure message queue is never undefined

* test: update vscode mock and improve test coverage

* fix: Model switch re-applies selected profile (sync task.apiConfiguration) (RooCodeInc#9179) (RooCodeInc#9181)

* Add custom Button component with variant system (RooCodeInc#9150)

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

* Changeset version bump (RooCodeInc#9154)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(core): detect API configuration changes for model switching

* fix: include mcpServers in getState() for auto-approval (RooCodeInc#9199)

* fix: replace rate-limited badges with badgen.net (RooCodeInc#9200)

* Batch settings updates from the webview to the extension host (RooCodeInc#9165)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: Apply updated API profile settings when provider/model unchanged (RooCodeInc#9208) (RooCodeInc#9210)

fix: apply updated API profile settings when provider/model unchanged (RooCodeInc#9208)

* fix: migrate Issue Fixer to REST + ProjectsV2 (RooCodeInc#9207)

* fix(issue-fixer): migrate to REST for issue/comments and add ProjectsV2; remove Projects Classic mentions

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

---------

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

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API) (RooCodeInc#9203)

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API)

Summary
We moved continuity off OpenAI servers and now maintain conversation state locally by persisting and replaying encrypted reasoning items. Requests are stateless (store=false) while retaining the performance/caching benefits of the Responses API.

Why
This aligns with how Roo manages context and simplifies our Responses API implementation while keeping all the benefits of continuity, caching, and latency improvements.

What changed
- All OpenAI models now use the Responses API; system instructions are passed via the top-level instructions field; requests include store=false and include=["reasoning.encrypted_content"].
- We persist encrypted reasoning items (type: "reasoning", encrypted_content, optional id) into API history and replay them on subsequent turns.
- Reasoning summaries default to summary: "auto" when supported; text.verbosity only when supported.
- Atomic persistence via safeWriteJson.

Removed
- previous_response_id flows, suppressPreviousResponseId/skipPrevResponseIdOnce, persistGpt5Metadata(), and GPT‑5 response ID metadata in UI messages.

Kept
- taskId and mode metadata for cross-provider features.

Result
- ZDR-friendly, stateless continuity with equal or better performance and a simpler codepath.

* fix(webview): remove unused metadata prop from ReasoningBlock render

* Responses API: retain response id for troubleshooting (not continuity)

Continuity is stateless via encrypted reasoning items that we persist and replay. We now capture the top-level response id in OpenAiNativeHandler and persist the assistant message id into api_conversation_history.json solely for debugging/correlation with provider logs; it is not used for continuity or control flow.

Also: silence request-body debug logging to avoid leaking prompts.

* remove DEPRECATED tests

* chore: remove unused Task types file to satisfy knip CI

* fix(task): properly type cleanConversationHistory and createMessage args in Task to address Dan's review

* chore: add changeset for v3.31.2 (RooCodeInc#9216)

* Changeset version bump (RooCodeInc#9217)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* rename: sliding-window -> context-management; truncateConversationIfNeeded -> manageContext (RooCodeInc#9206)

* Fix: Roo Anthropic input token normalization (avoid double-count) (RooCodeInc#9224)

* OpenAI Native: gate encrypted_content include; remove gpt-5-chat-latest verbosity flag (fixes RooCodeInc#9225) (RooCodeInc#9231)

openai-native: include reasoning.encrypted_content only when reasoningEffort is set; prevent Responses API error on non-reasoning models. types: remove supportsVerbosity from gpt-5-chat-latest to avoid invalid verbosity error. Fixes RooCodeInc#9225

* docs: remove Contributors section from README files (RooCodeInc#9198)

Co-authored-by: Roo Code <roomote@roocode.com>

* Release v3.31.3 (RooCodeInc#9232)

* Changeset version bump (RooCodeInc#9233)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add native tool call support (RooCodeInc#9159)

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

* Consistently use Package.name for better support of the nightly app (RooCodeInc#9240)

* fix: resolve 400 error with native tools on OpenRouter (RooCodeInc#9238)

* fix: change tool_choice from required to auto for native protocol (RooCodeInc#9242)

* docs: include PR numbers in release guide (RooCodeInc#9236)

* Add enum support to configuration schema (RooCodeInc#9247)

* refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate) (RooCodeInc#9237)

* refactor(task): wrap initial user message in <feedback> instead of <task> to prevent focus drift after context-management

Rationale: After a successful context-management event, framing the next user block as feedback reduces model focus drift. Mentions parsing already supports <feedback>, and tool flows (attemptCompletion, responses) are aligned. No change to loop/persistence.

* refactor(mentions): drop <task> parsing; standardize on <feedback>; update tests

* fix: Filter native tools by mode restrictions (RooCodeInc#9246)

* 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 broken share button (RooCodeInc#9253)

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

* Add GPT-5.1 models and clean up reasoning effort logic (RooCodeInc#9252)

* 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>

* fix: make line_ranges optional in read_file tool schema (RooCodeInc#9254)

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.

* fix: prevent consecutive user messages on streaming retry (RooCodeInc#9249)

* feat(openai): OpenAI Responses: model-driven prompt caching and generic reasoning options refactor (RooCodeInc#9259)

* revert out of scope changes from RooCodeInc#9252 (RooCodeInc#9258)

* Revert "refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate)" (RooCodeInc#9261)

* Release v3.32.0 (RooCodeInc#9264)

* Changeset version bump (RooCodeInc#9265)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* [FIX] Fix OpenAI Native handling of encrypted reasoning blocks to prevent error when condensing (RooCodeInc#9263)

* fix: prevent duplicate tool_result blocks in native protocol mode for 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.

* Fix duplicate tool blocks causing 'tool has already been used' error (RooCodeInc#9275)

* feat(openai-native): add abort controller for request cancellation (RooCodeInc#9276)

* Disable XML parser for native tool protocol (RooCodeInc#9277)

* Release v3.32.1 (RooCodeInc#9278)

* Changeset version bump (RooCodeInc#9280)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* refactor: centralize toolProtocol configuration checks (RooCodeInc#9279)

* 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 (RooCodeInc#9270)

* 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

* fix: prevent duplicate tool_result blocks in native tool protocol (RooCodeInc#9248)

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* Fix duplicate import (RooCodeInc#9281)

* chore(core): remove unused TelemetryEventName import

* feat: implement dynamic tool protocol resolution with proper precedence hierarchy (RooCodeInc#9286)

Co-authored-by: Roo Code <roomote@roocode.com>

* web: Roo Code Cloud Provider pricing page and changes elsewhere (RooCodeInc#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 <mrubens@users.noreply.github.com>

* feat(zgsm): add abort signal handling for streaming responses

* Move the native tool call toggle to experimental settings (RooCodeInc#9297)

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

* fix: Replace broken badgen.net badges with shields.io (RooCodeInc#9318)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: preserve tool blocks for native protocol in conversation history (RooCodeInc#9319)

* feat: add git status to environment details (RooCodeInc#9310)

* feat: Move Import/Export to Modes view toolbar (RooCodeInc#8686) Cleanup of Mode Edit view (RooCodeInc#9077)

* Add max git status files to evals settings (RooCodeInc#9322)

* Release: v1.86.0 (RooCodeInc#9323)

* fix: prevent infinite loop when attempt_completion succeeds (RooCodeInc#9325)

* feat: add tool protocol selector to advanced settings (RooCodeInc#9324)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Remove experimental setting for native tool calls (RooCodeInc#9333)

* Fix the type of the list files recursive parameter (RooCodeInc#9337)

* fix: use VSCode theme color for outline button borders (RooCodeInc#9336)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>

* feat: update cloud agent CTA to point to setup page (RooCodeInc#9338)

Co-authored-by: Roo Code <roomote@roocode.com>

* Improve Google Gemini defaults, temperature, and cost reporting (RooCodeInc#9327)

* fix: sync parser state with profile/model changes (RooCodeInc#9355)

* feat: enable native tool calling for openai-native provider (RooCodeInc#9348)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add Gemini 3 Pro Preview model (RooCodeInc#9357)

* fix: pass tool protocol parameter to lineCountTruncationError (RooCodeInc#9358)

* Remove the Roo model defaults (RooCodeInc#9340)

* chore: add changeset and announcement for v3.33.0 (RooCodeInc#9360)

* Changeset version bump (RooCodeInc#9362)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: resolve native tool protocol race condition causing 400 errors (RooCodeInc#9363)

* Retry eval tasks if API instability detected (RooCodeInc#9365)

* fix: exclude XML tool examples from MODES section when native protocol enabled (RooCodeInc#9367)

* Add native tool calling support to OpenAI-compatible (RooCodeInc#9369)

* Add native tool calling support to OpenAI-compatible

* Fix OpenAI strict mode schema validation by adding converter methods to BaseProvider

- Add convertToolsForOpenAI() and convertToolSchemaForOpenAI() methods to BaseProvider
- These methods ensure all properties are in required array and convert nullable types
- Remove line_ranges from required array in read_file tool (converter handles it)
- Update OpenAiHandler and BaseOpenAiCompatibleProvider to use helper methods
- Eliminates code duplication across multiple tool usage sites
- Fixes: OpenAI completion error: 400 Invalid schema for function 'read_file'

---------

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: ensure no XML parsing when protocol is native (RooCodeInc#9371)

* fix: ensure no XML parsing when protocol is native

* refactor: remove redundant non-null assertions

* fix: gemini maxOutputTokens and reasoning config (RooCodeInc#9375)

* fix: gemini maxOutputTokens and reasoning config

* test: tighten gemini reasoning typings

* fix: Update tools to return structured JSON for native protocol (RooCodeInc#9373)

* feat: add toolProtocol property to PostHog tool usage telemetry (RooCodeInc#9374)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: Include nativeArgs in tool repetition detection (RooCodeInc#9377)

* fix: Include nativeArgs in tool repetition detection

Fixes false positive 'stuck in a loop' error for native protocol tools
like read_file that store parameters in nativeArgs instead of params.

Previously, the ToolRepetitionDetector only compared the params object,
which was empty for native protocol tools. This caused all read_file
calls to appear identical, triggering false loop detection even when
reading different files.

Changes:
- Updated serializeToolUse() to include nativeArgs in comparison
- Added comprehensive tests for native protocol scenarios
- Maintains backward compatibility with XML protocol tools

Closes: Issue reported in Discord about read_file loop detection

* Try to use safe-stable-stringify in the tool repetition detector

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Fix Gemini thought signature validation and token counting errors (RooCodeInc#9380)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release v3.33.1 (RooCodeInc#9383)

* Changeset version bump (RooCodeInc#9384)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve user images in native tool call results (RooCodeInc#9401)

* feat: migrate PostHog client to ph.roocode.com (RooCodeInc#9402)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: enable native tool calling for gemini provider (RooCodeInc#9343)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add a RCC credit balance display (RooCodeInc#9386)

* Add a RCC credit balance display

* Replace the provider docs with the balance when logged in

* PR feedback

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* perf: reduce excessive getModel() calls & implement disk cache fallback (RooCodeInc#9410)

* Show zero price for free models (RooCodeInc#9419)

* Release v3.33.2 (RooCodeInc#9420)

* Changeset version bump (RooCodeInc#9421)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Improve read_file tool description with examples (RooCodeInc#9422)

* Improve read_file tool description with examples

- Add explicit JSON structure documentation
- Include three concrete examples (single file, with line ranges, multiple files)
- Clarify that 'path' is required and 'line_ranges' is optional
- Better explain line range format (1-based inclusive)

This addresses agent confusion by providing clear examples similar to the XML tool definition.

* Make read_file tool dynamic based on partialReadsEnabled setting

- Convert read_file from static export to createReadFileTool() factory function
- Add getNativeTools() function that accepts partialReadsEnabled parameter
- Create buildNativeToolsArray() helper to encapsulate tool building logic
- Update Task.ts to build native tools dynamically using maxReadFileLine setting
- When partialReadsEnabled is false, line_ranges parameter is excluded from schema
- Examples and descriptions adjust based on whether line ranges are supported

This matches the behavior of the XML tool definition which dynamically adjusts
its documentation based on settings, reducing confusion for agents.

* Fix Marketplace crash by removing wildcard activation event (RooCodeInc#9423)

* Revert "Fix Marketplace crash by removing wildcard activation event" (RooCodeInc#9432)

* Fix OpenAI Native parallel tool calls for native protocol (RooCodeInc#9433)

Fixes an issue where using the OpenAI Native provider together with Native Tool Calling could cause OpenAI’s Responses API to fail with errors like:

* feat: add Google Gemini 3 Pro Image Preview to image generation models (RooCodeInc#9440)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: prevent duplicate environment_details when resuming cancelled tasks (RooCodeInc#9442)

- Filter out complete environment_details blocks before appending fresh ones
- Check for both opening and closing tags to ensure we're matching complete blocks
- Prevents stale environment data from being kept during task resume
- Add tests to verify deduplication logic and edge cases

* Update glob to ^11.1.0 (RooCodeInc#9449)

* chore: update tar-fs to 3.1.1 via pnpm override (RooCodeInc#9450)

Co-authored-by: Roo Code <roomote@roocode.com>

* Store reasoning in conversation history for all providers (RooCodeInc#9451)

* Fix preserveReasoning flag to control API reasoning inclusion (RooCodeInc#9453)

* feat: store reasoning in conversation history for all providers

* refactor: address review feedback

- Move comments inside else block
- Combine reasoning checks into single if block
- Make comments more concise

* refactor: make comments more concise

* Fix preserveReasoning flag to control API reasoning inclusion

Changes:
1. Removed hardcoded <think> tag logic in streaming
   - Previously hardcoded reasoning into assistant message text
   - Now passes reasoning to addToApiConversationHistory as parameter

2. Updated buildCleanConversationHistory to respect preserveReasoning flag
   - When preserveReasoning: true → reasoning block included in API requests
   - When preserveReasoning: false/undefined → reasoning stripped from API
   - Reasoning stored in history for all cases

3. Added temporary debug logs to base-openai-compatible-provider.ts
   - Shows preserveReasoning flag value
   - Logs reasoning blocks in incoming messages
   - Logs <think> tags in converted messages sent to API

* Fix: Use api.getModel() directly instead of cachedStreamingModel

Addresses review comment: cachedStreamingModel is set during streaming but
buildCleanConversationHistory is called before streaming starts. Using the
cached value could cause stale model info when switching models between requests.

Now directly uses this.api.getModel().info.preserveReasoning to ensure we
always check the current model's flag, not a potentially stale cached value.

* Clean up comments in Task.ts

Removed outdated comment regarding model's preserveReasoning flag.

* fix: remove unnecessary reasoningBlock variable in task reasoning logic

* fix: send tool_result blocks for skipped tools in native protocol (RooCodeInc#9457)

* fix: improve markdown formatting and add reasoning support (RooCodeInc#9458)

* feat: implement Minimax as Anthropic-compatible provider (RooCodeInc#9455)

* fix: improve search and replace symbol parsing (RooCodeInc#9456)

* chore: add changeset for v3.33.3 (RooCodeInc#9459)

* Changeset version bump (RooCodeInc#9460)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(terminal): add inline shell integration with user input support

* Release: v1.87.0 (RooCodeInc#9477)

* refactor(terminal): remove inline shell integration callback and improve terminal process handling

* fix: add fallback to yield tool calls regardless of finish_reason (RooCodeInc#9476)

* Improvements to base openai compatible (RooCodeInc#9462)

Co-authored-by: Roo Code <roomote@roocode.com>

* Browser Use 2.0 (RooCodeInc#8941)

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

* fix: resolve apply_diff performance regression from PR RooCodeInc#9456 (RooCodeInc#9474)

* fix: implement model cache refresh to prevent stale disk cache (RooCodeInc#9478)

* fix: Make cancel button immediately responsive during streaming (RooCodeInc#9448)

* Test a provider-oriented welcome screen (RooCodeInc#9484)

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

* (feat): Add Baseten Provider (RooCodeInc#9461)

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

* fix: copy model-level capabilities to OpenRouter endpoint models (RooCodeInc#9483)

* Pin the Roo provider to the top of the list (RooCodeInc#9485)

* Wait to experiment until state is hydrated (RooCodeInc#9488)

* Change baseten default model to glm for now (RooCodeInc#9489)

* Revert "Wait to experiment until state is hydrated" (RooCodeInc#9491)

* Try to fix build (RooCodeInc#9490)

* Update webview-ui Vite config (RooCodeInc#9493)

* Enhance native tool descriptions with examples and clarifications (RooCodeInc#9486)

* Revert "Revert "Wait to experiment until state is hydrated"" (RooCodeInc#9494)

* chore: add changeset and announcement for v3.34.0 (RooCodeInc#9495)

* Changeset version bump (RooCodeInc#9496)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Enable the Roo Code Cloud provider in evals (RooCodeInc#9492)

* Show the prompt for image gen (RooCodeInc#9505)

* feat(chat): conditionally render UpdateTodoListToolBlock based on alwaysAllowUpdateTodoList flag

* fix(web-evals): update checkbox handler in new-run component

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: Seth Miller <sethmillerp@gmail.com>
Co-authored-by: Seb Duerr <sebastian.duerr@cerebras.net>
Co-authored-by: dleffel <daniel.leffel@gmail.com>
Co-authored-by: AJ Juaire <46756248+ajjuaire@users.noreply.github.com>
Co-authored-by: Bruno Bergher <me@brunobergher.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
Co-authored-by: Alex Ker <thealexker@gmail.com>
Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Nov 23, 2025
* fix: eliminate UI flicker during task cancellation (RooCodeInc#9037)

* fix: eliminate UI flicker during task cancellation

- Modify ClineProvider.createTaskWithHistoryItem() to detect when rehydrating current task
- Implement in-place task replacement to avoid empty stack state that causes UI flicker
- Add comprehensive unit tests for flicker-free cancel behavior
- Maintain backward compatibility and proper event listener cleanup

Fixes the jarring navigation to home view when cancelling tasks

* fix: ensure proper garbage collection of old task during flicker-free rehydration

- Call abortTask(true) on old task before replacement to stop processes and mark as abandoned
- This ensures proper cleanup and prevents memory leaks during task cancellation
- Add test verification for abortTask cleanup

* feat: add file path tooltips with centralized PathTooltip component (RooCodeInc#9030)

- Add PathTooltip component that wraps StandardTooltip with proper styling
- Use maxWidth='min(300px,100vw)' via inline style to override defaults
- Apply '[text-wrap:wrap]' class to override text-balance behavior
- Add formatPathTooltip helper for consistent path content formatting
- Update CodeAccordian, ChatRow, and BatchFilePermission to use PathTooltip
- Centralizes tooltip behavior and reduces duplication

Supersedes PR RooCodeInc#8797.

* fix: keep pinned models fixed at top of scrollable list (RooCodeInc#8813)

* fix: keep pinned models fixed at top of scrollable list

- Separated pinned and unpinned configs into different containers
- Pinned configs now stay fixed at the top
- Only unpinned configs are scrollable
- Added tests to verify the fixed behavior

Fixes RooCodeInc#8812

* fix: resolve sticky header visual artifact in ApiConfigSelector

- Changed sticky header background from bg-vscode-editorWidget-background to bg-vscode-dropdown-background to match popover container
- Moved separator logic into sticky container as conditional bottom border to prevent scroll artifacts
- Updated tests to match new separator structure
- All 21 tests passing

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Set Claude Sonnet 4.5 as default for key providers (RooCodeInc#8922)

* fix(checkpoints): resolve incorrect commit location when GIT_DIR set in Dev Containers (RooCodeInc#8811)

* Update cerebras.ts (RooCodeInc#9024)

* fix: update Opus 4.1 max tokens from 8K to 32K (RooCodeInc#9046)

Aligns claude-opus-4-1-20250805 max token limit with claude-opus-4-20250514,
both models now supporting 32K output tokens (overridable to 8K when
enableReasoningEffort is false).

Fixes RooCodeInc#9045

Co-authored-by: Roo Code <roomote@roocode.com>

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* feat(api): add mode parameter to ZgsmAiHandler and add tooltips to ChatRow buttons

* chore: simplify Google Analytics to standard implementation (RooCodeInc#9044)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: add conditional test running to pre-push hook (RooCodeInc#9055)

* Fix dynamic provider model validation to prevent cross-contamination (RooCodeInc#9054)

* Fix Bedrock user agent to report full SDK details (RooCodeInc#9043)

* feat: add Qwen3 embedding models (0.6B and 4B) to OpenRouter support (RooCodeInc#9060)

Co-authored-by: Roo Code <roomote@roocode.com>

* web: Agent Landing Page A/B testing toolkit (RooCodeInc#9018)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: Global Inference for Bedrock models (RooCodeInc#8750) (RooCodeInc#8940)

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

* Release v3.30.2 (RooCodeInc#9065)

chore: add changeset for v3.30.2

* Changeset version bump (RooCodeInc#9066)

* changeset version bump

* Revise CHANGELOG for version 3.30.2

Updated changelog for version 3.30.2 with new features and fixes.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Merge branch 'main' of github.com:zgsm-ai/costrict into roo-to-main

* feat(error-handling): add HTTP 413 payload too large error handling

* fix(webview): correct default value for useZgsmCustomConfig and fix settings message order

* feat: add kimi-k2-thinking model to moonshot provider (RooCodeInc#9079)

* ux: Home screen visuals (RooCodeInc#9057)

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: Roo Code <roomote@roocode.com>

* feat: add MiniMax-M2-Stable model and enable prompt caching (RooCodeInc#9072)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>

* fix(task): auto-retry on empty assistant response (RooCodeInc#9076) (RooCodeInc#9083)

* feat(chat): Improve diff appearance in main chat view (RooCodeInc#8932)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Clarify: setting 0 disables Error & Repetition Limit (RooCodeInc#8965)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: use system role for OpenAI Compatible provider when streaming is disabled (RooCodeInc#8216)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: prevent shell injection in pre-push hook environment loading (RooCodeInc#9059)

* feat: auto-switch to imported mode with architect fallback (RooCodeInc#9003)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Seth Miller <sethmillerp@gmail.com>
Co-authored-by: heyseth <sethmillerp@gmail.com>
Co-authored-by: Roo Code <roomote@roocode.com>

* fix: prevent notification sound on attempt_completion with queued messages (RooCodeInc#8540)

Co-authored-by: Roo Code <roomote@roocode.com>

* chore(deps): update dependency @changesets/cli to v2.29.7 (RooCodeInc#8490)

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

* chore: add changeset for v3.30.3 (RooCodeInc#9092)

* Changeset version bump (RooCodeInc#9094)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: respect custom OpenRouter URL for all API operations (RooCodeInc#8951)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: Add comprehensive error logging to Roo Cloud provider (RooCodeInc#9098)

feat: add comprehensive error logging to Roo Cloud provider

- Add detailed error logging in handleOpenAIError() to capture error details before transformation
- Enhanced getRooModels() to log HTTP response details on failed requests
- Added error context logging to RooHandler streaming and model loading
- All existing tests passing (48 total)

* ux: Less Caffeine (RooCodeInc#9104)

Prevents stress on Roo's hip bones

* fix: prevent crash when streaming chunks have null choices array (RooCodeInc#9105)

* ux: Improvements to to-do lists and task headers (RooCodeInc#9096)

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

* fix: prevent context condensing on settings save when provider/model unchanged (RooCodeInc#9108)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release v3.31.0 (RooCodeInc#9111)

* Changeset version bump (RooCodeInc#9112)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: improve mobile responsiveness of hero section on /reviewer page (RooCodeInc#9138)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat(integrations): update export markdown filename to include 'costrict' prefix

* feat(core): enhance attempt_completion parsing with flexible result handling

* test(core): update test configurations and CSP settings

* feat: add Google Tag Manager to marketing website (RooCodeInc#9148)

* feat: add Google Tag Manager to marketing website using Next.js Script component

* refactor: remove Google Ads implementation in favor of Tag Manager

* fix: wrap GTM script in consent-checking client component for GDPR compliance

---------

Co-authored-by: Roo Code <roomote@roocode.com>

* IPC command for sending messages to the current task (RooCodeInc#9149)

* fix: prevent command_output ask from blocking in cloud/headless environments (RooCodeInc#9152)

* chore: add changeset for v3.31.1 (RooCodeInc#9153)

* Release: v1.85.0 (RooCodeInc#9155)

* Gate XML out when native tool protocol is ON (RooCodeInc#9107)

* Add native tool definitions (RooCodeInc#9156)

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <roomote@roocode.com>

* Move auto-approval from `ChatView` to `Task` (RooCodeInc#9157)

* feat(i18n): add internationalization for unexpected API response error message

* fix(task): use consistent error message for API response failures and ensure message queue is never undefined

* test: update vscode mock and improve test coverage

* fix: Model switch re-applies selected profile (sync task.apiConfiguration) (RooCodeInc#9179) (RooCodeInc#9181)

* Add custom Button component with variant system (RooCodeInc#9150)

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

* Changeset version bump (RooCodeInc#9154)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(core): detect API configuration changes for model switching

* fix: include mcpServers in getState() for auto-approval (RooCodeInc#9199)

* fix: replace rate-limited badges with badgen.net (RooCodeInc#9200)

* Batch settings updates from the webview to the extension host (RooCodeInc#9165)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: Apply updated API profile settings when provider/model unchanged (RooCodeInc#9208) (RooCodeInc#9210)

fix: apply updated API profile settings when provider/model unchanged (RooCodeInc#9208)

* fix: migrate Issue Fixer to REST + ProjectsV2 (RooCodeInc#9207)

* fix(issue-fixer): migrate to REST for issue/comments and add ProjectsV2; remove Projects Classic mentions

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

---------

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

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API) (RooCodeInc#9203)

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API)

Summary
We moved continuity off OpenAI servers and now maintain conversation state locally by persisting and replaying encrypted reasoning items. Requests are stateless (store=false) while retaining the performance/caching benefits of the Responses API.

Why
This aligns with how Roo manages context and simplifies our Responses API implementation while keeping all the benefits of continuity, caching, and latency improvements.

What changed
- All OpenAI models now use the Responses API; system instructions are passed via the top-level instructions field; requests include store=false and include=["reasoning.encrypted_content"].
- We persist encrypted reasoning items (type: "reasoning", encrypted_content, optional id) into API history and replay them on subsequent turns.
- Reasoning summaries default to summary: "auto" when supported; text.verbosity only when supported.
- Atomic persistence via safeWriteJson.

Removed
- previous_response_id flows, suppressPreviousResponseId/skipPrevResponseIdOnce, persistGpt5Metadata(), and GPT‑5 response ID metadata in UI messages.

Kept
- taskId and mode metadata for cross-provider features.

Result
- ZDR-friendly, stateless continuity with equal or better performance and a simpler codepath.

* fix(webview): remove unused metadata prop from ReasoningBlock render

* Responses API: retain response id for troubleshooting (not continuity)

Continuity is stateless via encrypted reasoning items that we persist and replay. We now capture the top-level response id in OpenAiNativeHandler and persist the assistant message id into api_conversation_history.json solely for debugging/correlation with provider logs; it is not used for continuity or control flow.

Also: silence request-body debug logging to avoid leaking prompts.

* remove DEPRECATED tests

* chore: remove unused Task types file to satisfy knip CI

* fix(task): properly type cleanConversationHistory and createMessage args in Task to address Dan's review

* chore: add changeset for v3.31.2 (RooCodeInc#9216)

* Changeset version bump (RooCodeInc#9217)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* rename: sliding-window -> context-management; truncateConversationIfNeeded -> manageContext (RooCodeInc#9206)

* Fix: Roo Anthropic input token normalization (avoid double-count) (RooCodeInc#9224)

* OpenAI Native: gate encrypted_content include; remove gpt-5-chat-latest verbosity flag (fixes RooCodeInc#9225) (RooCodeInc#9231)

openai-native: include reasoning.encrypted_content only when reasoningEffort is set; prevent Responses API error on non-reasoning models. types: remove supportsVerbosity from gpt-5-chat-latest to avoid invalid verbosity error. Fixes RooCodeInc#9225

* docs: remove Contributors section from README files (RooCodeInc#9198)

Co-authored-by: Roo Code <roomote@roocode.com>

* Release v3.31.3 (RooCodeInc#9232)

* Changeset version bump (RooCodeInc#9233)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add native tool call support (RooCodeInc#9159)

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

* Consistently use Package.name for better support of the nightly app (RooCodeInc#9240)

* fix: resolve 400 error with native tools on OpenRouter (RooCodeInc#9238)

* fix: change tool_choice from required to auto for native protocol (RooCodeInc#9242)

* docs: include PR numbers in release guide (RooCodeInc#9236)

* Add enum support to configuration schema (RooCodeInc#9247)

* refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate) (RooCodeInc#9237)

* refactor(task): wrap initial user message in <feedback> instead of <task> to prevent focus drift after context-management

Rationale: After a successful context-management event, framing the next user block as feedback reduces model focus drift. Mentions parsing already supports <feedback>, and tool flows (attemptCompletion, responses) are aligned. No change to loop/persistence.

* refactor(mentions): drop <task> parsing; standardize on <feedback>; update tests

* fix: Filter native tools by mode restrictions (RooCodeInc#9246)

* 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 broken share button (RooCodeInc#9253)

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

* Add GPT-5.1 models and clean up reasoning effort logic (RooCodeInc#9252)

* 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>

* fix: make line_ranges optional in read_file tool schema (RooCodeInc#9254)

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.

* fix: prevent consecutive user messages on streaming retry (RooCodeInc#9249)

* feat(openai): OpenAI Responses: model-driven prompt caching and generic reasoning options refactor (RooCodeInc#9259)

* revert out of scope changes from RooCodeInc#9252 (RooCodeInc#9258)

* Revert "refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate)" (RooCodeInc#9261)

* Release v3.32.0 (RooCodeInc#9264)

* Changeset version bump (RooCodeInc#9265)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* [FIX] Fix OpenAI Native handling of encrypted reasoning blocks to prevent error when condensing (RooCodeInc#9263)

* fix: prevent duplicate tool_result blocks in native protocol mode for 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.

* Fix duplicate tool blocks causing 'tool has already been used' error (RooCodeInc#9275)

* feat(openai-native): add abort controller for request cancellation (RooCodeInc#9276)

* Disable XML parser for native tool protocol (RooCodeInc#9277)

* Release v3.32.1 (RooCodeInc#9278)

* Changeset version bump (RooCodeInc#9280)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* refactor: centralize toolProtocol configuration checks (RooCodeInc#9279)

* 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 (RooCodeInc#9270)

* 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

* fix: prevent duplicate tool_result blocks in native tool protocol (RooCodeInc#9248)

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* Fix duplicate import (RooCodeInc#9281)

* chore(core): remove unused TelemetryEventName import

* feat: implement dynamic tool protocol resolution with proper precedence hierarchy (RooCodeInc#9286)

Co-authored-by: Roo Code <roomote@roocode.com>

* web: Roo Code Cloud Provider pricing page and changes elsewhere (RooCodeInc#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 <mrubens@users.noreply.github.com>

* feat(zgsm): add abort signal handling for streaming responses

* Move the native tool call toggle to experimental settings (RooCodeInc#9297)

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

* fix: Replace broken badgen.net badges with shields.io (RooCodeInc#9318)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: preserve tool blocks for native protocol in conversation history (RooCodeInc#9319)

* feat: add git status to environment details (RooCodeInc#9310)

* feat: Move Import/Export to Modes view toolbar (RooCodeInc#8686) Cleanup of Mode Edit view (RooCodeInc#9077)

* Add max git status files to evals settings (RooCodeInc#9322)

* Release: v1.86.0 (RooCodeInc#9323)

* fix: prevent infinite loop when attempt_completion succeeds (RooCodeInc#9325)

* feat: add tool protocol selector to advanced settings (RooCodeInc#9324)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Remove experimental setting for native tool calls (RooCodeInc#9333)

* Fix the type of the list files recursive parameter (RooCodeInc#9337)

* fix: use VSCode theme color for outline button borders (RooCodeInc#9336)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>

* feat: update cloud agent CTA to point to setup page (RooCodeInc#9338)

Co-authored-by: Roo Code <roomote@roocode.com>

* Improve Google Gemini defaults, temperature, and cost reporting (RooCodeInc#9327)

* fix: sync parser state with profile/model changes (RooCodeInc#9355)

* feat: enable native tool calling for openai-native provider (RooCodeInc#9348)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add Gemini 3 Pro Preview model (RooCodeInc#9357)

* fix: pass tool protocol parameter to lineCountTruncationError (RooCodeInc#9358)

* Remove the Roo model defaults (RooCodeInc#9340)

* chore: add changeset and announcement for v3.33.0 (RooCodeInc#9360)

* Changeset version bump (RooCodeInc#9362)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: resolve native tool protocol race condition causing 400 errors (RooCodeInc#9363)

* Retry eval tasks if API instability detected (RooCodeInc#9365)

* fix: exclude XML tool examples from MODES section when native protocol enabled (RooCodeInc#9367)

* Add native tool calling support to OpenAI-compatible (RooCodeInc#9369)

* Add native tool calling support to OpenAI-compatible

* Fix OpenAI strict mode schema validation by adding converter methods to BaseProvider

- Add convertToolsForOpenAI() and convertToolSchemaForOpenAI() methods to BaseProvider
- These methods ensure all properties are in required array and convert nullable types
- Remove line_ranges from required array in read_file tool (converter handles it)
- Update OpenAiHandler and BaseOpenAiCompatibleProvider to use helper methods
- Eliminates code duplication across multiple tool usage sites
- Fixes: OpenAI completion error: 400 Invalid schema for function 'read_file'

---------

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: ensure no XML parsing when protocol is native (RooCodeInc#9371)

* fix: ensure no XML parsing when protocol is native

* refactor: remove redundant non-null assertions

* fix: gemini maxOutputTokens and reasoning config (RooCodeInc#9375)

* fix: gemini maxOutputTokens and reasoning config

* test: tighten gemini reasoning typings

* fix: Update tools to return structured JSON for native protocol (RooCodeInc#9373)

* feat: add toolProtocol property to PostHog tool usage telemetry (RooCodeInc#9374)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: Include nativeArgs in tool repetition detection (RooCodeInc#9377)

* fix: Include nativeArgs in tool repetition detection

Fixes false positive 'stuck in a loop' error for native protocol tools
like read_file that store parameters in nativeArgs instead of params.

Previously, the ToolRepetitionDetector only compared the params object,
which was empty for native protocol tools. This caused all read_file
calls to appear identical, triggering false loop detection even when
reading different files.

Changes:
- Updated serializeToolUse() to include nativeArgs in comparison
- Added comprehensive tests for native protocol scenarios
- Maintains backward compatibility with XML protocol tools

Closes: Issue reported in Discord about read_file loop detection

* Try to use safe-stable-stringify in the tool repetition detector

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Fix Gemini thought signature validation and token counting errors (RooCodeInc#9380)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release v3.33.1 (RooCodeInc#9383)

* Changeset version bump (RooCodeInc#9384)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve user images in native tool call results (RooCodeInc#9401)

* feat: migrate PostHog client to ph.roocode.com (RooCodeInc#9402)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: enable native tool calling for gemini provider (RooCodeInc#9343)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add a RCC credit balance display (RooCodeInc#9386)

* Add a RCC credit balance display

* Replace the provider docs with the balance when logged in

* PR feedback

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* perf: reduce excessive getModel() calls & implement disk cache fallback (RooCodeInc#9410)

* Show zero price for free models (RooCodeInc#9419)

* Release v3.33.2 (RooCodeInc#9420)

* Changeset version bump (RooCodeInc#9421)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Improve read_file tool description with examples (RooCodeInc#9422)

* Improve read_file tool description with examples

- Add explicit JSON structure documentation
- Include three concrete examples (single file, with line ranges, multiple files)
- Clarify that 'path' is required and 'line_ranges' is optional
- Better explain line range format (1-based inclusive)

This addresses agent confusion by providing clear examples similar to the XML tool definition.

* Make read_file tool dynamic based on partialReadsEnabled setting

- Convert read_file from static export to createReadFileTool() factory function
- Add getNativeTools() function that accepts partialReadsEnabled parameter
- Create buildNativeToolsArray() helper to encapsulate tool building logic
- Update Task.ts to build native tools dynamically using maxReadFileLine setting
- When partialReadsEnabled is false, line_ranges parameter is excluded from schema
- Examples and descriptions adjust based on whether line ranges are supported

This matches the behavior of the XML tool definition which dynamically adjusts
its documentation based on settings, reducing confusion for agents.

* Fix Marketplace crash by removing wildcard activation event (RooCodeInc#9423)

* Revert "Fix Marketplace crash by removing wildcard activation event" (RooCodeInc#9432)

* Fix OpenAI Native parallel tool calls for native protocol (RooCodeInc#9433)

Fixes an issue where using the OpenAI Native provider together with Native Tool Calling could cause OpenAI’s Responses API to fail with errors like:

* feat: add Google Gemini 3 Pro Image Preview to image generation models (RooCodeInc#9440)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: prevent duplicate environment_details when resuming cancelled tasks (RooCodeInc#9442)

- Filter out complete environment_details blocks before appending fresh ones
- Check for both opening and closing tags to ensure we're matching complete blocks
- Prevents stale environment data from being kept during task resume
- Add tests to verify deduplication logic and edge cases

* Update glob to ^11.1.0 (RooCodeInc#9449)

* chore: update tar-fs to 3.1.1 via pnpm override (RooCodeInc#9450)

Co-authored-by: Roo Code <roomote@roocode.com>

* Store reasoning in conversation history for all providers (RooCodeInc#9451)

* Fix preserveReasoning flag to control API reasoning inclusion (RooCodeInc#9453)

* feat: store reasoning in conversation history for all providers

* refactor: address review feedback

- Move comments inside else block
- Combine reasoning checks into single if block
- Make comments more concise

* refactor: make comments more concise

* Fix preserveReasoning flag to control API reasoning inclusion

Changes:
1. Removed hardcoded <think> tag logic in streaming
   - Previously hardcoded reasoning into assistant message text
   - Now passes reasoning to addToApiConversationHistory as parameter

2. Updated buildCleanConversationHistory to respect preserveReasoning flag
   - When preserveReasoning: true → reasoning block included in API requests
   - When preserveReasoning: false/undefined → reasoning stripped from API
   - Reasoning stored in history for all cases

3. Added temporary debug logs to base-openai-compatible-provider.ts
   - Shows preserveReasoning flag value
   - Logs reasoning blocks in incoming messages
   - Logs <think> tags in converted messages sent to API

* Fix: Use api.getModel() directly instead of cachedStreamingModel

Addresses review comment: cachedStreamingModel is set during streaming but
buildCleanConversationHistory is called before streaming starts. Using the
cached value could cause stale model info when switching models between requests.

Now directly uses this.api.getModel().info.preserveReasoning to ensure we
always check the current model's flag, not a potentially stale cached value.

* Clean up comments in Task.ts

Removed outdated comment regarding model's preserveReasoning flag.

* fix: remove unnecessary reasoningBlock variable in task reasoning logic

* fix: send tool_result blocks for skipped tools in native protocol (RooCodeInc#9457)

* fix: improve markdown formatting and add reasoning support (RooCodeInc#9458)

* feat: implement Minimax as Anthropic-compatible provider (RooCodeInc#9455)

* fix: improve search and replace symbol parsing (RooCodeInc#9456)

* chore: add changeset for v3.33.3 (RooCodeInc#9459)

* Changeset version bump (RooCodeInc#9460)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(terminal): add inline shell integration with user input support

* Release: v1.87.0 (RooCodeInc#9477)

* refactor(terminal): remove inline shell integration callback and improve terminal process handling

* fix: add fallback to yield tool calls regardless of finish_reason (RooCodeInc#9476)

* Improvements to base openai compatible (RooCodeInc#9462)

Co-authored-by: Roo Code <roomote@roocode.com>

* Browser Use 2.0 (RooCodeInc#8941)

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

* fix: resolve apply_diff performance regression from PR RooCodeInc#9456 (RooCodeInc#9474)

* fix: implement model cache refresh to prevent stale disk cache (RooCodeInc#9478)

* fix: Make cancel button immediately responsive during streaming (RooCodeInc#9448)

* Test a provider-oriented welcome screen (RooCodeInc#9484)

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

* (feat): Add Baseten Provider (RooCodeInc#9461)

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

* fix: copy model-level capabilities to OpenRouter endpoint models (RooCodeInc#9483)

* Pin the Roo provider to the top of the list (RooCodeInc#9485)

* Wait to experiment until state is hydrated (RooCodeInc#9488)

* Change baseten default model to glm for now (RooCodeInc#9489)

* Revert "Wait to experiment until state is hydrated" (RooCodeInc#9491)

* Try to fix build (RooCodeInc#9490)

* Update webview-ui Vite config (RooCodeInc#9493)

* Enhance native tool descriptions with examples and clarifications (RooCodeInc#9486)

* Revert "Revert "Wait to experiment until state is hydrated"" (RooCodeInc#9494)

* chore: add changeset and announcement for v3.34.0 (RooCodeInc#9495)

* Changeset version bump (RooCodeInc#9496)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Enable the Roo Code Cloud provider in evals (RooCodeInc#9492)

* Show the prompt for image gen (RooCodeInc#9505)

* feat(chat): conditionally render UpdateTodoListToolBlock based on alwaysAllowUpdateTodoList flag

* fix(web-evals): update checkbox handler in new-run component

* Remove double todo list (RooCodeInc#9517)

* Track cloud synced messages (RooCodeInc#9518)

* 3.34.1 (RooCodeInc#9522)

---------

Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: Seth Miller <sethmillerp@gmail.com>
Co-authored-by: Seb Duerr <sebastian.duerr@cerebras.net>
Co-authored-by: dleffel <daniel.leffel@gmail.com>
Co-authored-by: AJ Juaire <46756248+ajjuaire@users.noreply.github.com>
Co-authored-by: Bruno Bergher <me@brunobergher.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
Co-authored-by: Alex Ker <thealexker@gmail.com>
Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Nov 24, 2025
* Update cerebras.ts (RooCodeInc#9024)

* fix: update Opus 4.1 max tokens from 8K to 32K (RooCodeInc#9046)

Aligns claude-opus-4-1-20250805 max token limit with claude-opus-4-20250514,
both models now supporting 32K output tokens (overridable to 8K when
enableReasoningEffort is false).

Fixes RooCodeInc#9045

Co-authored-by: Roo Code <roomote@roocode.com>

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* feat(api): add mode parameter to ZgsmAiHandler and add tooltips to ChatRow buttons

* chore: simplify Google Analytics to standard implementation (RooCodeInc#9044)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: add conditional test running to pre-push hook (RooCodeInc#9055)

* Fix dynamic provider model validation to prevent cross-contamination (RooCodeInc#9054)

* Fix Bedrock user agent to report full SDK details (RooCodeInc#9043)

* feat: add Qwen3 embedding models (0.6B and 4B) to OpenRouter support (RooCodeInc#9060)

Co-authored-by: Roo Code <roomote@roocode.com>

* web: Agent Landing Page A/B testing toolkit (RooCodeInc#9018)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: Global Inference for Bedrock models (RooCodeInc#8750) (RooCodeInc#8940)

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

* Release v3.30.2 (RooCodeInc#9065)

chore: add changeset for v3.30.2

* Changeset version bump (RooCodeInc#9066)

* changeset version bump

* Revise CHANGELOG for version 3.30.2

Updated changelog for version 3.30.2 with new features and fixes.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Merge branch 'main' of github.com:zgsm-ai/costrict into roo-to-main

* feat(error-handling): add HTTP 413 payload too large error handling

* fix(webview): correct default value for useZgsmCustomConfig and fix settings message order

* feat: add kimi-k2-thinking model to moonshot provider (RooCodeInc#9079)

* ux: Home screen visuals (RooCodeInc#9057)

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: Roo Code <roomote@roocode.com>

* feat: add MiniMax-M2-Stable model and enable prompt caching (RooCodeInc#9072)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>

* fix(task): auto-retry on empty assistant response (RooCodeInc#9076) (RooCodeInc#9083)

* feat(chat): Improve diff appearance in main chat view (RooCodeInc#8932)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Clarify: setting 0 disables Error & Repetition Limit (RooCodeInc#8965)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: use system role for OpenAI Compatible provider when streaming is disabled (RooCodeInc#8216)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: prevent shell injection in pre-push hook environment loading (RooCodeInc#9059)

* feat: auto-switch to imported mode with architect fallback (RooCodeInc#9003)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Seth Miller <sethmillerp@gmail.com>
Co-authored-by: heyseth <sethmillerp@gmail.com>
Co-authored-by: Roo Code <roomote@roocode.com>

* fix: prevent notification sound on attempt_completion with queued messages (RooCodeInc#8540)

Co-authored-by: Roo Code <roomote@roocode.com>

* chore(deps): update dependency @changesets/cli to v2.29.7 (RooCodeInc#8490)

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

* chore: add changeset for v3.30.3 (RooCodeInc#9092)

* Changeset version bump (RooCodeInc#9094)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: respect custom OpenRouter URL for all API operations (RooCodeInc#8951)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: Add comprehensive error logging to Roo Cloud provider (RooCodeInc#9098)

feat: add comprehensive error logging to Roo Cloud provider

- Add detailed error logging in handleOpenAIError() to capture error details before transformation
- Enhanced getRooModels() to log HTTP response details on failed requests
- Added error context logging to RooHandler streaming and model loading
- All existing tests passing (48 total)

* ux: Less Caffeine (RooCodeInc#9104)

Prevents stress on Roo's hip bones

* fix: prevent crash when streaming chunks have null choices array (RooCodeInc#9105)

* ux: Improvements to to-do lists and task headers (RooCodeInc#9096)

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

* fix: prevent context condensing on settings save when provider/model unchanged (RooCodeInc#9108)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release v3.31.0 (RooCodeInc#9111)

* Changeset version bump (RooCodeInc#9112)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: improve mobile responsiveness of hero section on /reviewer page (RooCodeInc#9138)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat(integrations): update export markdown filename to include 'costrict' prefix

* feat(core): enhance attempt_completion parsing with flexible result handling

* test(core): update test configurations and CSP settings

* feat: add Google Tag Manager to marketing website (RooCodeInc#9148)

* feat: add Google Tag Manager to marketing website using Next.js Script component

* refactor: remove Google Ads implementation in favor of Tag Manager

* fix: wrap GTM script in consent-checking client component for GDPR compliance

---------

Co-authored-by: Roo Code <roomote@roocode.com>

* IPC command for sending messages to the current task (RooCodeInc#9149)

* fix: prevent command_output ask from blocking in cloud/headless environments (RooCodeInc#9152)

* chore: add changeset for v3.31.1 (RooCodeInc#9153)

* Release: v1.85.0 (RooCodeInc#9155)

* Gate XML out when native tool protocol is ON (RooCodeInc#9107)

* Add native tool definitions (RooCodeInc#9156)

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <roomote@roocode.com>

* Move auto-approval from `ChatView` to `Task` (RooCodeInc#9157)

* feat(i18n): add internationalization for unexpected API response error message

* fix(task): use consistent error message for API response failures and ensure message queue is never undefined

* test: update vscode mock and improve test coverage

* fix: Model switch re-applies selected profile (sync task.apiConfiguration) (RooCodeInc#9179) (RooCodeInc#9181)

* Add custom Button component with variant system (RooCodeInc#9150)

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

* Changeset version bump (RooCodeInc#9154)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(core): detect API configuration changes for model switching

* fix: include mcpServers in getState() for auto-approval (RooCodeInc#9199)

* fix: replace rate-limited badges with badgen.net (RooCodeInc#9200)

* Batch settings updates from the webview to the extension host (RooCodeInc#9165)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: Apply updated API profile settings when provider/model unchanged (RooCodeInc#9208) (RooCodeInc#9210)

fix: apply updated API profile settings when provider/model unchanged (RooCodeInc#9208)

* fix: migrate Issue Fixer to REST + ProjectsV2 (RooCodeInc#9207)

* fix(issue-fixer): migrate to REST for issue/comments and add ProjectsV2; remove Projects Classic mentions

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

---------

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

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API) (RooCodeInc#9203)

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API)

Summary
We moved continuity off OpenAI servers and now maintain conversation state locally by persisting and replaying encrypted reasoning items. Requests are stateless (store=false) while retaining the performance/caching benefits of the Responses API.

Why
This aligns with how Roo manages context and simplifies our Responses API implementation while keeping all the benefits of continuity, caching, and latency improvements.

What changed
- All OpenAI models now use the Responses API; system instructions are passed via the top-level instructions field; requests include store=false and include=["reasoning.encrypted_content"].
- We persist encrypted reasoning items (type: "reasoning", encrypted_content, optional id) into API history and replay them on subsequent turns.
- Reasoning summaries default to summary: "auto" when supported; text.verbosity only when supported.
- Atomic persistence via safeWriteJson.

Removed
- previous_response_id flows, suppressPreviousResponseId/skipPrevResponseIdOnce, persistGpt5Metadata(), and GPT‑5 response ID metadata in UI messages.

Kept
- taskId and mode metadata for cross-provider features.

Result
- ZDR-friendly, stateless continuity with equal or better performance and a simpler codepath.

* fix(webview): remove unused metadata prop from ReasoningBlock render

* Responses API: retain response id for troubleshooting (not continuity)

Continuity is stateless via encrypted reasoning items that we persist and replay. We now capture the top-level response id in OpenAiNativeHandler and persist the assistant message id into api_conversation_history.json solely for debugging/correlation with provider logs; it is not used for continuity or control flow.

Also: silence request-body debug logging to avoid leaking prompts.

* remove DEPRECATED tests

* chore: remove unused Task types file to satisfy knip CI

* fix(task): properly type cleanConversationHistory and createMessage args in Task to address Dan's review

* chore: add changeset for v3.31.2 (RooCodeInc#9216)

* Changeset version bump (RooCodeInc#9217)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* rename: sliding-window -> context-management; truncateConversationIfNeeded -> manageContext (RooCodeInc#9206)

* Fix: Roo Anthropic input token normalization (avoid double-count) (RooCodeInc#9224)

* OpenAI Native: gate encrypted_content include; remove gpt-5-chat-latest verbosity flag (fixes RooCodeInc#9225) (RooCodeInc#9231)

openai-native: include reasoning.encrypted_content only when reasoningEffort is set; prevent Responses API error on non-reasoning models. types: remove supportsVerbosity from gpt-5-chat-latest to avoid invalid verbosity error. Fixes RooCodeInc#9225

* docs: remove Contributors section from README files (RooCodeInc#9198)

Co-authored-by: Roo Code <roomote@roocode.com>

* Release v3.31.3 (RooCodeInc#9232)

* Changeset version bump (RooCodeInc#9233)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add native tool call support (RooCodeInc#9159)

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

* Consistently use Package.name for better support of the nightly app (RooCodeInc#9240)

* fix: resolve 400 error with native tools on OpenRouter (RooCodeInc#9238)

* fix: change tool_choice from required to auto for native protocol (RooCodeInc#9242)

* docs: include PR numbers in release guide (RooCodeInc#9236)

* Add enum support to configuration schema (RooCodeInc#9247)

* refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate) (RooCodeInc#9237)

* refactor(task): wrap initial user message in <feedback> instead of <task> to prevent focus drift after context-management

Rationale: After a successful context-management event, framing the next user block as feedback reduces model focus drift. Mentions parsing already supports <feedback>, and tool flows (attemptCompletion, responses) are aligned. No change to loop/persistence.

* refactor(mentions): drop <task> parsing; standardize on <feedback>; update tests

* fix: Filter native tools by mode restrictions (RooCodeInc#9246)

* 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 broken share button (RooCodeInc#9253)

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

* Add GPT-5.1 models and clean up reasoning effort logic (RooCodeInc#9252)

* 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>

* fix: make line_ranges optional in read_file tool schema (RooCodeInc#9254)

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.

* fix: prevent consecutive user messages on streaming retry (RooCodeInc#9249)

* feat(openai): OpenAI Responses: model-driven prompt caching and generic reasoning options refactor (RooCodeInc#9259)

* revert out of scope changes from RooCodeInc#9252 (RooCodeInc#9258)

* Revert "refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate)" (RooCodeInc#9261)

* Release v3.32.0 (RooCodeInc#9264)

* Changeset version bump (RooCodeInc#9265)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* [FIX] Fix OpenAI Native handling of encrypted reasoning blocks to prevent error when condensing (RooCodeInc#9263)

* fix: prevent duplicate tool_result blocks in native protocol mode for 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.

* Fix duplicate tool blocks causing 'tool has already been used' error (RooCodeInc#9275)

* feat(openai-native): add abort controller for request cancellation (RooCodeInc#9276)

* Disable XML parser for native tool protocol (RooCodeInc#9277)

* Release v3.32.1 (RooCodeInc#9278)

* Changeset version bump (RooCodeInc#9280)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* refactor: centralize toolProtocol configuration checks (RooCodeInc#9279)

* 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 (RooCodeInc#9270)

* 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

* fix: prevent duplicate tool_result blocks in native tool protocol (RooCodeInc#9248)

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* Fix duplicate import (RooCodeInc#9281)

* chore(core): remove unused TelemetryEventName import

* feat: implement dynamic tool protocol resolution with proper precedence hierarchy (RooCodeInc#9286)

Co-authored-by: Roo Code <roomote@roocode.com>

* web: Roo Code Cloud Provider pricing page and changes elsewhere (RooCodeInc#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 <mrubens@users.noreply.github.com>

* feat(zgsm): add abort signal handling for streaming responses

* Move the native tool call toggle to experimental settings (RooCodeInc#9297)

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

* fix: Replace broken badgen.net badges with shields.io (RooCodeInc#9318)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: preserve tool blocks for native protocol in conversation history (RooCodeInc#9319)

* feat: add git status to environment details (RooCodeInc#9310)

* feat: Move Import/Export to Modes view toolbar (RooCodeInc#8686) Cleanup of Mode Edit view (RooCodeInc#9077)

* Add max git status files to evals settings (RooCodeInc#9322)

* Release: v1.86.0 (RooCodeInc#9323)

* fix: prevent infinite loop when attempt_completion succeeds (RooCodeInc#9325)

* feat: add tool protocol selector to advanced settings (RooCodeInc#9324)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Remove experimental setting for native tool calls (RooCodeInc#9333)

* Fix the type of the list files recursive parameter (RooCodeInc#9337)

* fix: use VSCode theme color for outline button borders (RooCodeInc#9336)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>

* feat: update cloud agent CTA to point to setup page (RooCodeInc#9338)

Co-authored-by: Roo Code <roomote@roocode.com>

* Improve Google Gemini defaults, temperature, and cost reporting (RooCodeInc#9327)

* fix: sync parser state with profile/model changes (RooCodeInc#9355)

* feat: enable native tool calling for openai-native provider (RooCodeInc#9348)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add Gemini 3 Pro Preview model (RooCodeInc#9357)

* fix: pass tool protocol parameter to lineCountTruncationError (RooCodeInc#9358)

* Remove the Roo model defaults (RooCodeInc#9340)

* chore: add changeset and announcement for v3.33.0 (RooCodeInc#9360)

* Changeset version bump (RooCodeInc#9362)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: resolve native tool protocol race condition causing 400 errors (RooCodeInc#9363)

* Retry eval tasks if API instability detected (RooCodeInc#9365)

* fix: exclude XML tool examples from MODES section when native protocol enabled (RooCodeInc#9367)

* Add native tool calling support to OpenAI-compatible (RooCodeInc#9369)

* Add native tool calling support to OpenAI-compatible

* Fix OpenAI strict mode schema validation by adding converter methods to BaseProvider

- Add convertToolsForOpenAI() and convertToolSchemaForOpenAI() methods to BaseProvider
- These methods ensure all properties are in required array and convert nullable types
- Remove line_ranges from required array in read_file tool (converter handles it)
- Update OpenAiHandler and BaseOpenAiCompatibleProvider to use helper methods
- Eliminates code duplication across multiple tool usage sites
- Fixes: OpenAI completion error: 400 Invalid schema for function 'read_file'

---------

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: ensure no XML parsing when protocol is native (RooCodeInc#9371)

* fix: ensure no XML parsing when protocol is native

* refactor: remove redundant non-null assertions

* fix: gemini maxOutputTokens and reasoning config (RooCodeInc#9375)

* fix: gemini maxOutputTokens and reasoning config

* test: tighten gemini reasoning typings

* fix: Update tools to return structured JSON for native protocol (RooCodeInc#9373)

* feat: add toolProtocol property to PostHog tool usage telemetry (RooCodeInc#9374)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: Include nativeArgs in tool repetition detection (RooCodeInc#9377)

* fix: Include nativeArgs in tool repetition detection

Fixes false positive 'stuck in a loop' error for native protocol tools
like read_file that store parameters in nativeArgs instead of params.

Previously, the ToolRepetitionDetector only compared the params object,
which was empty for native protocol tools. This caused all read_file
calls to appear identical, triggering false loop detection even when
reading different files.

Changes:
- Updated serializeToolUse() to include nativeArgs in comparison
- Added comprehensive tests for native protocol scenarios
- Maintains backward compatibility with XML protocol tools

Closes: Issue reported in Discord about read_file loop detection

* Try to use safe-stable-stringify in the tool repetition detector

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Fix Gemini thought signature validation and token counting errors (RooCodeInc#9380)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release v3.33.1 (RooCodeInc#9383)

* Changeset version bump (RooCodeInc#9384)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve user images in native tool call results (RooCodeInc#9401)

* feat: migrate PostHog client to ph.roocode.com (RooCodeInc#9402)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: enable native tool calling for gemini provider (RooCodeInc#9343)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add a RCC credit balance display (RooCodeInc#9386)

* Add a RCC credit balance display

* Replace the provider docs with the balance when logged in

* PR feedback

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* perf: reduce excessive getModel() calls & implement disk cache fallback (RooCodeInc#9410)

* Show zero price for free models (RooCodeInc#9419)

* Release v3.33.2 (RooCodeInc#9420)

* Changeset version bump (RooCodeInc#9421)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Improve read_file tool description with examples (RooCodeInc#9422)

* Improve read_file tool description with examples

- Add explicit JSON structure documentation
- Include three concrete examples (single file, with line ranges, multiple files)
- Clarify that 'path' is required and 'line_ranges' is optional
- Better explain line range format (1-based inclusive)

This addresses agent confusion by providing clear examples similar to the XML tool definition.

* Make read_file tool dynamic based on partialReadsEnabled setting

- Convert read_file from static export to createReadFileTool() factory function
- Add getNativeTools() function that accepts partialReadsEnabled parameter
- Create buildNativeToolsArray() helper to encapsulate tool building logic
- Update Task.ts to build native tools dynamically using maxReadFileLine setting
- When partialReadsEnabled is false, line_ranges parameter is excluded from schema
- Examples and descriptions adjust based on whether line ranges are supported

This matches the behavior of the XML tool definition which dynamically adjusts
its documentation based on settings, reducing confusion for agents.

* Fix Marketplace crash by removing wildcard activation event (RooCodeInc#9423)

* Revert "Fix Marketplace crash by removing wildcard activation event" (RooCodeInc#9432)

* Fix OpenAI Native parallel tool calls for native protocol (RooCodeInc#9433)

Fixes an issue where using the OpenAI Native provider together with Native Tool Calling could cause OpenAI’s Responses API to fail with errors like:

* feat: add Google Gemini 3 Pro Image Preview to image generation models (RooCodeInc#9440)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: prevent duplicate environment_details when resuming cancelled tasks (RooCodeInc#9442)

- Filter out complete environment_details blocks before appending fresh ones
- Check for both opening and closing tags to ensure we're matching complete blocks
- Prevents stale environment data from being kept during task resume
- Add tests to verify deduplication logic and edge cases

* Update glob to ^11.1.0 (RooCodeInc#9449)

* chore: update tar-fs to 3.1.1 via pnpm override (RooCodeInc#9450)

Co-authored-by: Roo Code <roomote@roocode.com>

* Store reasoning in conversation history for all providers (RooCodeInc#9451)

* Fix preserveReasoning flag to control API reasoning inclusion (RooCodeInc#9453)

* feat: store reasoning in conversation history for all providers

* refactor: address review feedback

- Move comments inside else block
- Combine reasoning checks into single if block
- Make comments more concise

* refactor: make comments more concise

* Fix preserveReasoning flag to control API reasoning inclusion

Changes:
1. Removed hardcoded <think> tag logic in streaming
   - Previously hardcoded reasoning into assistant message text
   - Now passes reasoning to addToApiConversationHistory as parameter

2. Updated buildCleanConversationHistory to respect preserveReasoning flag
   - When preserveReasoning: true → reasoning block included in API requests
   - When preserveReasoning: false/undefined → reasoning stripped from API
   - Reasoning stored in history for all cases

3. Added temporary debug logs to base-openai-compatible-provider.ts
   - Shows preserveReasoning flag value
   - Logs reasoning blocks in incoming messages
   - Logs <think> tags in converted messages sent to API

* Fix: Use api.getModel() directly instead of cachedStreamingModel

Addresses review comment: cachedStreamingModel is set during streaming but
buildCleanConversationHistory is called before streaming starts. Using the
cached value could cause stale model info when switching models between requests.

Now directly uses this.api.getModel().info.preserveReasoning to ensure we
always check the current model's flag, not a potentially stale cached value.

* Clean up comments in Task.ts

Removed outdated comment regarding model's preserveReasoning flag.

* fix: remove unnecessary reasoningBlock variable in task reasoning logic

* fix: send tool_result blocks for skipped tools in native protocol (RooCodeInc#9457)

* fix: improve markdown formatting and add reasoning support (RooCodeInc#9458)

* feat: implement Minimax as Anthropic-compatible provider (RooCodeInc#9455)

* fix: improve search and replace symbol parsing (RooCodeInc#9456)

* chore: add changeset for v3.33.3 (RooCodeInc#9459)

* Changeset version bump (RooCodeInc#9460)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(terminal): add inline shell integration with user input support

* Release: v1.87.0 (RooCodeInc#9477)

* refactor(terminal): remove inline shell integration callback and improve terminal process handling

* fix: add fallback to yield tool calls regardless of finish_reason (RooCodeInc#9476)

* Improvements to base openai compatible (RooCodeInc#9462)

Co-authored-by: Roo Code <roomote@roocode.com>

* Browser Use 2.0 (RooCodeInc#8941)

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

* fix: resolve apply_diff performance regression from PR RooCodeInc#9456 (RooCodeInc#9474)

* fix: implement model cache refresh to prevent stale disk cache (RooCodeInc#9478)

* fix: Make cancel button immediately responsive during streaming (RooCodeInc#9448)

* Test a provider-oriented welcome screen (RooCodeInc#9484)

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

* (feat): Add Baseten Provider (RooCodeInc#9461)

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

* fix: copy model-level capabilities to OpenRouter endpoint models (RooCodeInc#9483)

* Pin the Roo provider to the top of the list (RooCodeInc#9485)

* Wait to experiment until state is hydrated (RooCodeInc#9488)

* Change baseten default model to glm for now (RooCodeInc#9489)

* Revert "Wait to experiment until state is hydrated" (RooCodeInc#9491)

* Try to fix build (RooCodeInc#9490)

* Update webview-ui Vite config (RooCodeInc#9493)

* Enhance native tool descriptions with examples and clarifications (RooCodeInc#9486)

* Revert "Revert "Wait to experiment until state is hydrated"" (RooCodeInc#9494)

* chore: add changeset and announcement for v3.34.0 (RooCodeInc#9495)

* Changeset version bump (RooCodeInc#9496)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Enable the Roo Code Cloud provider in evals (RooCodeInc#9492)

* Show the prompt for image gen (RooCodeInc#9505)

* feat(chat): conditionally render UpdateTodoListToolBlock based on alwaysAllowUpdateTodoList flag

* fix(web-evals): update checkbox handler in new-run component

* Remove double todo list (RooCodeInc#9517)

* Track cloud synced messages (RooCodeInc#9518)

* 3.34.1 (RooCodeInc#9522)

* Changeset version bump (RooCodeInc#9523)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: support reasoning_details format for Gemini 3 models (RooCodeInc#9506)

* feat: update Cerebras models (RooCodeInc#9527)

Co-authored-by: Roo Code <roomote@roocode.com>

---------

Co-authored-by: Seb Duerr <sebastian.duerr@cerebras.net>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: dleffel <daniel.leffel@gmail.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: AJ Juaire <46756248+ajjuaire@users.noreply.github.com>
Co-authored-by: Bruno Bergher <me@brunobergher.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: Seth Miller <sethmillerp@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
Co-authored-by: Alex Ker <thealexker@gmail.com>
Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Nov 25, 2025
* ux: Home screen visuals (RooCodeInc#9057)

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: Roo Code <roomote@roocode.com>

* feat: add MiniMax-M2-Stable model and enable prompt caching (RooCodeInc#9072)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>

* fix(task): auto-retry on empty assistant response (RooCodeInc#9076) (RooCodeInc#9083)

* feat(chat): Improve diff appearance in main chat view (RooCodeInc#8932)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Clarify: setting 0 disables Error & Repetition Limit (RooCodeInc#8965)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: use system role for OpenAI Compatible provider when streaming is disabled (RooCodeInc#8216)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: prevent shell injection in pre-push hook environment loading (RooCodeInc#9059)

* feat: auto-switch to imported mode with architect fallback (RooCodeInc#9003)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Seth Miller <sethmillerp@gmail.com>
Co-authored-by: heyseth <sethmillerp@gmail.com>
Co-authored-by: Roo Code <roomote@roocode.com>

* fix: prevent notification sound on attempt_completion with queued messages (RooCodeInc#8540)

Co-authored-by: Roo Code <roomote@roocode.com>

* chore(deps): update dependency @changesets/cli to v2.29.7 (RooCodeInc#8490)

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

* chore: add changeset for v3.30.3 (RooCodeInc#9092)

* Changeset version bump (RooCodeInc#9094)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: respect custom OpenRouter URL for all API operations (RooCodeInc#8951)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: Add comprehensive error logging to Roo Cloud provider (RooCodeInc#9098)

feat: add comprehensive error logging to Roo Cloud provider

- Add detailed error logging in handleOpenAIError() to capture error details before transformation
- Enhanced getRooModels() to log HTTP response details on failed requests
- Added error context logging to RooHandler streaming and model loading
- All existing tests passing (48 total)

* ux: Less Caffeine (RooCodeInc#9104)

Prevents stress on Roo's hip bones

* fix: prevent crash when streaming chunks have null choices array (RooCodeInc#9105)

* ux: Improvements to to-do lists and task headers (RooCodeInc#9096)

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

* fix: prevent context condensing on settings save when provider/model unchanged (RooCodeInc#9108)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release v3.31.0 (RooCodeInc#9111)

* Changeset version bump (RooCodeInc#9112)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: improve mobile responsiveness of hero section on /reviewer page (RooCodeInc#9138)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat(integrations): update export markdown filename to include 'costrict' prefix

* feat(core): enhance attempt_completion parsing with flexible result handling

* test(core): update test configurations and CSP settings

* feat: add Google Tag Manager to marketing website (RooCodeInc#9148)

* feat: add Google Tag Manager to marketing website using Next.js Script component

* refactor: remove Google Ads implementation in favor of Tag Manager

* fix: wrap GTM script in consent-checking client component for GDPR compliance

---------

Co-authored-by: Roo Code <roomote@roocode.com>

* IPC command for sending messages to the current task (RooCodeInc#9149)

* fix: prevent command_output ask from blocking in cloud/headless environments (RooCodeInc#9152)

* chore: add changeset for v3.31.1 (RooCodeInc#9153)

* Release: v1.85.0 (RooCodeInc#9155)

* Gate XML out when native tool protocol is ON (RooCodeInc#9107)

* Add native tool definitions (RooCodeInc#9156)

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <roomote@roocode.com>

* Move auto-approval from `ChatView` to `Task` (RooCodeInc#9157)

* feat(i18n): add internationalization for unexpected API response error message

* fix(task): use consistent error message for API response failures and ensure message queue is never undefined

* test: update vscode mock and improve test coverage

* fix: Model switch re-applies selected profile (sync task.apiConfiguration) (RooCodeInc#9179) (RooCodeInc#9181)

* Add custom Button component with variant system (RooCodeInc#9150)

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

* Changeset version bump (RooCodeInc#9154)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(core): detect API configuration changes for model switching

* fix: include mcpServers in getState() for auto-approval (RooCodeInc#9199)

* fix: replace rate-limited badges with badgen.net (RooCodeInc#9200)

* Batch settings updates from the webview to the extension host (RooCodeInc#9165)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: Apply updated API profile settings when provider/model unchanged (RooCodeInc#9208) (RooCodeInc#9210)

fix: apply updated API profile settings when provider/model unchanged (RooCodeInc#9208)

* fix: migrate Issue Fixer to REST + ProjectsV2 (RooCodeInc#9207)

* fix(issue-fixer): migrate to REST for issue/comments and add ProjectsV2; remove Projects Classic mentions

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

---------

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

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API) (RooCodeInc#9203)

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API)

Summary
We moved continuity off OpenAI servers and now maintain conversation state locally by persisting and replaying encrypted reasoning items. Requests are stateless (store=false) while retaining the performance/caching benefits of the Responses API.

Why
This aligns with how Roo manages context and simplifies our Responses API implementation while keeping all the benefits of continuity, caching, and latency improvements.

What changed
- All OpenAI models now use the Responses API; system instructions are passed via the top-level instructions field; requests include store=false and include=["reasoning.encrypted_content"].
- We persist encrypted reasoning items (type: "reasoning", encrypted_content, optional id) into API history and replay them on subsequent turns.
- Reasoning summaries default to summary: "auto" when supported; text.verbosity only when supported.
- Atomic persistence via safeWriteJson.

Removed
- previous_response_id flows, suppressPreviousResponseId/skipPrevResponseIdOnce, persistGpt5Metadata(), and GPT‑5 response ID metadata in UI messages.

Kept
- taskId and mode metadata for cross-provider features.

Result
- ZDR-friendly, stateless continuity with equal or better performance and a simpler codepath.

* fix(webview): remove unused metadata prop from ReasoningBlock render

* Responses API: retain response id for troubleshooting (not continuity)

Continuity is stateless via encrypted reasoning items that we persist and replay. We now capture the top-level response id in OpenAiNativeHandler and persist the assistant message id into api_conversation_history.json solely for debugging/correlation with provider logs; it is not used for continuity or control flow.

Also: silence request-body debug logging to avoid leaking prompts.

* remove DEPRECATED tests

* chore: remove unused Task types file to satisfy knip CI

* fix(task): properly type cleanConversationHistory and createMessage args in Task to address Dan's review

* chore: add changeset for v3.31.2 (RooCodeInc#9216)

* Changeset version bump (RooCodeInc#9217)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* rename: sliding-window -> context-management; truncateConversationIfNeeded -> manageContext (RooCodeInc#9206)

* Fix: Roo Anthropic input token normalization (avoid double-count) (RooCodeInc#9224)

* OpenAI Native: gate encrypted_content include; remove gpt-5-chat-latest verbosity flag (fixes RooCodeInc#9225) (RooCodeInc#9231)

openai-native: include reasoning.encrypted_content only when reasoningEffort is set; prevent Responses API error on non-reasoning models. types: remove supportsVerbosity from gpt-5-chat-latest to avoid invalid verbosity error. Fixes RooCodeInc#9225

* docs: remove Contributors section from README files (RooCodeInc#9198)

Co-authored-by: Roo Code <roomote@roocode.com>

* Release v3.31.3 (RooCodeInc#9232)

* Changeset version bump (RooCodeInc#9233)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add native tool call support (RooCodeInc#9159)

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

* Consistently use Package.name for better support of the nightly app (RooCodeInc#9240)

* fix: resolve 400 error with native tools on OpenRouter (RooCodeInc#9238)

* fix: change tool_choice from required to auto for native protocol (RooCodeInc#9242)

* docs: include PR numbers in release guide (RooCodeInc#9236)

* Add enum support to configuration schema (RooCodeInc#9247)

* refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate) (RooCodeInc#9237)

* refactor(task): wrap initial user message in <feedback> instead of <task> to prevent focus drift after context-management

Rationale: After a successful context-management event, framing the next user block as feedback reduces model focus drift. Mentions parsing already supports <feedback>, and tool flows (attemptCompletion, responses) are aligned. No change to loop/persistence.

* refactor(mentions): drop <task> parsing; standardize on <feedback>; update tests

* fix: Filter native tools by mode restrictions (RooCodeInc#9246)

* 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 broken share button (RooCodeInc#9253)

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

* Add GPT-5.1 models and clean up reasoning effort logic (RooCodeInc#9252)

* 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>

* fix: make line_ranges optional in read_file tool schema (RooCodeInc#9254)

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.

* fix: prevent consecutive user messages on streaming retry (RooCodeInc#9249)

* feat(openai): OpenAI Responses: model-driven prompt caching and generic reasoning options refactor (RooCodeInc#9259)

* revert out of scope changes from RooCodeInc#9252 (RooCodeInc#9258)

* Revert "refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate)" (RooCodeInc#9261)

* Release v3.32.0 (RooCodeInc#9264)

* Changeset version bump (RooCodeInc#9265)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* [FIX] Fix OpenAI Native handling of encrypted reasoning blocks to prevent error when condensing (RooCodeInc#9263)

* fix: prevent duplicate tool_result blocks in native protocol mode for 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.

* Fix duplicate tool blocks causing 'tool has already been used' error (RooCodeInc#9275)

* feat(openai-native): add abort controller for request cancellation (RooCodeInc#9276)

* Disable XML parser for native tool protocol (RooCodeInc#9277)

* Release v3.32.1 (RooCodeInc#9278)

* Changeset version bump (RooCodeInc#9280)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* refactor: centralize toolProtocol configuration checks (RooCodeInc#9279)

* 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 (RooCodeInc#9270)

* 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

* fix: prevent duplicate tool_result blocks in native tool protocol (RooCodeInc#9248)

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* Fix duplicate import (RooCodeInc#9281)

* chore(core): remove unused TelemetryEventName import

* feat: implement dynamic tool protocol resolution with proper precedence hierarchy (RooCodeInc#9286)

Co-authored-by: Roo Code <roomote@roocode.com>

* web: Roo Code Cloud Provider pricing page and changes elsewhere (RooCodeInc#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 <mrubens@users.noreply.github.com>

* feat(zgsm): add abort signal handling for streaming responses

* Move the native tool call toggle to experimental settings (RooCodeInc#9297)

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

* fix: Replace broken badgen.net badges with shields.io (RooCodeInc#9318)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: preserve tool blocks for native protocol in conversation history (RooCodeInc#9319)

* feat: add git status to environment details (RooCodeInc#9310)

* feat: Move Import/Export to Modes view toolbar (RooCodeInc#8686) Cleanup of Mode Edit view (RooCodeInc#9077)

* Add max git status files to evals settings (RooCodeInc#9322)

* Release: v1.86.0 (RooCodeInc#9323)

* fix: prevent infinite loop when attempt_completion succeeds (RooCodeInc#9325)

* feat: add tool protocol selector to advanced settings (RooCodeInc#9324)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Remove experimental setting for native tool calls (RooCodeInc#9333)

* Fix the type of the list files recursive parameter (RooCodeInc#9337)

* fix: use VSCode theme color for outline button borders (RooCodeInc#9336)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>

* feat: update cloud agent CTA to point to setup page (RooCodeInc#9338)

Co-authored-by: Roo Code <roomote@roocode.com>

* Improve Google Gemini defaults, temperature, and cost reporting (RooCodeInc#9327)

* fix: sync parser state with profile/model changes (RooCodeInc#9355)

* feat: enable native tool calling for openai-native provider (RooCodeInc#9348)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add Gemini 3 Pro Preview model (RooCodeInc#9357)

* fix: pass tool protocol parameter to lineCountTruncationError (RooCodeInc#9358)

* Remove the Roo model defaults (RooCodeInc#9340)

* chore: add changeset and announcement for v3.33.0 (RooCodeInc#9360)

* Changeset version bump (RooCodeInc#9362)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: resolve native tool protocol race condition causing 400 errors (RooCodeInc#9363)

* Retry eval tasks if API instability detected (RooCodeInc#9365)

* fix: exclude XML tool examples from MODES section when native protocol enabled (RooCodeInc#9367)

* Add native tool calling support to OpenAI-compatible (RooCodeInc#9369)

* Add native tool calling support to OpenAI-compatible

* Fix OpenAI strict mode schema validation by adding converter methods to BaseProvider

- Add convertToolsForOpenAI() and convertToolSchemaForOpenAI() methods to BaseProvider
- These methods ensure all properties are in required array and convert nullable types
- Remove line_ranges from required array in read_file tool (converter handles it)
- Update OpenAiHandler and BaseOpenAiCompatibleProvider to use helper methods
- Eliminates code duplication across multiple tool usage sites
- Fixes: OpenAI completion error: 400 Invalid schema for function 'read_file'

---------

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: ensure no XML parsing when protocol is native (RooCodeInc#9371)

* fix: ensure no XML parsing when protocol is native

* refactor: remove redundant non-null assertions

* fix: gemini maxOutputTokens and reasoning config (RooCodeInc#9375)

* fix: gemini maxOutputTokens and reasoning config

* test: tighten gemini reasoning typings

* fix: Update tools to return structured JSON for native protocol (RooCodeInc#9373)

* feat: add toolProtocol property to PostHog tool usage telemetry (RooCodeInc#9374)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: Include nativeArgs in tool repetition detection (RooCodeInc#9377)

* fix: Include nativeArgs in tool repetition detection

Fixes false positive 'stuck in a loop' error for native protocol tools
like read_file that store parameters in nativeArgs instead of params.

Previously, the ToolRepetitionDetector only compared the params object,
which was empty for native protocol tools. This caused all read_file
calls to appear identical, triggering false loop detection even when
reading different files.

Changes:
- Updated serializeToolUse() to include nativeArgs in comparison
- Added comprehensive tests for native protocol scenarios
- Maintains backward compatibility with XML protocol tools

Closes: Issue reported in Discord about read_file loop detection

* Try to use safe-stable-stringify in the tool repetition detector

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Fix Gemini thought signature validation and token counting errors (RooCodeInc#9380)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release v3.33.1 (RooCodeInc#9383)

* Changeset version bump (RooCodeInc#9384)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve user images in native tool call results (RooCodeInc#9401)

* feat: migrate PostHog client to ph.roocode.com (RooCodeInc#9402)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: enable native tool calling for gemini provider (RooCodeInc#9343)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add a RCC credit balance display (RooCodeInc#9386)

* Add a RCC credit balance display

* Replace the provider docs with the balance when logged in

* PR feedback

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* perf: reduce excessive getModel() calls & implement disk cache fallback (RooCodeInc#9410)

* Show zero price for free models (RooCodeInc#9419)

* Release v3.33.2 (RooCodeInc#9420)

* Changeset version bump (RooCodeInc#9421)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Improve read_file tool description with examples (RooCodeInc#9422)

* Improve read_file tool description with examples

- Add explicit JSON structure documentation
- Include three concrete examples (single file, with line ranges, multiple files)
- Clarify that 'path' is required and 'line_ranges' is optional
- Better explain line range format (1-based inclusive)

This addresses agent confusion by providing clear examples similar to the XML tool definition.

* Make read_file tool dynamic based on partialReadsEnabled setting

- Convert read_file from static export to createReadFileTool() factory function
- Add getNativeTools() function that accepts partialReadsEnabled parameter
- Create buildNativeToolsArray() helper to encapsulate tool building logic
- Update Task.ts to build native tools dynamically using maxReadFileLine setting
- When partialReadsEnabled is false, line_ranges parameter is excluded from schema
- Examples and descriptions adjust based on whether line ranges are supported

This matches the behavior of the XML tool definition which dynamically adjusts
its documentation based on settings, reducing confusion for agents.

* Fix Marketplace crash by removing wildcard activation event (RooCodeInc#9423)

* Revert "Fix Marketplace crash by removing wildcard activation event" (RooCodeInc#9432)

* Fix OpenAI Native parallel tool calls for native protocol (RooCodeInc#9433)

Fixes an issue where using the OpenAI Native provider together with Native Tool Calling could cause OpenAI’s Responses API to fail with errors like:

* feat: add Google Gemini 3 Pro Image Preview to image generation models (RooCodeInc#9440)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: prevent duplicate environment_details when resuming cancelled tasks (RooCodeInc#9442)

- Filter out complete environment_details blocks before appending fresh ones
- Check for both opening and closing tags to ensure we're matching complete blocks
- Prevents stale environment data from being kept during task resume
- Add tests to verify deduplication logic and edge cases

* Update glob to ^11.1.0 (RooCodeInc#9449)

* chore: update tar-fs to 3.1.1 via pnpm override (RooCodeInc#9450)

Co-authored-by: Roo Code <roomote@roocode.com>

* Store reasoning in conversation history for all providers (RooCodeInc#9451)

* Fix preserveReasoning flag to control API reasoning inclusion (RooCodeInc#9453)

* feat: store reasoning in conversation history for all providers

* refactor: address review feedback

- Move comments inside else block
- Combine reasoning checks into single if block
- Make comments more concise

* refactor: make comments more concise

* Fix preserveReasoning flag to control API reasoning inclusion

Changes:
1. Removed hardcoded <think> tag logic in streaming
   - Previously hardcoded reasoning into assistant message text
   - Now passes reasoning to addToApiConversationHistory as parameter

2. Updated buildCleanConversationHistory to respect preserveReasoning flag
   - When preserveReasoning: true → reasoning block included in API requests
   - When preserveReasoning: false/undefined → reasoning stripped from API
   - Reasoning stored in history for all cases

3. Added temporary debug logs to base-openai-compatible-provider.ts
   - Shows preserveReasoning flag value
   - Logs reasoning blocks in incoming messages
   - Logs <think> tags in converted messages sent to API

* Fix: Use api.getModel() directly instead of cachedStreamingModel

Addresses review comment: cachedStreamingModel is set during streaming but
buildCleanConversationHistory is called before streaming starts. Using the
cached value could cause stale model info when switching models between requests.

Now directly uses this.api.getModel().info.preserveReasoning to ensure we
always check the current model's flag, not a potentially stale cached value.

* Clean up comments in Task.ts

Removed outdated comment regarding model's preserveReasoning flag.

* fix: remove unnecessary reasoningBlock variable in task reasoning logic

* fix: send tool_result blocks for skipped tools in native protocol (RooCodeInc#9457)

* fix: improve markdown formatting and add reasoning support (RooCodeInc#9458)

* feat: implement Minimax as Anthropic-compatible provider (RooCodeInc#9455)

* fix: improve search and replace symbol parsing (RooCodeInc#9456)

* chore: add changeset for v3.33.3 (RooCodeInc#9459)

* Changeset version bump (RooCodeInc#9460)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(terminal): add inline shell integration with user input support

* Release: v1.87.0 (RooCodeInc#9477)

* refactor(terminal): remove inline shell integration callback and improve terminal process handling

* fix: add fallback to yield tool calls regardless of finish_reason (RooCodeInc#9476)

* Improvements to base openai compatible (RooCodeInc#9462)

Co-authored-by: Roo Code <roomote@roocode.com>

* Browser Use 2.0 (RooCodeInc#8941)

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

* fix: resolve apply_diff performance regression from PR RooCodeInc#9456 (RooCodeInc#9474)

* fix: implement model cache refresh to prevent stale disk cache (RooCodeInc#9478)

* fix: Make cancel button immediately responsive during streaming (RooCodeInc#9448)

* Test a provider-oriented welcome screen (RooCodeInc#9484)

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

* (feat): Add Baseten Provider (RooCodeInc#9461)

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

* fix: copy model-level capabilities to OpenRouter endpoint models (RooCodeInc#9483)

* Pin the Roo provider to the top of the list (RooCodeInc#9485)

* Wait to experiment until state is hydrated (RooCodeInc#9488)

* Change baseten default model to glm for now (RooCodeInc#9489)

* Revert "Wait to experiment until state is hydrated" (RooCodeInc#9491)

* Try to fix build (RooCodeInc#9490)

* Update webview-ui Vite config (RooCodeInc#9493)

* Enhance native tool descriptions with examples and clarifications (RooCodeInc#9486)

* Revert "Revert "Wait to experiment until state is hydrated"" (RooCodeInc#9494)

* chore: add changeset and announcement for v3.34.0 (RooCodeInc#9495)

* Changeset version bump (RooCodeInc#9496)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Enable the Roo Code Cloud provider in evals (RooCodeInc#9492)

* Show the prompt for image gen (RooCodeInc#9505)

* feat(chat): conditionally render UpdateTodoListToolBlock based on alwaysAllowUpdateTodoList flag

* fix(web-evals): update checkbox handler in new-run component

* Remove double todo list (RooCodeInc#9517)

* Track cloud synced messages (RooCodeInc#9518)

* 3.34.1 (RooCodeInc#9522)

* Changeset version bump (RooCodeInc#9523)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: support reasoning_details format for Gemini 3 models (RooCodeInc#9506)

* feat: update Cerebras models (RooCodeInc#9527)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: ensure XML parser state matches tool protocol on config update (RooCodeInc#9535)

* fix: flush LiteLLM cache when credentials change on refresh (RooCodeInc#9536)

* Add Roo Code Cloud as an imagegen provider (RooCodeInc#9528)

* fix: gracefully skip unsupported content blocks in Gemini transformer (RooCodeInc#9537)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: add claude-opus-4.5 to OpenRouter prompt caching and reasoning budget models (RooCodeInc#9540)

* feat: add claude-opus-4.5 to Anthropic and Vertex providers (RooCodeInc#9541)

* Release v3.34.2 (RooCodeInc#9545)

* Changeset version bump (RooCodeInc#9546)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add support for Roo Code Cloud as an embeddings provider (RooCodeInc#9543)

* Switch from asdf to mise-en-place in bare-metal evals setup script (RooCodeInc#9548)

* feat: implement streaming for native tool calls (RooCodeInc#9542)

* Add Opus 4.5 to Claude Code provider (RooCodeInc#9560)

* Fix ask_followup_question streaming issue and add missing tool cases (RooCodeInc#9561)

* feat(auth): enhance login status logging and use dynamic plugin version

* refactor:  remove disable provider and add client id headers

* test(webview): remove disable  provider tests across multiple test files

---------

Co-authored-by: Bruno Bergher <me@brunobergher.com>
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: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: Seth Miller <sethmillerp@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
Co-authored-by: Alex Ker <thealexker@gmail.com>
Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
Co-authored-by: Seb Duerr <sebastian.duerr@cerebras.net>
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Nov 25, 2025
* feat: auto-switch to imported mode with architect fallback (RooCodeInc#9003)

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Seth Miller <sethmillerp@gmail.com>
Co-authored-by: heyseth <sethmillerp@gmail.com>
Co-authored-by: Roo Code <roomote@roocode.com>

* fix: prevent notification sound on attempt_completion with queued messages (RooCodeInc#8540)

Co-authored-by: Roo Code <roomote@roocode.com>

* chore(deps): update dependency @changesets/cli to v2.29.7 (RooCodeInc#8490)

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

* chore: add changeset for v3.30.3 (RooCodeInc#9092)

* Changeset version bump (RooCodeInc#9094)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: respect custom OpenRouter URL for all API operations (RooCodeInc#8951)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: Add comprehensive error logging to Roo Cloud provider (RooCodeInc#9098)

feat: add comprehensive error logging to Roo Cloud provider

- Add detailed error logging in handleOpenAIError() to capture error details before transformation
- Enhanced getRooModels() to log HTTP response details on failed requests
- Added error context logging to RooHandler streaming and model loading
- All existing tests passing (48 total)

* ux: Less Caffeine (RooCodeInc#9104)

Prevents stress on Roo's hip bones

* fix: prevent crash when streaming chunks have null choices array (RooCodeInc#9105)

* ux: Improvements to to-do lists and task headers (RooCodeInc#9096)

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

* fix: prevent context condensing on settings save when provider/model unchanged (RooCodeInc#9108)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release v3.31.0 (RooCodeInc#9111)

* Changeset version bump (RooCodeInc#9112)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: improve mobile responsiveness of hero section on /reviewer page (RooCodeInc#9138)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat(integrations): update export markdown filename to include 'costrict' prefix

* feat(core): enhance attempt_completion parsing with flexible result handling

* test(core): update test configurations and CSP settings

* feat: add Google Tag Manager to marketing website (RooCodeInc#9148)

* feat: add Google Tag Manager to marketing website using Next.js Script component

* refactor: remove Google Ads implementation in favor of Tag Manager

* fix: wrap GTM script in consent-checking client component for GDPR compliance

---------

Co-authored-by: Roo Code <roomote@roocode.com>

* IPC command for sending messages to the current task (RooCodeInc#9149)

* fix: prevent command_output ask from blocking in cloud/headless environments (RooCodeInc#9152)

* chore: add changeset for v3.31.1 (RooCodeInc#9153)

* Release: v1.85.0 (RooCodeInc#9155)

* Gate XML out when native tool protocol is ON (RooCodeInc#9107)

* Add native tool definitions (RooCodeInc#9156)

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <roomote@roocode.com>

* Move auto-approval from `ChatView` to `Task` (RooCodeInc#9157)

* feat(i18n): add internationalization for unexpected API response error message

* fix(task): use consistent error message for API response failures and ensure message queue is never undefined

* test: update vscode mock and improve test coverage

* fix: Model switch re-applies selected profile (sync task.apiConfiguration) (RooCodeInc#9179) (RooCodeInc#9181)

* Add custom Button component with variant system (RooCodeInc#9150)

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

* Changeset version bump (RooCodeInc#9154)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(core): detect API configuration changes for model switching

* fix: include mcpServers in getState() for auto-approval (RooCodeInc#9199)

* fix: replace rate-limited badges with badgen.net (RooCodeInc#9200)

* Batch settings updates from the webview to the extension host (RooCodeInc#9165)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: Apply updated API profile settings when provider/model unchanged (RooCodeInc#9208) (RooCodeInc#9210)

fix: apply updated API profile settings when provider/model unchanged (RooCodeInc#9208)

* fix: migrate Issue Fixer to REST + ProjectsV2 (RooCodeInc#9207)

* fix(issue-fixer): migrate to REST for issue/comments and add ProjectsV2; remove Projects Classic mentions

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

---------

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

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API) (RooCodeInc#9203)

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API)

Summary
We moved continuity off OpenAI servers and now maintain conversation state locally by persisting and replaying encrypted reasoning items. Requests are stateless (store=false) while retaining the performance/caching benefits of the Responses API.

Why
This aligns with how Roo manages context and simplifies our Responses API implementation while keeping all the benefits of continuity, caching, and latency improvements.

What changed
- All OpenAI models now use the Responses API; system instructions are passed via the top-level instructions field; requests include store=false and include=["reasoning.encrypted_content"].
- We persist encrypted reasoning items (type: "reasoning", encrypted_content, optional id) into API history and replay them on subsequent turns.
- Reasoning summaries default to summary: "auto" when supported; text.verbosity only when supported.
- Atomic persistence via safeWriteJson.

Removed
- previous_response_id flows, suppressPreviousResponseId/skipPrevResponseIdOnce, persistGpt5Metadata(), and GPT‑5 response ID metadata in UI messages.

Kept
- taskId and mode metadata for cross-provider features.

Result
- ZDR-friendly, stateless continuity with equal or better performance and a simpler codepath.

* fix(webview): remove unused metadata prop from ReasoningBlock render

* Responses API: retain response id for troubleshooting (not continuity)

Continuity is stateless via encrypted reasoning items that we persist and replay. We now capture the top-level response id in OpenAiNativeHandler and persist the assistant message id into api_conversation_history.json solely for debugging/correlation with provider logs; it is not used for continuity or control flow.

Also: silence request-body debug logging to avoid leaking prompts.

* remove DEPRECATED tests

* chore: remove unused Task types file to satisfy knip CI

* fix(task): properly type cleanConversationHistory and createMessage args in Task to address Dan's review

* chore: add changeset for v3.31.2 (RooCodeInc#9216)

* Changeset version bump (RooCodeInc#9217)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* rename: sliding-window -> context-management; truncateConversationIfNeeded -> manageContext (RooCodeInc#9206)

* Fix: Roo Anthropic input token normalization (avoid double-count) (RooCodeInc#9224)

* OpenAI Native: gate encrypted_content include; remove gpt-5-chat-latest verbosity flag (fixes RooCodeInc#9225) (RooCodeInc#9231)

openai-native: include reasoning.encrypted_content only when reasoningEffort is set; prevent Responses API error on non-reasoning models. types: remove supportsVerbosity from gpt-5-chat-latest to avoid invalid verbosity error. Fixes RooCodeInc#9225

* docs: remove Contributors section from README files (RooCodeInc#9198)

Co-authored-by: Roo Code <roomote@roocode.com>

* Release v3.31.3 (RooCodeInc#9232)

* Changeset version bump (RooCodeInc#9233)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add native tool call support (RooCodeInc#9159)

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

* Consistently use Package.name for better support of the nightly app (RooCodeInc#9240)

* fix: resolve 400 error with native tools on OpenRouter (RooCodeInc#9238)

* fix: change tool_choice from required to auto for native protocol (RooCodeInc#9242)

* docs: include PR numbers in release guide (RooCodeInc#9236)

* Add enum support to configuration schema (RooCodeInc#9247)

* refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate) (RooCodeInc#9237)

* refactor(task): wrap initial user message in <feedback> instead of <task> to prevent focus drift after context-management

Rationale: After a successful context-management event, framing the next user block as feedback reduces model focus drift. Mentions parsing already supports <feedback>, and tool flows (attemptCompletion, responses) are aligned. No change to loop/persistence.

* refactor(mentions): drop <task> parsing; standardize on <feedback>; update tests

* fix: Filter native tools by mode restrictions (RooCodeInc#9246)

* 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 broken share button (RooCodeInc#9253)

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

* Add GPT-5.1 models and clean up reasoning effort logic (RooCodeInc#9252)

* 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>

* fix: make line_ranges optional in read_file tool schema (RooCodeInc#9254)

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.

* fix: prevent consecutive user messages on streaming retry (RooCodeInc#9249)

* feat(openai): OpenAI Responses: model-driven prompt caching and generic reasoning options refactor (RooCodeInc#9259)

* revert out of scope changes from RooCodeInc#9252 (RooCodeInc#9258)

* Revert "refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate)" (RooCodeInc#9261)

* Release v3.32.0 (RooCodeInc#9264)

* Changeset version bump (RooCodeInc#9265)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* [FIX] Fix OpenAI Native handling of encrypted reasoning blocks to prevent error when condensing (RooCodeInc#9263)

* fix: prevent duplicate tool_result blocks in native protocol mode for 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.

* Fix duplicate tool blocks causing 'tool has already been used' error (RooCodeInc#9275)

* feat(openai-native): add abort controller for request cancellation (RooCodeInc#9276)

* Disable XML parser for native tool protocol (RooCodeInc#9277)

* Release v3.32.1 (RooCodeInc#9278)

* Changeset version bump (RooCodeInc#9280)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* refactor: centralize toolProtocol configuration checks (RooCodeInc#9279)

* 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 (RooCodeInc#9270)

* 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

* fix: prevent duplicate tool_result blocks in native tool protocol (RooCodeInc#9248)

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* Fix duplicate import (RooCodeInc#9281)

* chore(core): remove unused TelemetryEventName import

* feat: implement dynamic tool protocol resolution with proper precedence hierarchy (RooCodeInc#9286)

Co-authored-by: Roo Code <roomote@roocode.com>

* web: Roo Code Cloud Provider pricing page and changes elsewhere (RooCodeInc#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 <mrubens@users.noreply.github.com>

* feat(zgsm): add abort signal handling for streaming responses

* Move the native tool call toggle to experimental settings (RooCodeInc#9297)

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

* fix: Replace broken badgen.net badges with shields.io (RooCodeInc#9318)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: preserve tool blocks for native protocol in conversation history (RooCodeInc#9319)

* feat: add git status to environment details (RooCodeInc#9310)

* feat: Move Import/Export to Modes view toolbar (RooCodeInc#8686) Cleanup of Mode Edit view (RooCodeInc#9077)

* Add max git status files to evals settings (RooCodeInc#9322)

* Release: v1.86.0 (RooCodeInc#9323)

* fix: prevent infinite loop when attempt_completion succeeds (RooCodeInc#9325)

* feat: add tool protocol selector to advanced settings (RooCodeInc#9324)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Remove experimental setting for native tool calls (RooCodeInc#9333)

* Fix the type of the list files recursive parameter (RooCodeInc#9337)

* fix: use VSCode theme color for outline button borders (RooCodeInc#9336)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>

* feat: update cloud agent CTA to point to setup page (RooCodeInc#9338)

Co-authored-by: Roo Code <roomote@roocode.com>

* Improve Google Gemini defaults, temperature, and cost reporting (RooCodeInc#9327)

* fix: sync parser state with profile/model changes (RooCodeInc#9355)

* feat: enable native tool calling for openai-native provider (RooCodeInc#9348)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add Gemini 3 Pro Preview model (RooCodeInc#9357)

* fix: pass tool protocol parameter to lineCountTruncationError (RooCodeInc#9358)

* Remove the Roo model defaults (RooCodeInc#9340)

* chore: add changeset and announcement for v3.33.0 (RooCodeInc#9360)

* Changeset version bump (RooCodeInc#9362)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: resolve native tool protocol race condition causing 400 errors (RooCodeInc#9363)

* Retry eval tasks if API instability detected (RooCodeInc#9365)

* fix: exclude XML tool examples from MODES section when native protocol enabled (RooCodeInc#9367)

* Add native tool calling support to OpenAI-compatible (RooCodeInc#9369)

* Add native tool calling support to OpenAI-compatible

* Fix OpenAI strict mode schema validation by adding converter methods to BaseProvider

- Add convertToolsForOpenAI() and convertToolSchemaForOpenAI() methods to BaseProvider
- These methods ensure all properties are in required array and convert nullable types
- Remove line_ranges from required array in read_file tool (converter handles it)
- Update OpenAiHandler and BaseOpenAiCompatibleProvider to use helper methods
- Eliminates code duplication across multiple tool usage sites
- Fixes: OpenAI completion error: 400 Invalid schema for function 'read_file'

---------

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: ensure no XML parsing when protocol is native (RooCodeInc#9371)

* fix: ensure no XML parsing when protocol is native

* refactor: remove redundant non-null assertions

* fix: gemini maxOutputTokens and reasoning config (RooCodeInc#9375)

* fix: gemini maxOutputTokens and reasoning config

* test: tighten gemini reasoning typings

* fix: Update tools to return structured JSON for native protocol (RooCodeInc#9373)

* feat: add toolProtocol property to PostHog tool usage telemetry (RooCodeInc#9374)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: Include nativeArgs in tool repetition detection (RooCodeInc#9377)

* fix: Include nativeArgs in tool repetition detection

Fixes false positive 'stuck in a loop' error for native protocol tools
like read_file that store parameters in nativeArgs instead of params.

Previously, the ToolRepetitionDetector only compared the params object,
which was empty for native protocol tools. This caused all read_file
calls to appear identical, triggering false loop detection even when
reading different files.

Changes:
- Updated serializeToolUse() to include nativeArgs in comparison
- Added comprehensive tests for native protocol scenarios
- Maintains backward compatibility with XML protocol tools

Closes: Issue reported in Discord about read_file loop detection

* Try to use safe-stable-stringify in the tool repetition detector

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Fix Gemini thought signature validation and token counting errors (RooCodeInc#9380)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release v3.33.1 (RooCodeInc#9383)

* Changeset version bump (RooCodeInc#9384)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve user images in native tool call results (RooCodeInc#9401)

* feat: migrate PostHog client to ph.roocode.com (RooCodeInc#9402)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: enable native tool calling for gemini provider (RooCodeInc#9343)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add a RCC credit balance display (RooCodeInc#9386)

* Add a RCC credit balance display

* Replace the provider docs with the balance when logged in

* PR feedback

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* perf: reduce excessive getModel() calls & implement disk cache fallback (RooCodeInc#9410)

* Show zero price for free models (RooCodeInc#9419)

* Release v3.33.2 (RooCodeInc#9420)

* Changeset version bump (RooCodeInc#9421)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Improve read_file tool description with examples (RooCodeInc#9422)

* Improve read_file tool description with examples

- Add explicit JSON structure documentation
- Include three concrete examples (single file, with line ranges, multiple files)
- Clarify that 'path' is required and 'line_ranges' is optional
- Better explain line range format (1-based inclusive)

This addresses agent confusion by providing clear examples similar to the XML tool definition.

* Make read_file tool dynamic based on partialReadsEnabled setting

- Convert read_file from static export to createReadFileTool() factory function
- Add getNativeTools() function that accepts partialReadsEnabled parameter
- Create buildNativeToolsArray() helper to encapsulate tool building logic
- Update Task.ts to build native tools dynamically using maxReadFileLine setting
- When partialReadsEnabled is false, line_ranges parameter is excluded from schema
- Examples and descriptions adjust based on whether line ranges are supported

This matches the behavior of the XML tool definition which dynamically adjusts
its documentation based on settings, reducing confusion for agents.

* Fix Marketplace crash by removing wildcard activation event (RooCodeInc#9423)

* Revert "Fix Marketplace crash by removing wildcard activation event" (RooCodeInc#9432)

* Fix OpenAI Native parallel tool calls for native protocol (RooCodeInc#9433)

Fixes an issue where using the OpenAI Native provider together with Native Tool Calling could cause OpenAI’s Responses API to fail with errors like:

* feat: add Google Gemini 3 Pro Image Preview to image generation models (RooCodeInc#9440)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: prevent duplicate environment_details when resuming cancelled tasks (RooCodeInc#9442)

- Filter out complete environment_details blocks before appending fresh ones
- Check for both opening and closing tags to ensure we're matching complete blocks
- Prevents stale environment data from being kept during task resume
- Add tests to verify deduplication logic and edge cases

* Update glob to ^11.1.0 (RooCodeInc#9449)

* chore: update tar-fs to 3.1.1 via pnpm override (RooCodeInc#9450)

Co-authored-by: Roo Code <roomote@roocode.com>

* Store reasoning in conversation history for all providers (RooCodeInc#9451)

* Fix preserveReasoning flag to control API reasoning inclusion (RooCodeInc#9453)

* feat: store reasoning in conversation history for all providers

* refactor: address review feedback

- Move comments inside else block
- Combine reasoning checks into single if block
- Make comments more concise

* refactor: make comments more concise

* Fix preserveReasoning flag to control API reasoning inclusion

Changes:
1. Removed hardcoded <think> tag logic in streaming
   - Previously hardcoded reasoning into assistant message text
   - Now passes reasoning to addToApiConversationHistory as parameter

2. Updated buildCleanConversationHistory to respect preserveReasoning flag
   - When preserveReasoning: true → reasoning block included in API requests
   - When preserveReasoning: false/undefined → reasoning stripped from API
   - Reasoning stored in history for all cases

3. Added temporary debug logs to base-openai-compatible-provider.ts
   - Shows preserveReasoning flag value
   - Logs reasoning blocks in incoming messages
   - Logs <think> tags in converted messages sent to API

* Fix: Use api.getModel() directly instead of cachedStreamingModel

Addresses review comment: cachedStreamingModel is set during streaming but
buildCleanConversationHistory is called before streaming starts. Using the
cached value could cause stale model info when switching models between requests.

Now directly uses this.api.getModel().info.preserveReasoning to ensure we
always check the current model's flag, not a potentially stale cached value.

* Clean up comments in Task.ts

Removed outdated comment regarding model's preserveReasoning flag.

* fix: remove unnecessary reasoningBlock variable in task reasoning logic

* fix: send tool_result blocks for skipped tools in native protocol (RooCodeInc#9457)

* fix: improve markdown formatting and add reasoning support (RooCodeInc#9458)

* feat: implement Minimax as Anthropic-compatible provider (RooCodeInc#9455)

* fix: improve search and replace symbol parsing (RooCodeInc#9456)

* chore: add changeset for v3.33.3 (RooCodeInc#9459)

* Changeset version bump (RooCodeInc#9460)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(terminal): add inline shell integration with user input support

* Release: v1.87.0 (RooCodeInc#9477)

* refactor(terminal): remove inline shell integration callback and improve terminal process handling

* fix: add fallback to yield tool calls regardless of finish_reason (RooCodeInc#9476)

* Improvements to base openai compatible (RooCodeInc#9462)

Co-authored-by: Roo Code <roomote@roocode.com>

* Browser Use 2.0 (RooCodeInc#8941)

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

* fix: resolve apply_diff performance regression from PR RooCodeInc#9456 (RooCodeInc#9474)

* fix: implement model cache refresh to prevent stale disk cache (RooCodeInc#9478)

* fix: Make cancel button immediately responsive during streaming (RooCodeInc#9448)

* Test a provider-oriented welcome screen (RooCodeInc#9484)

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

* (feat): Add Baseten Provider (RooCodeInc#9461)

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

* fix: copy model-level capabilities to OpenRouter endpoint models (RooCodeInc#9483)

* Pin the Roo provider to the top of the list (RooCodeInc#9485)

* Wait to experiment until state is hydrated (RooCodeInc#9488)

* Change baseten default model to glm for now (RooCodeInc#9489)

* Revert "Wait to experiment until state is hydrated" (RooCodeInc#9491)

* Try to fix build (RooCodeInc#9490)

* Update webview-ui Vite config (RooCodeInc#9493)

* Enhance native tool descriptions with examples and clarifications (RooCodeInc#9486)

* Revert "Revert "Wait to experiment until state is hydrated"" (RooCodeInc#9494)

* chore: add changeset and announcement for v3.34.0 (RooCodeInc#9495)

* Changeset version bump (RooCodeInc#9496)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Enable the Roo Code Cloud provider in evals (RooCodeInc#9492)

* Show the prompt for image gen (RooCodeInc#9505)

* feat(chat): conditionally render UpdateTodoListToolBlock based on alwaysAllowUpdateTodoList flag

* fix(web-evals): update checkbox handler in new-run component

* Remove double todo list (RooCodeInc#9517)

* Track cloud synced messages (RooCodeInc#9518)

* 3.34.1 (RooCodeInc#9522)

* Changeset version bump (RooCodeInc#9523)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: support reasoning_details format for Gemini 3 models (RooCodeInc#9506)

* feat: update Cerebras models (RooCodeInc#9527)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: ensure XML parser state matches tool protocol on config update (RooCodeInc#9535)

* fix: flush LiteLLM cache when credentials change on refresh (RooCodeInc#9536)

* Add Roo Code Cloud as an imagegen provider (RooCodeInc#9528)

* fix: gracefully skip unsupported content blocks in Gemini transformer (RooCodeInc#9537)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: add claude-opus-4.5 to OpenRouter prompt caching and reasoning budget models (RooCodeInc#9540)

* feat: add claude-opus-4.5 to Anthropic and Vertex providers (RooCodeInc#9541)

* Release v3.34.2 (RooCodeInc#9545)

* Changeset version bump (RooCodeInc#9546)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add support for Roo Code Cloud as an embeddings provider (RooCodeInc#9543)

* Switch from asdf to mise-en-place in bare-metal evals setup script (RooCodeInc#9548)

* feat: implement streaming for native tool calls (RooCodeInc#9542)

* Add Opus 4.5 to Claude Code provider (RooCodeInc#9560)

* Fix ask_followup_question streaming issue and add missing tool cases (RooCodeInc#9561)

* feat(auth): enhance login status logging and use dynamic plugin version

* refactor:  remove disable provider and add client id headers

* test(webview): remove disable  provider tests across multiple test files

* fix: enable caching for Opus 4.5 model (RooCodeInc#9568)

Added claude-opus-4-5-20251101 to the cache control switch statements
to enable prompt caching, matching the behavior of other Claude models.

Fixes RooCodeInc#9567

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: Add contact links to About Roo Code settings page (RooCodeInc#9570)

* feat: add contact links to About settings page

* Tweaks

* i18n

* Update webview-ui/src/components/settings/__tests__/About.spec.tsx

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

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* feat: add Claude Opus 4.5 model to Bedrock provider (RooCodeInc#9572)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* chore: add changeset for v3.34.3 (RooCodeInc#9578)

* Changeset version bump (RooCodeInc#9579)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

---------

Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Seth Miller <sethmillerp@gmail.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
Co-authored-by: Alex Ker <thealexker@gmail.com>
Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
Co-authored-by: Seb Duerr <sebastian.duerr@cerebras.net>
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Nov 26, 2025
* feat(core): enhance attempt_completion parsing with flexible result handling

* test(core): update test configurations and CSP settings

* feat: add Google Tag Manager to marketing website (RooCodeInc#9148)

* feat: add Google Tag Manager to marketing website using Next.js Script component

* refactor: remove Google Ads implementation in favor of Tag Manager

* fix: wrap GTM script in consent-checking client component for GDPR compliance

---------

Co-authored-by: Roo Code <roomote@roocode.com>

* IPC command for sending messages to the current task (RooCodeInc#9149)

* fix: prevent command_output ask from blocking in cloud/headless environments (RooCodeInc#9152)

* chore: add changeset for v3.31.1 (RooCodeInc#9153)

* Release: v1.85.0 (RooCodeInc#9155)

* Gate XML out when native tool protocol is ON (RooCodeInc#9107)

* Add native tool definitions (RooCodeInc#9156)

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <roomote@roocode.com>

* Move auto-approval from `ChatView` to `Task` (RooCodeInc#9157)

* feat(i18n): add internationalization for unexpected API response error message

* fix(task): use consistent error message for API response failures and ensure message queue is never undefined

* test: update vscode mock and improve test coverage

* fix: Model switch re-applies selected profile (sync task.apiConfiguration) (RooCodeInc#9179) (RooCodeInc#9181)

* Add custom Button component with variant system (RooCodeInc#9150)

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

* Changeset version bump (RooCodeInc#9154)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(core): detect API configuration changes for model switching

* fix: include mcpServers in getState() for auto-approval (RooCodeInc#9199)

* fix: replace rate-limited badges with badgen.net (RooCodeInc#9200)

* Batch settings updates from the webview to the extension host (RooCodeInc#9165)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: Apply updated API profile settings when provider/model unchanged (RooCodeInc#9208) (RooCodeInc#9210)

fix: apply updated API profile settings when provider/model unchanged (RooCodeInc#9208)

* fix: migrate Issue Fixer to REST + ProjectsV2 (RooCodeInc#9207)

* fix(issue-fixer): migrate to REST for issue/comments and add ProjectsV2; remove Projects Classic mentions

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

---------

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

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API) (RooCodeInc#9203)

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API)

Summary
We moved continuity off OpenAI servers and now maintain conversation state locally by persisting and replaying encrypted reasoning items. Requests are stateless (store=false) while retaining the performance/caching benefits of the Responses API.

Why
This aligns with how Roo manages context and simplifies our Responses API implementation while keeping all the benefits of continuity, caching, and latency improvements.

What changed
- All OpenAI models now use the Responses API; system instructions are passed via the top-level instructions field; requests include store=false and include=["reasoning.encrypted_content"].
- We persist encrypted reasoning items (type: "reasoning", encrypted_content, optional id) into API history and replay them on subsequent turns.
- Reasoning summaries default to summary: "auto" when supported; text.verbosity only when supported.
- Atomic persistence via safeWriteJson.

Removed
- previous_response_id flows, suppressPreviousResponseId/skipPrevResponseIdOnce, persistGpt5Metadata(), and GPT‑5 response ID metadata in UI messages.

Kept
- taskId and mode metadata for cross-provider features.

Result
- ZDR-friendly, stateless continuity with equal or better performance and a simpler codepath.

* fix(webview): remove unused metadata prop from ReasoningBlock render

* Responses API: retain response id for troubleshooting (not continuity)

Continuity is stateless via encrypted reasoning items that we persist and replay. We now capture the top-level response id in OpenAiNativeHandler and persist the assistant message id into api_conversation_history.json solely for debugging/correlation with provider logs; it is not used for continuity or control flow.

Also: silence request-body debug logging to avoid leaking prompts.

* remove DEPRECATED tests

* chore: remove unused Task types file to satisfy knip CI

* fix(task): properly type cleanConversationHistory and createMessage args in Task to address Dan's review

* chore: add changeset for v3.31.2 (RooCodeInc#9216)

* Changeset version bump (RooCodeInc#9217)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* rename: sliding-window -> context-management; truncateConversationIfNeeded -> manageContext (RooCodeInc#9206)

* Fix: Roo Anthropic input token normalization (avoid double-count) (RooCodeInc#9224)

* OpenAI Native: gate encrypted_content include; remove gpt-5-chat-latest verbosity flag (fixes RooCodeInc#9225) (RooCodeInc#9231)

openai-native: include reasoning.encrypted_content only when reasoningEffort is set; prevent Responses API error on non-reasoning models. types: remove supportsVerbosity from gpt-5-chat-latest to avoid invalid verbosity error. Fixes RooCodeInc#9225

* docs: remove Contributors section from README files (RooCodeInc#9198)

Co-authored-by: Roo Code <roomote@roocode.com>

* Release v3.31.3 (RooCodeInc#9232)

* Changeset version bump (RooCodeInc#9233)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add native tool call support (RooCodeInc#9159)

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

* Consistently use Package.name for better support of the nightly app (RooCodeInc#9240)

* fix: resolve 400 error with native tools on OpenRouter (RooCodeInc#9238)

* fix: change tool_choice from required to auto for native protocol (RooCodeInc#9242)

* docs: include PR numbers in release guide (RooCodeInc#9236)

* Add enum support to configuration schema (RooCodeInc#9247)

* refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate) (RooCodeInc#9237)

* refactor(task): wrap initial user message in <feedback> instead of <task> to prevent focus drift after context-management

Rationale: After a successful context-management event, framing the next user block as feedback reduces model focus drift. Mentions parsing already supports <feedback>, and tool flows (attemptCompletion, responses) are aligned. No change to loop/persistence.

* refactor(mentions): drop <task> parsing; standardize on <feedback>; update tests

* fix: Filter native tools by mode restrictions (RooCodeInc#9246)

* 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 broken share button (RooCodeInc#9253)

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

* Add GPT-5.1 models and clean up reasoning effort logic (RooCodeInc#9252)

* 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>

* fix: make line_ranges optional in read_file tool schema (RooCodeInc#9254)

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.

* fix: prevent consecutive user messages on streaming retry (RooCodeInc#9249)

* feat(openai): OpenAI Responses: model-driven prompt caching and generic reasoning options refactor (RooCodeInc#9259)

* revert out of scope changes from RooCodeInc#9252 (RooCodeInc#9258)

* Revert "refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate)" (RooCodeInc#9261)

* Release v3.32.0 (RooCodeInc#9264)

* Changeset version bump (RooCodeInc#9265)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* [FIX] Fix OpenAI Native handling of encrypted reasoning blocks to prevent error when condensing (RooCodeInc#9263)

* fix: prevent duplicate tool_result blocks in native protocol mode for 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.

* Fix duplicate tool blocks causing 'tool has already been used' error (RooCodeInc#9275)

* feat(openai-native): add abort controller for request cancellation (RooCodeInc#9276)

* Disable XML parser for native tool protocol (RooCodeInc#9277)

* Release v3.32.1 (RooCodeInc#9278)

* Changeset version bump (RooCodeInc#9280)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* refactor: centralize toolProtocol configuration checks (RooCodeInc#9279)

* 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 (RooCodeInc#9270)

* 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

* fix: prevent duplicate tool_result blocks in native tool protocol (RooCodeInc#9248)

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* Fix duplicate import (RooCodeInc#9281)

* chore(core): remove unused TelemetryEventName import

* feat: implement dynamic tool protocol resolution with proper precedence hierarchy (RooCodeInc#9286)

Co-authored-by: Roo Code <roomote@roocode.com>

* web: Roo Code Cloud Provider pricing page and changes elsewhere (RooCodeInc#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 <mrubens@users.noreply.github.com>

* feat(zgsm): add abort signal handling for streaming responses

* Move the native tool call toggle to experimental settings (RooCodeInc#9297)

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

* fix: Replace broken badgen.net badges with shields.io (RooCodeInc#9318)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: preserve tool blocks for native protocol in conversation history (RooCodeInc#9319)

* feat: add git status to environment details (RooCodeInc#9310)

* feat: Move Import/Export to Modes view toolbar (RooCodeInc#8686) Cleanup of Mode Edit view (RooCodeInc#9077)

* Add max git status files to evals settings (RooCodeInc#9322)

* Release: v1.86.0 (RooCodeInc#9323)

* fix: prevent infinite loop when attempt_completion succeeds (RooCodeInc#9325)

* feat: add tool protocol selector to advanced settings (RooCodeInc#9324)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Remove experimental setting for native tool calls (RooCodeInc#9333)

* Fix the type of the list files recursive parameter (RooCodeInc#9337)

* fix: use VSCode theme color for outline button borders (RooCodeInc#9336)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>

* feat: update cloud agent CTA to point to setup page (RooCodeInc#9338)

Co-authored-by: Roo Code <roomote@roocode.com>

* Improve Google Gemini defaults, temperature, and cost reporting (RooCodeInc#9327)

* fix: sync parser state with profile/model changes (RooCodeInc#9355)

* feat: enable native tool calling for openai-native provider (RooCodeInc#9348)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add Gemini 3 Pro Preview model (RooCodeInc#9357)

* fix: pass tool protocol parameter to lineCountTruncationError (RooCodeInc#9358)

* Remove the Roo model defaults (RooCodeInc#9340)

* chore: add changeset and announcement for v3.33.0 (RooCodeInc#9360)

* Changeset version bump (RooCodeInc#9362)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: resolve native tool protocol race condition causing 400 errors (RooCodeInc#9363)

* Retry eval tasks if API instability detected (RooCodeInc#9365)

* fix: exclude XML tool examples from MODES section when native protocol enabled (RooCodeInc#9367)

* Add native tool calling support to OpenAI-compatible (RooCodeInc#9369)

* Add native tool calling support to OpenAI-compatible

* Fix OpenAI strict mode schema validation by adding converter methods to BaseProvider

- Add convertToolsForOpenAI() and convertToolSchemaForOpenAI() methods to BaseProvider
- These methods ensure all properties are in required array and convert nullable types
- Remove line_ranges from required array in read_file tool (converter handles it)
- Update OpenAiHandler and BaseOpenAiCompatibleProvider to use helper methods
- Eliminates code duplication across multiple tool usage sites
- Fixes: OpenAI completion error: 400 Invalid schema for function 'read_file'

---------

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: ensure no XML parsing when protocol is native (RooCodeInc#9371)

* fix: ensure no XML parsing when protocol is native

* refactor: remove redundant non-null assertions

* fix: gemini maxOutputTokens and reasoning config (RooCodeInc#9375)

* fix: gemini maxOutputTokens and reasoning config

* test: tighten gemini reasoning typings

* fix: Update tools to return structured JSON for native protocol (RooCodeInc#9373)

* feat: add toolProtocol property to PostHog tool usage telemetry (RooCodeInc#9374)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: Include nativeArgs in tool repetition detection (RooCodeInc#9377)

* fix: Include nativeArgs in tool repetition detection

Fixes false positive 'stuck in a loop' error for native protocol tools
like read_file that store parameters in nativeArgs instead of params.

Previously, the ToolRepetitionDetector only compared the params object,
which was empty for native protocol tools. This caused all read_file
calls to appear identical, triggering false loop detection even when
reading different files.

Changes:
- Updated serializeToolUse() to include nativeArgs in comparison
- Added comprehensive tests for native protocol scenarios
- Maintains backward compatibility with XML protocol tools

Closes: Issue reported in Discord about read_file loop detection

* Try to use safe-stable-stringify in the tool repetition detector

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Fix Gemini thought signature validation and token counting errors (RooCodeInc#9380)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release v3.33.1 (RooCodeInc#9383)

* Changeset version bump (RooCodeInc#9384)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve user images in native tool call results (RooCodeInc#9401)

* feat: migrate PostHog client to ph.roocode.com (RooCodeInc#9402)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: enable native tool calling for gemini provider (RooCodeInc#9343)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add a RCC credit balance display (RooCodeInc#9386)

* Add a RCC credit balance display

* Replace the provider docs with the balance when logged in

* PR feedback

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* perf: reduce excessive getModel() calls & implement disk cache fallback (RooCodeInc#9410)

* Show zero price for free models (RooCodeInc#9419)

* Release v3.33.2 (RooCodeInc#9420)

* Changeset version bump (RooCodeInc#9421)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Improve read_file tool description with examples (RooCodeInc#9422)

* Improve read_file tool description with examples

- Add explicit JSON structure documentation
- Include three concrete examples (single file, with line ranges, multiple files)
- Clarify that 'path' is required and 'line_ranges' is optional
- Better explain line range format (1-based inclusive)

This addresses agent confusion by providing clear examples similar to the XML tool definition.

* Make read_file tool dynamic based on partialReadsEnabled setting

- Convert read_file from static export to createReadFileTool() factory function
- Add getNativeTools() function that accepts partialReadsEnabled parameter
- Create buildNativeToolsArray() helper to encapsulate tool building logic
- Update Task.ts to build native tools dynamically using maxReadFileLine setting
- When partialReadsEnabled is false, line_ranges parameter is excluded from schema
- Examples and descriptions adjust based on whether line ranges are supported

This matches the behavior of the XML tool definition which dynamically adjusts
its documentation based on settings, reducing confusion for agents.

* Fix Marketplace crash by removing wildcard activation event (RooCodeInc#9423)

* Revert "Fix Marketplace crash by removing wildcard activation event" (RooCodeInc#9432)

* Fix OpenAI Native parallel tool calls for native protocol (RooCodeInc#9433)

Fixes an issue where using the OpenAI Native provider together with Native Tool Calling could cause OpenAI’s Responses API to fail with errors like:

* feat: add Google Gemini 3 Pro Image Preview to image generation models (RooCodeInc#9440)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: prevent duplicate environment_details when resuming cancelled tasks (RooCodeInc#9442)

- Filter out complete environment_details blocks before appending fresh ones
- Check for both opening and closing tags to ensure we're matching complete blocks
- Prevents stale environment data from being kept during task resume
- Add tests to verify deduplication logic and edge cases

* Update glob to ^11.1.0 (RooCodeInc#9449)

* chore: update tar-fs to 3.1.1 via pnpm override (RooCodeInc#9450)

Co-authored-by: Roo Code <roomote@roocode.com>

* Store reasoning in conversation history for all providers (RooCodeInc#9451)

* Fix preserveReasoning flag to control API reasoning inclusion (RooCodeInc#9453)

* feat: store reasoning in conversation history for all providers

* refactor: address review feedback

- Move comments inside else block
- Combine reasoning checks into single if block
- Make comments more concise

* refactor: make comments more concise

* Fix preserveReasoning flag to control API reasoning inclusion

Changes:
1. Removed hardcoded <think> tag logic in streaming
   - Previously hardcoded reasoning into assistant message text
   - Now passes reasoning to addToApiConversationHistory as parameter

2. Updated buildCleanConversationHistory to respect preserveReasoning flag
   - When preserveReasoning: true → reasoning block included in API requests
   - When preserveReasoning: false/undefined → reasoning stripped from API
   - Reasoning stored in history for all cases

3. Added temporary debug logs to base-openai-compatible-provider.ts
   - Shows preserveReasoning flag value
   - Logs reasoning blocks in incoming messages
   - Logs <think> tags in converted messages sent to API

* Fix: Use api.getModel() directly instead of cachedStreamingModel

Addresses review comment: cachedStreamingModel is set during streaming but
buildCleanConversationHistory is called before streaming starts. Using the
cached value could cause stale model info when switching models between requests.

Now directly uses this.api.getModel().info.preserveReasoning to ensure we
always check the current model's flag, not a potentially stale cached value.

* Clean up comments in Task.ts

Removed outdated comment regarding model's preserveReasoning flag.

* fix: remove unnecessary reasoningBlock variable in task reasoning logic

* fix: send tool_result blocks for skipped tools in native protocol (RooCodeInc#9457)

* fix: improve markdown formatting and add reasoning support (RooCodeInc#9458)

* feat: implement Minimax as Anthropic-compatible provider (RooCodeInc#9455)

* fix: improve search and replace symbol parsing (RooCodeInc#9456)

* chore: add changeset for v3.33.3 (RooCodeInc#9459)

* Changeset version bump (RooCodeInc#9460)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(terminal): add inline shell integration with user input support

* Release: v1.87.0 (RooCodeInc#9477)

* refactor(terminal): remove inline shell integration callback and improve terminal process handling

* fix: add fallback to yield tool calls regardless of finish_reason (RooCodeInc#9476)

* Improvements to base openai compatible (RooCodeInc#9462)

Co-authored-by: Roo Code <roomote@roocode.com>

* Browser Use 2.0 (RooCodeInc#8941)

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

* fix: resolve apply_diff performance regression from PR RooCodeInc#9456 (RooCodeInc#9474)

* fix: implement model cache refresh to prevent stale disk cache (RooCodeInc#9478)

* fix: Make cancel button immediately responsive during streaming (RooCodeInc#9448)

* Test a provider-oriented welcome screen (RooCodeInc#9484)

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

* (feat): Add Baseten Provider (RooCodeInc#9461)

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

* fix: copy model-level capabilities to OpenRouter endpoint models (RooCodeInc#9483)

* Pin the Roo provider to the top of the list (RooCodeInc#9485)

* Wait to experiment until state is hydrated (RooCodeInc#9488)

* Change baseten default model to glm for now (RooCodeInc#9489)

* Revert "Wait to experiment until state is hydrated" (RooCodeInc#9491)

* Try to fix build (RooCodeInc#9490)

* Update webview-ui Vite config (RooCodeInc#9493)

* Enhance native tool descriptions with examples and clarifications (RooCodeInc#9486)

* Revert "Revert "Wait to experiment until state is hydrated"" (RooCodeInc#9494)

* chore: add changeset and announcement for v3.34.0 (RooCodeInc#9495)

* Changeset version bump (RooCodeInc#9496)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Enable the Roo Code Cloud provider in evals (RooCodeInc#9492)

* Show the prompt for image gen (RooCodeInc#9505)

* feat(chat): conditionally render UpdateTodoListToolBlock based on alwaysAllowUpdateTodoList flag

* fix(web-evals): update checkbox handler in new-run component

* Remove double todo list (RooCodeInc#9517)

* Track cloud synced messages (RooCodeInc#9518)

* 3.34.1 (RooCodeInc#9522)

* Changeset version bump (RooCodeInc#9523)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: support reasoning_details format for Gemini 3 models (RooCodeInc#9506)

* feat: update Cerebras models (RooCodeInc#9527)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: ensure XML parser state matches tool protocol on config update (RooCodeInc#9535)

* fix: flush LiteLLM cache when credentials change on refresh (RooCodeInc#9536)

* Add Roo Code Cloud as an imagegen provider (RooCodeInc#9528)

* fix: gracefully skip unsupported content blocks in Gemini transformer (RooCodeInc#9537)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: add claude-opus-4.5 to OpenRouter prompt caching and reasoning budget models (RooCodeInc#9540)

* feat: add claude-opus-4.5 to Anthropic and Vertex providers (RooCodeInc#9541)

* Release v3.34.2 (RooCodeInc#9545)

* Changeset version bump (RooCodeInc#9546)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add support for Roo Code Cloud as an embeddings provider (RooCodeInc#9543)

* Switch from asdf to mise-en-place in bare-metal evals setup script (RooCodeInc#9548)

* feat: implement streaming for native tool calls (RooCodeInc#9542)

* Add Opus 4.5 to Claude Code provider (RooCodeInc#9560)

* Fix ask_followup_question streaming issue and add missing tool cases (RooCodeInc#9561)

* feat(auth): enhance login status logging and use dynamic plugin version

* refactor:  remove disable provider and add client id headers

* test(webview): remove disable  provider tests across multiple test files

* fix: enable caching for Opus 4.5 model (RooCodeInc#9568)

Added claude-opus-4-5-20251101 to the cache control switch statements
to enable prompt caching, matching the behavior of other Claude models.

Fixes RooCodeInc#9567

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: Add contact links to About Roo Code settings page (RooCodeInc#9570)

* feat: add contact links to About settings page

* Tweaks

* i18n

* Update webview-ui/src/components/settings/__tests__/About.spec.tsx

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

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* feat: add Claude Opus 4.5 model to Bedrock provider (RooCodeInc#9572)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* chore: add changeset for v3.34.3 (RooCodeInc#9578)

* Changeset version bump (RooCodeInc#9579)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve dynamic MCP tool names in native mode API history (RooCodeInc#9559)

* fix: preserve tool_use blocks in summary message during condensing with native tools (RooCodeInc#9582)

* Add support for images api (RooCodeInc#9587)

* Make it clear that BFL Flux 2 is free (RooCodeInc#9588)

* Add BFL models to openrouter (RooCodeInc#9589)

* chore: add changeset for v3.34.4 (RooCodeInc#9590)

* Changeset version bump (RooCodeInc#9591)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: set native tools as default for minimax-m2 and claude-haiku-4.5 (RooCodeInc#9586)

* feat: enable multiple native tool calls per turn with failure guardrails (RooCodeInc#9273)

* feat: add Bedrock Opus 4.5 to global inference model list (RooCodeInc#9595)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: update API handler when toolProtocol changes (RooCodeInc#9599)

* Make single file read only apply to xml tools (RooCodeInc#9600)

* Revert "Add support for Roo Code Cloud as an embeddings provider" (RooCodeInc#9602)

* feat(web-evals): enhance dashboard with dynamic tool columns and UX improvements (RooCodeInc#9592)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix(webview): pass taskId to finishSubTask when canceling or deleting tasks

* chore: add changeset for v3.34.5 (RooCodeInc#9603)

* Changeset version bump (RooCodeInc#9604)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

---------

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
Co-authored-by: Alex Ker <thealexker@gmail.com>
Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
Co-authored-by: Seb Duerr <sebastian.duerr@cerebras.net>
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Nov 26, 2025
* feat: add Google Tag Manager to marketing website (RooCodeInc#9148)

* feat: add Google Tag Manager to marketing website using Next.js Script component

* refactor: remove Google Ads implementation in favor of Tag Manager

* fix: wrap GTM script in consent-checking client component for GDPR compliance

---------

Co-authored-by: Roo Code <roomote@roocode.com>

* IPC command for sending messages to the current task (RooCodeInc#9149)

* fix: prevent command_output ask from blocking in cloud/headless environments (RooCodeInc#9152)

* chore: add changeset for v3.31.1 (RooCodeInc#9153)

* Release: v1.85.0 (RooCodeInc#9155)

* Gate XML out when native tool protocol is ON (RooCodeInc#9107)

* Add native tool definitions (RooCodeInc#9156)

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <roomote@roocode.com>

* Move auto-approval from `ChatView` to `Task` (RooCodeInc#9157)

* feat(i18n): add internationalization for unexpected API response error message

* fix(task): use consistent error message for API response failures and ensure message queue is never undefined

* test: update vscode mock and improve test coverage

* fix: Model switch re-applies selected profile (sync task.apiConfiguration) (RooCodeInc#9179) (RooCodeInc#9181)

* Add custom Button component with variant system (RooCodeInc#9150)

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

* Changeset version bump (RooCodeInc#9154)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(core): detect API configuration changes for model switching

* fix: include mcpServers in getState() for auto-approval (RooCodeInc#9199)

* fix: replace rate-limited badges with badgen.net (RooCodeInc#9200)

* Batch settings updates from the webview to the extension host (RooCodeInc#9165)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: Apply updated API profile settings when provider/model unchanged (RooCodeInc#9208) (RooCodeInc#9210)

fix: apply updated API profile settings when provider/model unchanged (RooCodeInc#9208)

* fix: migrate Issue Fixer to REST + ProjectsV2 (RooCodeInc#9207)

* fix(issue-fixer): migrate to REST for issue/comments and add ProjectsV2; remove Projects Classic mentions

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

---------

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

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API) (RooCodeInc#9203)

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API)

Summary
We moved continuity off OpenAI servers and now maintain conversation state locally by persisting and replaying encrypted reasoning items. Requests are stateless (store=false) while retaining the performance/caching benefits of the Responses API.

Why
This aligns with how Roo manages context and simplifies our Responses API implementation while keeping all the benefits of continuity, caching, and latency improvements.

What changed
- All OpenAI models now use the Responses API; system instructions are passed via the top-level instructions field; requests include store=false and include=["reasoning.encrypted_content"].
- We persist encrypted reasoning items (type: "reasoning", encrypted_content, optional id) into API history and replay them on subsequent turns.
- Reasoning summaries default to summary: "auto" when supported; text.verbosity only when supported.
- Atomic persistence via safeWriteJson.

Removed
- previous_response_id flows, suppressPreviousResponseId/skipPrevResponseIdOnce, persistGpt5Metadata(), and GPT‑5 response ID metadata in UI messages.

Kept
- taskId and mode metadata for cross-provider features.

Result
- ZDR-friendly, stateless continuity with equal or better performance and a simpler codepath.

* fix(webview): remove unused metadata prop from ReasoningBlock render

* Responses API: retain response id for troubleshooting (not continuity)

Continuity is stateless via encrypted reasoning items that we persist and replay. We now capture the top-level response id in OpenAiNativeHandler and persist the assistant message id into api_conversation_history.json solely for debugging/correlation with provider logs; it is not used for continuity or control flow.

Also: silence request-body debug logging to avoid leaking prompts.

* remove DEPRECATED tests

* chore: remove unused Task types file to satisfy knip CI

* fix(task): properly type cleanConversationHistory and createMessage args in Task to address Dan's review

* chore: add changeset for v3.31.2 (RooCodeInc#9216)

* Changeset version bump (RooCodeInc#9217)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* rename: sliding-window -> context-management; truncateConversationIfNeeded -> manageContext (RooCodeInc#9206)

* Fix: Roo Anthropic input token normalization (avoid double-count) (RooCodeInc#9224)

* OpenAI Native: gate encrypted_content include; remove gpt-5-chat-latest verbosity flag (fixes RooCodeInc#9225) (RooCodeInc#9231)

openai-native: include reasoning.encrypted_content only when reasoningEffort is set; prevent Responses API error on non-reasoning models. types: remove supportsVerbosity from gpt-5-chat-latest to avoid invalid verbosity error. Fixes RooCodeInc#9225

* docs: remove Contributors section from README files (RooCodeInc#9198)

Co-authored-by: Roo Code <roomote@roocode.com>

* Release v3.31.3 (RooCodeInc#9232)

* Changeset version bump (RooCodeInc#9233)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add native tool call support (RooCodeInc#9159)

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

* Consistently use Package.name for better support of the nightly app (RooCodeInc#9240)

* fix: resolve 400 error with native tools on OpenRouter (RooCodeInc#9238)

* fix: change tool_choice from required to auto for native protocol (RooCodeInc#9242)

* docs: include PR numbers in release guide (RooCodeInc#9236)

* Add enum support to configuration schema (RooCodeInc#9247)

* refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate) (RooCodeInc#9237)

* refactor(task): wrap initial user message in <feedback> instead of <task> to prevent focus drift after context-management

Rationale: After a successful context-management event, framing the next user block as feedback reduces model focus drift. Mentions parsing already supports <feedback>, and tool flows (attemptCompletion, responses) are aligned. No change to loop/persistence.

* refactor(mentions): drop <task> parsing; standardize on <feedback>; update tests

* fix: Filter native tools by mode restrictions (RooCodeInc#9246)

* 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 broken share button (RooCodeInc#9253)

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

* Add GPT-5.1 models and clean up reasoning effort logic (RooCodeInc#9252)

* 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>

* fix: make line_ranges optional in read_file tool schema (RooCodeInc#9254)

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.

* fix: prevent consecutive user messages on streaming retry (RooCodeInc#9249)

* feat(openai): OpenAI Responses: model-driven prompt caching and generic reasoning options refactor (RooCodeInc#9259)

* revert out of scope changes from RooCodeInc#9252 (RooCodeInc#9258)

* Revert "refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate)" (RooCodeInc#9261)

* Release v3.32.0 (RooCodeInc#9264)

* Changeset version bump (RooCodeInc#9265)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* [FIX] Fix OpenAI Native handling of encrypted reasoning blocks to prevent error when condensing (RooCodeInc#9263)

* fix: prevent duplicate tool_result blocks in native protocol mode for 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.

* Fix duplicate tool blocks causing 'tool has already been used' error (RooCodeInc#9275)

* feat(openai-native): add abort controller for request cancellation (RooCodeInc#9276)

* Disable XML parser for native tool protocol (RooCodeInc#9277)

* Release v3.32.1 (RooCodeInc#9278)

* Changeset version bump (RooCodeInc#9280)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* refactor: centralize toolProtocol configuration checks (RooCodeInc#9279)

* 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 (RooCodeInc#9270)

* 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

* fix: prevent duplicate tool_result blocks in native tool protocol (RooCodeInc#9248)

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* Fix duplicate import (RooCodeInc#9281)

* chore(core): remove unused TelemetryEventName import

* feat: implement dynamic tool protocol resolution with proper precedence hierarchy (RooCodeInc#9286)

Co-authored-by: Roo Code <roomote@roocode.com>

* web: Roo Code Cloud Provider pricing page and changes elsewhere (RooCodeInc#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 <mrubens@users.noreply.github.com>

* feat(zgsm): add abort signal handling for streaming responses

* Move the native tool call toggle to experimental settings (RooCodeInc#9297)

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

* fix: Replace broken badgen.net badges with shields.io (RooCodeInc#9318)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: preserve tool blocks for native protocol in conversation history (RooCodeInc#9319)

* feat: add git status to environment details (RooCodeInc#9310)

* feat: Move Import/Export to Modes view toolbar (RooCodeInc#8686) Cleanup of Mode Edit view (RooCodeInc#9077)

* Add max git status files to evals settings (RooCodeInc#9322)

* Release: v1.86.0 (RooCodeInc#9323)

* fix: prevent infinite loop when attempt_completion succeeds (RooCodeInc#9325)

* feat: add tool protocol selector to advanced settings (RooCodeInc#9324)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Remove experimental setting for native tool calls (RooCodeInc#9333)

* Fix the type of the list files recursive parameter (RooCodeInc#9337)

* fix: use VSCode theme color for outline button borders (RooCodeInc#9336)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>

* feat: update cloud agent CTA to point to setup page (RooCodeInc#9338)

Co-authored-by: Roo Code <roomote@roocode.com>

* Improve Google Gemini defaults, temperature, and cost reporting (RooCodeInc#9327)

* fix: sync parser state with profile/model changes (RooCodeInc#9355)

* feat: enable native tool calling for openai-native provider (RooCodeInc#9348)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add Gemini 3 Pro Preview model (RooCodeInc#9357)

* fix: pass tool protocol parameter to lineCountTruncationError (RooCodeInc#9358)

* Remove the Roo model defaults (RooCodeInc#9340)

* chore: add changeset and announcement for v3.33.0 (RooCodeInc#9360)

* Changeset version bump (RooCodeInc#9362)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: resolve native tool protocol race condition causing 400 errors (RooCodeInc#9363)

* Retry eval tasks if API instability detected (RooCodeInc#9365)

* fix: exclude XML tool examples from MODES section when native protocol enabled (RooCodeInc#9367)

* Add native tool calling support to OpenAI-compatible (RooCodeInc#9369)

* Add native tool calling support to OpenAI-compatible

* Fix OpenAI strict mode schema validation by adding converter methods to BaseProvider

- Add convertToolsForOpenAI() and convertToolSchemaForOpenAI() methods to BaseProvider
- These methods ensure all properties are in required array and convert nullable types
- Remove line_ranges from required array in read_file tool (converter handles it)
- Update OpenAiHandler and BaseOpenAiCompatibleProvider to use helper methods
- Eliminates code duplication across multiple tool usage sites
- Fixes: OpenAI completion error: 400 Invalid schema for function 'read_file'

---------

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: ensure no XML parsing when protocol is native (RooCodeInc#9371)

* fix: ensure no XML parsing when protocol is native

* refactor: remove redundant non-null assertions

* fix: gemini maxOutputTokens and reasoning config (RooCodeInc#9375)

* fix: gemini maxOutputTokens and reasoning config

* test: tighten gemini reasoning typings

* fix: Update tools to return structured JSON for native protocol (RooCodeInc#9373)

* feat: add toolProtocol property to PostHog tool usage telemetry (RooCodeInc#9374)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: Include nativeArgs in tool repetition detection (RooCodeInc#9377)

* fix: Include nativeArgs in tool repetition detection

Fixes false positive 'stuck in a loop' error for native protocol tools
like read_file that store parameters in nativeArgs instead of params.

Previously, the ToolRepetitionDetector only compared the params object,
which was empty for native protocol tools. This caused all read_file
calls to appear identical, triggering false loop detection even when
reading different files.

Changes:
- Updated serializeToolUse() to include nativeArgs in comparison
- Added comprehensive tests for native protocol scenarios
- Maintains backward compatibility with XML protocol tools

Closes: Issue reported in Discord about read_file loop detection

* Try to use safe-stable-stringify in the tool repetition detector

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Fix Gemini thought signature validation and token counting errors (RooCodeInc#9380)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release v3.33.1 (RooCodeInc#9383)

* Changeset version bump (RooCodeInc#9384)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve user images in native tool call results (RooCodeInc#9401)

* feat: migrate PostHog client to ph.roocode.com (RooCodeInc#9402)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: enable native tool calling for gemini provider (RooCodeInc#9343)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add a RCC credit balance display (RooCodeInc#9386)

* Add a RCC credit balance display

* Replace the provider docs with the balance when logged in

* PR feedback

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* perf: reduce excessive getModel() calls & implement disk cache fallback (RooCodeInc#9410)

* Show zero price for free models (RooCodeInc#9419)

* Release v3.33.2 (RooCodeInc#9420)

* Changeset version bump (RooCodeInc#9421)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Improve read_file tool description with examples (RooCodeInc#9422)

* Improve read_file tool description with examples

- Add explicit JSON structure documentation
- Include three concrete examples (single file, with line ranges, multiple files)
- Clarify that 'path' is required and 'line_ranges' is optional
- Better explain line range format (1-based inclusive)

This addresses agent confusion by providing clear examples similar to the XML tool definition.

* Make read_file tool dynamic based on partialReadsEnabled setting

- Convert read_file from static export to createReadFileTool() factory function
- Add getNativeTools() function that accepts partialReadsEnabled parameter
- Create buildNativeToolsArray() helper to encapsulate tool building logic
- Update Task.ts to build native tools dynamically using maxReadFileLine setting
- When partialReadsEnabled is false, line_ranges parameter is excluded from schema
- Examples and descriptions adjust based on whether line ranges are supported

This matches the behavior of the XML tool definition which dynamically adjusts
its documentation based on settings, reducing confusion for agents.

* Fix Marketplace crash by removing wildcard activation event (RooCodeInc#9423)

* Revert "Fix Marketplace crash by removing wildcard activation event" (RooCodeInc#9432)

* Fix OpenAI Native parallel tool calls for native protocol (RooCodeInc#9433)

Fixes an issue where using the OpenAI Native provider together with Native Tool Calling could cause OpenAI’s Responses API to fail with errors like:

* feat: add Google Gemini 3 Pro Image Preview to image generation models (RooCodeInc#9440)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: prevent duplicate environment_details when resuming cancelled tasks (RooCodeInc#9442)

- Filter out complete environment_details blocks before appending fresh ones
- Check for both opening and closing tags to ensure we're matching complete blocks
- Prevents stale environment data from being kept during task resume
- Add tests to verify deduplication logic and edge cases

* Update glob to ^11.1.0 (RooCodeInc#9449)

* chore: update tar-fs to 3.1.1 via pnpm override (RooCodeInc#9450)

Co-authored-by: Roo Code <roomote@roocode.com>

* Store reasoning in conversation history for all providers (RooCodeInc#9451)

* Fix preserveReasoning flag to control API reasoning inclusion (RooCodeInc#9453)

* feat: store reasoning in conversation history for all providers

* refactor: address review feedback

- Move comments inside else block
- Combine reasoning checks into single if block
- Make comments more concise

* refactor: make comments more concise

* Fix preserveReasoning flag to control API reasoning inclusion

Changes:
1. Removed hardcoded <think> tag logic in streaming
   - Previously hardcoded reasoning into assistant message text
   - Now passes reasoning to addToApiConversationHistory as parameter

2. Updated buildCleanConversationHistory to respect preserveReasoning flag
   - When preserveReasoning: true → reasoning block included in API requests
   - When preserveReasoning: false/undefined → reasoning stripped from API
   - Reasoning stored in history for all cases

3. Added temporary debug logs to base-openai-compatible-provider.ts
   - Shows preserveReasoning flag value
   - Logs reasoning blocks in incoming messages
   - Logs <think> tags in converted messages sent to API

* Fix: Use api.getModel() directly instead of cachedStreamingModel

Addresses review comment: cachedStreamingModel is set during streaming but
buildCleanConversationHistory is called before streaming starts. Using the
cached value could cause stale model info when switching models between requests.

Now directly uses this.api.getModel().info.preserveReasoning to ensure we
always check the current model's flag, not a potentially stale cached value.

* Clean up comments in Task.ts

Removed outdated comment regarding model's preserveReasoning flag.

* fix: remove unnecessary reasoningBlock variable in task reasoning logic

* fix: send tool_result blocks for skipped tools in native protocol (RooCodeInc#9457)

* fix: improve markdown formatting and add reasoning support (RooCodeInc#9458)

* feat: implement Minimax as Anthropic-compatible provider (RooCodeInc#9455)

* fix: improve search and replace symbol parsing (RooCodeInc#9456)

* chore: add changeset for v3.33.3 (RooCodeInc#9459)

* Changeset version bump (RooCodeInc#9460)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(terminal): add inline shell integration with user input support

* Release: v1.87.0 (RooCodeInc#9477)

* refactor(terminal): remove inline shell integration callback and improve terminal process handling

* fix: add fallback to yield tool calls regardless of finish_reason (RooCodeInc#9476)

* Improvements to base openai compatible (RooCodeInc#9462)

Co-authored-by: Roo Code <roomote@roocode.com>

* Browser Use 2.0 (RooCodeInc#8941)

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

* fix: resolve apply_diff performance regression from PR RooCodeInc#9456 (RooCodeInc#9474)

* fix: implement model cache refresh to prevent stale disk cache (RooCodeInc#9478)

* fix: Make cancel button immediately responsive during streaming (RooCodeInc#9448)

* Test a provider-oriented welcome screen (RooCodeInc#9484)

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

* (feat): Add Baseten Provider (RooCodeInc#9461)

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

* fix: copy model-level capabilities to OpenRouter endpoint models (RooCodeInc#9483)

* Pin the Roo provider to the top of the list (RooCodeInc#9485)

* Wait to experiment until state is hydrated (RooCodeInc#9488)

* Change baseten default model to glm for now (RooCodeInc#9489)

* Revert "Wait to experiment until state is hydrated" (RooCodeInc#9491)

* Try to fix build (RooCodeInc#9490)

* Update webview-ui Vite config (RooCodeInc#9493)

* Enhance native tool descriptions with examples and clarifications (RooCodeInc#9486)

* Revert "Revert "Wait to experiment until state is hydrated"" (RooCodeInc#9494)

* chore: add changeset and announcement for v3.34.0 (RooCodeInc#9495)

* Changeset version bump (RooCodeInc#9496)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Enable the Roo Code Cloud provider in evals (RooCodeInc#9492)

* Show the prompt for image gen (RooCodeInc#9505)

* feat(chat): conditionally render UpdateTodoListToolBlock based on alwaysAllowUpdateTodoList flag

* fix(web-evals): update checkbox handler in new-run component

* Remove double todo list (RooCodeInc#9517)

* Track cloud synced messages (RooCodeInc#9518)

* 3.34.1 (RooCodeInc#9522)

* Changeset version bump (RooCodeInc#9523)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: support reasoning_details format for Gemini 3 models (RooCodeInc#9506)

* feat: update Cerebras models (RooCodeInc#9527)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: ensure XML parser state matches tool protocol on config update (RooCodeInc#9535)

* fix: flush LiteLLM cache when credentials change on refresh (RooCodeInc#9536)

* Add Roo Code Cloud as an imagegen provider (RooCodeInc#9528)

* fix: gracefully skip unsupported content blocks in Gemini transformer (RooCodeInc#9537)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: add claude-opus-4.5 to OpenRouter prompt caching and reasoning budget models (RooCodeInc#9540)

* feat: add claude-opus-4.5 to Anthropic and Vertex providers (RooCodeInc#9541)

* Release v3.34.2 (RooCodeInc#9545)

* Changeset version bump (RooCodeInc#9546)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add support for Roo Code Cloud as an embeddings provider (RooCodeInc#9543)

* Switch from asdf to mise-en-place in bare-metal evals setup script (RooCodeInc#9548)

* feat: implement streaming for native tool calls (RooCodeInc#9542)

* Add Opus 4.5 to Claude Code provider (RooCodeInc#9560)

* Fix ask_followup_question streaming issue and add missing tool cases (RooCodeInc#9561)

* feat(auth): enhance login status logging and use dynamic plugin version

* refactor:  remove disable provider and add client id headers

* test(webview): remove disable  provider tests across multiple test files

* fix: enable caching for Opus 4.5 model (RooCodeInc#9568)

Added claude-opus-4-5-20251101 to the cache control switch statements
to enable prompt caching, matching the behavior of other Claude models.

Fixes RooCodeInc#9567

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: Add contact links to About Roo Code settings page (RooCodeInc#9570)

* feat: add contact links to About settings page

* Tweaks

* i18n

* Update webview-ui/src/components/settings/__tests__/About.spec.tsx

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

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* feat: add Claude Opus 4.5 model to Bedrock provider (RooCodeInc#9572)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* chore: add changeset for v3.34.3 (RooCodeInc#9578)

* Changeset version bump (RooCodeInc#9579)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve dynamic MCP tool names in native mode API history (RooCodeInc#9559)

* fix: preserve tool_use blocks in summary message during condensing with native tools (RooCodeInc#9582)

* Add support for images api (RooCodeInc#9587)

* Make it clear that BFL Flux 2 is free (RooCodeInc#9588)

* Add BFL models to openrouter (RooCodeInc#9589)

* chore: add changeset for v3.34.4 (RooCodeInc#9590)

* Changeset version bump (RooCodeInc#9591)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: set native tools as default for minimax-m2 and claude-haiku-4.5 (RooCodeInc#9586)

* feat: enable multiple native tool calls per turn with failure guardrails (RooCodeInc#9273)

* feat: add Bedrock Opus 4.5 to global inference model list (RooCodeInc#9595)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: update API handler when toolProtocol changes (RooCodeInc#9599)

* Make single file read only apply to xml tools (RooCodeInc#9600)

* Revert "Add support for Roo Code Cloud as an embeddings provider" (RooCodeInc#9602)

* feat(web-evals): enhance dashboard with dynamic tool columns and UX improvements (RooCodeInc#9592)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix(webview): pass taskId to finishSubTask when canceling or deleting tasks

* chore: add changeset for v3.34.5 (RooCodeInc#9603)

* Changeset version bump (RooCodeInc#9604)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Feature/bedrock embeddings support (RooCodeInc#9475)

* feat: add AWS Bedrock support for codebase indexing

- Add bedrock as a new EmbedderProvider type
- Add AWS Bedrock embedding model profiles (titan-embed-text models)
- Create BedrockEmbedder class with support for Titan and Cohere models
- Add Bedrock configuration support to config manager and interfaces
- Update service factory to create BedrockEmbedder instances
- Add comprehensive tests for BedrockEmbedder
- Add localization strings for Bedrock support

Closes RooCodeInc#8658

* fix: add missing bedrockOptions to loadConfiguration return type

* Fix various issues that the original PR missed.

* Remove debug logs

* Rename AWS Bedrock -> Amazon Bedrock

* Remove some 'as any's

* Revert README changes

* Add translations

* More translations

* Remove leftover code from a debugging session.

* fix: add bedrock to codebaseIndexModelsSchema and update brace-expansion override

- Add bedrock provider to codebaseIndexModelsSchema type definition to fix empty model dropdown in UI
- Update pnpm override for brace-expansion from '>=2.0.2' to '^2.0.2' to resolve ESM/CommonJS compatibility issues

* Improvements to AWS Bedrock embeddings support

- Enhanced bedrock.ts embedder implementation
- Added comprehensive test coverage in bedrock.spec.ts
- Updated config-manager.ts for better Bedrock configuration handling
- Improved service-factory.ts integration
- Updated embeddingModels.ts with Bedrock models
- Enhanced CodeIndexPopover.tsx UI for Bedrock options
- Added auto-populate test for CodeIndexPopover
- Updated pnpm-lock.yaml dependencies

* Restore openrouter config

* Remove debug log

* Fix config-manager.spec.ts unit test.

* Add translations for "optional"

* Revert unnecessary change related to open ia embedder

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Smartsheet-JB-Brown <jb.brown@smartsheet.com>

---------

Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
Co-authored-by: Alex Ker <thealexker@gmail.com>
Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
Co-authored-by: Seb Duerr <sebastian.duerr@cerebras.net>
Co-authored-by: George Goranov <georgi.goranov@smartsheet.com>
Co-authored-by: Smartsheet-JB-Brown <jb.brown@smartsheet.com>
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Nov 26, 2025
* fix: prevent command_output ask from blocking in cloud/headless environments (RooCodeInc#9152)

* chore: add changeset for v3.31.1 (RooCodeInc#9153)

* Release: v1.85.0 (RooCodeInc#9155)

* Gate XML out when native tool protocol is ON (RooCodeInc#9107)

* Add native tool definitions (RooCodeInc#9156)

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: sync reviewer landing page copy - variant B to variant A (RooCodeInc#9158)

- Updated variant A content to match variant B messaging
- Both variants now show the same improved copy focused on catching meaningful bugs
- Emphasizes depth over token-saving and repository-aware analysis

Co-authored-by: Roo Code <roomote@roocode.com>

* Move auto-approval from `ChatView` to `Task` (RooCodeInc#9157)

* feat(i18n): add internationalization for unexpected API response error message

* fix(task): use consistent error message for API response failures and ensure message queue is never undefined

* test: update vscode mock and improve test coverage

* fix: Model switch re-applies selected profile (sync task.apiConfiguration) (RooCodeInc#9179) (RooCodeInc#9181)

* Add custom Button component with variant system (RooCodeInc#9150)

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

* Changeset version bump (RooCodeInc#9154)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(core): detect API configuration changes for model switching

* fix: include mcpServers in getState() for auto-approval (RooCodeInc#9199)

* fix: replace rate-limited badges with badgen.net (RooCodeInc#9200)

* Batch settings updates from the webview to the extension host (RooCodeInc#9165)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: Apply updated API profile settings when provider/model unchanged (RooCodeInc#9208) (RooCodeInc#9210)

fix: apply updated API profile settings when provider/model unchanged (RooCodeInc#9208)

* fix: migrate Issue Fixer to REST + ProjectsV2 (RooCodeInc#9207)

* fix(issue-fixer): migrate to REST for issue/comments and add ProjectsV2; remove Projects Classic mentions

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

---------

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

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API) (RooCodeInc#9203)

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API)

Summary
We moved continuity off OpenAI servers and now maintain conversation state locally by persisting and replaying encrypted reasoning items. Requests are stateless (store=false) while retaining the performance/caching benefits of the Responses API.

Why
This aligns with how Roo manages context and simplifies our Responses API implementation while keeping all the benefits of continuity, caching, and latency improvements.

What changed
- All OpenAI models now use the Responses API; system instructions are passed via the top-level instructions field; requests include store=false and include=["reasoning.encrypted_content"].
- We persist encrypted reasoning items (type: "reasoning", encrypted_content, optional id) into API history and replay them on subsequent turns.
- Reasoning summaries default to summary: "auto" when supported; text.verbosity only when supported.
- Atomic persistence via safeWriteJson.

Removed
- previous_response_id flows, suppressPreviousResponseId/skipPrevResponseIdOnce, persistGpt5Metadata(), and GPT‑5 response ID metadata in UI messages.

Kept
- taskId and mode metadata for cross-provider features.

Result
- ZDR-friendly, stateless continuity with equal or better performance and a simpler codepath.

* fix(webview): remove unused metadata prop from ReasoningBlock render

* Responses API: retain response id for troubleshooting (not continuity)

Continuity is stateless via encrypted reasoning items that we persist and replay. We now capture the top-level response id in OpenAiNativeHandler and persist the assistant message id into api_conversation_history.json solely for debugging/correlation with provider logs; it is not used for continuity or control flow.

Also: silence request-body debug logging to avoid leaking prompts.

* remove DEPRECATED tests

* chore: remove unused Task types file to satisfy knip CI

* fix(task): properly type cleanConversationHistory and createMessage args in Task to address Dan's review

* chore: add changeset for v3.31.2 (RooCodeInc#9216)

* Changeset version bump (RooCodeInc#9217)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* rename: sliding-window -> context-management; truncateConversationIfNeeded -> manageContext (RooCodeInc#9206)

* Fix: Roo Anthropic input token normalization (avoid double-count) (RooCodeInc#9224)

* OpenAI Native: gate encrypted_content include; remove gpt-5-chat-latest verbosity flag (fixes RooCodeInc#9225) (RooCodeInc#9231)

openai-native: include reasoning.encrypted_content only when reasoningEffort is set; prevent Responses API error on non-reasoning models. types: remove supportsVerbosity from gpt-5-chat-latest to avoid invalid verbosity error. Fixes RooCodeInc#9225

* docs: remove Contributors section from README files (RooCodeInc#9198)

Co-authored-by: Roo Code <roomote@roocode.com>

* Release v3.31.3 (RooCodeInc#9232)

* Changeset version bump (RooCodeInc#9233)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add native tool call support (RooCodeInc#9159)

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

* Consistently use Package.name for better support of the nightly app (RooCodeInc#9240)

* fix: resolve 400 error with native tools on OpenRouter (RooCodeInc#9238)

* fix: change tool_choice from required to auto for native protocol (RooCodeInc#9242)

* docs: include PR numbers in release guide (RooCodeInc#9236)

* Add enum support to configuration schema (RooCodeInc#9247)

* refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate) (RooCodeInc#9237)

* refactor(task): wrap initial user message in <feedback> instead of <task> to prevent focus drift after context-management

Rationale: After a successful context-management event, framing the next user block as feedback reduces model focus drift. Mentions parsing already supports <feedback>, and tool flows (attemptCompletion, responses) are aligned. No change to loop/persistence.

* refactor(mentions): drop <task> parsing; standardize on <feedback>; update tests

* fix: Filter native tools by mode restrictions (RooCodeInc#9246)

* 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 broken share button (RooCodeInc#9253)

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

* Add GPT-5.1 models and clean up reasoning effort logic (RooCodeInc#9252)

* 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>

* fix: make line_ranges optional in read_file tool schema (RooCodeInc#9254)

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.

* fix: prevent consecutive user messages on streaming retry (RooCodeInc#9249)

* feat(openai): OpenAI Responses: model-driven prompt caching and generic reasoning options refactor (RooCodeInc#9259)

* revert out of scope changes from RooCodeInc#9252 (RooCodeInc#9258)

* Revert "refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate)" (RooCodeInc#9261)

* Release v3.32.0 (RooCodeInc#9264)

* Changeset version bump (RooCodeInc#9265)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* [FIX] Fix OpenAI Native handling of encrypted reasoning blocks to prevent error when condensing (RooCodeInc#9263)

* fix: prevent duplicate tool_result blocks in native protocol mode for 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.

* Fix duplicate tool blocks causing 'tool has already been used' error (RooCodeInc#9275)

* feat(openai-native): add abort controller for request cancellation (RooCodeInc#9276)

* Disable XML parser for native tool protocol (RooCodeInc#9277)

* Release v3.32.1 (RooCodeInc#9278)

* Changeset version bump (RooCodeInc#9280)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* refactor: centralize toolProtocol configuration checks (RooCodeInc#9279)

* 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 (RooCodeInc#9270)

* 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

* fix: prevent duplicate tool_result blocks in native tool protocol (RooCodeInc#9248)

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* Fix duplicate import (RooCodeInc#9281)

* chore(core): remove unused TelemetryEventName import

* feat: implement dynamic tool protocol resolution with proper precedence hierarchy (RooCodeInc#9286)

Co-authored-by: Roo Code <roomote@roocode.com>

* web: Roo Code Cloud Provider pricing page and changes elsewhere (RooCodeInc#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 <mrubens@users.noreply.github.com>

* feat(zgsm): add abort signal handling for streaming responses

* Move the native tool call toggle to experimental settings (RooCodeInc#9297)

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

* fix: Replace broken badgen.net badges with shields.io (RooCodeInc#9318)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: preserve tool blocks for native protocol in conversation history (RooCodeInc#9319)

* feat: add git status to environment details (RooCodeInc#9310)

* feat: Move Import/Export to Modes view toolbar (RooCodeInc#8686) Cleanup of Mode Edit view (RooCodeInc#9077)

* Add max git status files to evals settings (RooCodeInc#9322)

* Release: v1.86.0 (RooCodeInc#9323)

* fix: prevent infinite loop when attempt_completion succeeds (RooCodeInc#9325)

* feat: add tool protocol selector to advanced settings (RooCodeInc#9324)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Remove experimental setting for native tool calls (RooCodeInc#9333)

* Fix the type of the list files recursive parameter (RooCodeInc#9337)

* fix: use VSCode theme color for outline button borders (RooCodeInc#9336)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>

* feat: update cloud agent CTA to point to setup page (RooCodeInc#9338)

Co-authored-by: Roo Code <roomote@roocode.com>

* Improve Google Gemini defaults, temperature, and cost reporting (RooCodeInc#9327)

* fix: sync parser state with profile/model changes (RooCodeInc#9355)

* feat: enable native tool calling for openai-native provider (RooCodeInc#9348)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add Gemini 3 Pro Preview model (RooCodeInc#9357)

* fix: pass tool protocol parameter to lineCountTruncationError (RooCodeInc#9358)

* Remove the Roo model defaults (RooCodeInc#9340)

* chore: add changeset and announcement for v3.33.0 (RooCodeInc#9360)

* Changeset version bump (RooCodeInc#9362)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: resolve native tool protocol race condition causing 400 errors (RooCodeInc#9363)

* Retry eval tasks if API instability detected (RooCodeInc#9365)

* fix: exclude XML tool examples from MODES section when native protocol enabled (RooCodeInc#9367)

* Add native tool calling support to OpenAI-compatible (RooCodeInc#9369)

* Add native tool calling support to OpenAI-compatible

* Fix OpenAI strict mode schema validation by adding converter methods to BaseProvider

- Add convertToolsForOpenAI() and convertToolSchemaForOpenAI() methods to BaseProvider
- These methods ensure all properties are in required array and convert nullable types
- Remove line_ranges from required array in read_file tool (converter handles it)
- Update OpenAiHandler and BaseOpenAiCompatibleProvider to use helper methods
- Eliminates code duplication across multiple tool usage sites
- Fixes: OpenAI completion error: 400 Invalid schema for function 'read_file'

---------

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: ensure no XML parsing when protocol is native (RooCodeInc#9371)

* fix: ensure no XML parsing when protocol is native

* refactor: remove redundant non-null assertions

* fix: gemini maxOutputTokens and reasoning config (RooCodeInc#9375)

* fix: gemini maxOutputTokens and reasoning config

* test: tighten gemini reasoning typings

* fix: Update tools to return structured JSON for native protocol (RooCodeInc#9373)

* feat: add toolProtocol property to PostHog tool usage telemetry (RooCodeInc#9374)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: Include nativeArgs in tool repetition detection (RooCodeInc#9377)

* fix: Include nativeArgs in tool repetition detection

Fixes false positive 'stuck in a loop' error for native protocol tools
like read_file that store parameters in nativeArgs instead of params.

Previously, the ToolRepetitionDetector only compared the params object,
which was empty for native protocol tools. This caused all read_file
calls to appear identical, triggering false loop detection even when
reading different files.

Changes:
- Updated serializeToolUse() to include nativeArgs in comparison
- Added comprehensive tests for native protocol scenarios
- Maintains backward compatibility with XML protocol tools

Closes: Issue reported in Discord about read_file loop detection

* Try to use safe-stable-stringify in the tool repetition detector

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Fix Gemini thought signature validation and token counting errors (RooCodeInc#9380)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release v3.33.1 (RooCodeInc#9383)

* Changeset version bump (RooCodeInc#9384)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve user images in native tool call results (RooCodeInc#9401)

* feat: migrate PostHog client to ph.roocode.com (RooCodeInc#9402)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: enable native tool calling for gemini provider (RooCodeInc#9343)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add a RCC credit balance display (RooCodeInc#9386)

* Add a RCC credit balance display

* Replace the provider docs with the balance when logged in

* PR feedback

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* perf: reduce excessive getModel() calls & implement disk cache fallback (RooCodeInc#9410)

* Show zero price for free models (RooCodeInc#9419)

* Release v3.33.2 (RooCodeInc#9420)

* Changeset version bump (RooCodeInc#9421)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Improve read_file tool description with examples (RooCodeInc#9422)

* Improve read_file tool description with examples

- Add explicit JSON structure documentation
- Include three concrete examples (single file, with line ranges, multiple files)
- Clarify that 'path' is required and 'line_ranges' is optional
- Better explain line range format (1-based inclusive)

This addresses agent confusion by providing clear examples similar to the XML tool definition.

* Make read_file tool dynamic based on partialReadsEnabled setting

- Convert read_file from static export to createReadFileTool() factory function
- Add getNativeTools() function that accepts partialReadsEnabled parameter
- Create buildNativeToolsArray() helper to encapsulate tool building logic
- Update Task.ts to build native tools dynamically using maxReadFileLine setting
- When partialReadsEnabled is false, line_ranges parameter is excluded from schema
- Examples and descriptions adjust based on whether line ranges are supported

This matches the behavior of the XML tool definition which dynamically adjusts
its documentation based on settings, reducing confusion for agents.

* Fix Marketplace crash by removing wildcard activation event (RooCodeInc#9423)

* Revert "Fix Marketplace crash by removing wildcard activation event" (RooCodeInc#9432)

* Fix OpenAI Native parallel tool calls for native protocol (RooCodeInc#9433)

Fixes an issue where using the OpenAI Native provider together with Native Tool Calling could cause OpenAI’s Responses API to fail with errors like:

* feat: add Google Gemini 3 Pro Image Preview to image generation models (RooCodeInc#9440)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: prevent duplicate environment_details when resuming cancelled tasks (RooCodeInc#9442)

- Filter out complete environment_details blocks before appending fresh ones
- Check for both opening and closing tags to ensure we're matching complete blocks
- Prevents stale environment data from being kept during task resume
- Add tests to verify deduplication logic and edge cases

* Update glob to ^11.1.0 (RooCodeInc#9449)

* chore: update tar-fs to 3.1.1 via pnpm override (RooCodeInc#9450)

Co-authored-by: Roo Code <roomote@roocode.com>

* Store reasoning in conversation history for all providers (RooCodeInc#9451)

* Fix preserveReasoning flag to control API reasoning inclusion (RooCodeInc#9453)

* feat: store reasoning in conversation history for all providers

* refactor: address review feedback

- Move comments inside else block
- Combine reasoning checks into single if block
- Make comments more concise

* refactor: make comments more concise

* Fix preserveReasoning flag to control API reasoning inclusion

Changes:
1. Removed hardcoded <think> tag logic in streaming
   - Previously hardcoded reasoning into assistant message text
   - Now passes reasoning to addToApiConversationHistory as parameter

2. Updated buildCleanConversationHistory to respect preserveReasoning flag
   - When preserveReasoning: true → reasoning block included in API requests
   - When preserveReasoning: false/undefined → reasoning stripped from API
   - Reasoning stored in history for all cases

3. Added temporary debug logs to base-openai-compatible-provider.ts
   - Shows preserveReasoning flag value
   - Logs reasoning blocks in incoming messages
   - Logs <think> tags in converted messages sent to API

* Fix: Use api.getModel() directly instead of cachedStreamingModel

Addresses review comment: cachedStreamingModel is set during streaming but
buildCleanConversationHistory is called before streaming starts. Using the
cached value could cause stale model info when switching models between requests.

Now directly uses this.api.getModel().info.preserveReasoning to ensure we
always check the current model's flag, not a potentially stale cached value.

* Clean up comments in Task.ts

Removed outdated comment regarding model's preserveReasoning flag.

* fix: remove unnecessary reasoningBlock variable in task reasoning logic

* fix: send tool_result blocks for skipped tools in native protocol (RooCodeInc#9457)

* fix: improve markdown formatting and add reasoning support (RooCodeInc#9458)

* feat: implement Minimax as Anthropic-compatible provider (RooCodeInc#9455)

* fix: improve search and replace symbol parsing (RooCodeInc#9456)

* chore: add changeset for v3.33.3 (RooCodeInc#9459)

* Changeset version bump (RooCodeInc#9460)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(terminal): add inline shell integration with user input support

* Release: v1.87.0 (RooCodeInc#9477)

* refactor(terminal): remove inline shell integration callback and improve terminal process handling

* fix: add fallback to yield tool calls regardless of finish_reason (RooCodeInc#9476)

* Improvements to base openai compatible (RooCodeInc#9462)

Co-authored-by: Roo Code <roomote@roocode.com>

* Browser Use 2.0 (RooCodeInc#8941)

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

* fix: resolve apply_diff performance regression from PR RooCodeInc#9456 (RooCodeInc#9474)

* fix: implement model cache refresh to prevent stale disk cache (RooCodeInc#9478)

* fix: Make cancel button immediately responsive during streaming (RooCodeInc#9448)

* Test a provider-oriented welcome screen (RooCodeInc#9484)

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

* (feat): Add Baseten Provider (RooCodeInc#9461)

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

* fix: copy model-level capabilities to OpenRouter endpoint models (RooCodeInc#9483)

* Pin the Roo provider to the top of the list (RooCodeInc#9485)

* Wait to experiment until state is hydrated (RooCodeInc#9488)

* Change baseten default model to glm for now (RooCodeInc#9489)

* Revert "Wait to experiment until state is hydrated" (RooCodeInc#9491)

* Try to fix build (RooCodeInc#9490)

* Update webview-ui Vite config (RooCodeInc#9493)

* Enhance native tool descriptions with examples and clarifications (RooCodeInc#9486)

* Revert "Revert "Wait to experiment until state is hydrated"" (RooCodeInc#9494)

* chore: add changeset and announcement for v3.34.0 (RooCodeInc#9495)

* Changeset version bump (RooCodeInc#9496)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Enable the Roo Code Cloud provider in evals (RooCodeInc#9492)

* Show the prompt for image gen (RooCodeInc#9505)

* feat(chat): conditionally render UpdateTodoListToolBlock based on alwaysAllowUpdateTodoList flag

* fix(web-evals): update checkbox handler in new-run component

* Remove double todo list (RooCodeInc#9517)

* Track cloud synced messages (RooCodeInc#9518)

* 3.34.1 (RooCodeInc#9522)

* Changeset version bump (RooCodeInc#9523)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: support reasoning_details format for Gemini 3 models (RooCodeInc#9506)

* feat: update Cerebras models (RooCodeInc#9527)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: ensure XML parser state matches tool protocol on config update (RooCodeInc#9535)

* fix: flush LiteLLM cache when credentials change on refresh (RooCodeInc#9536)

* Add Roo Code Cloud as an imagegen provider (RooCodeInc#9528)

* fix: gracefully skip unsupported content blocks in Gemini transformer (RooCodeInc#9537)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: add claude-opus-4.5 to OpenRouter prompt caching and reasoning budget models (RooCodeInc#9540)

* feat: add claude-opus-4.5 to Anthropic and Vertex providers (RooCodeInc#9541)

* Release v3.34.2 (RooCodeInc#9545)

* Changeset version bump (RooCodeInc#9546)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add support for Roo Code Cloud as an embeddings provider (RooCodeInc#9543)

* Switch from asdf to mise-en-place in bare-metal evals setup script (RooCodeInc#9548)

* feat: implement streaming for native tool calls (RooCodeInc#9542)

* Add Opus 4.5 to Claude Code provider (RooCodeInc#9560)

* Fix ask_followup_question streaming issue and add missing tool cases (RooCodeInc#9561)

* feat(auth): enhance login status logging and use dynamic plugin version

* refactor:  remove disable provider and add client id headers

* test(webview): remove disable  provider tests across multiple test files

* fix: enable caching for Opus 4.5 model (RooCodeInc#9568)

Added claude-opus-4-5-20251101 to the cache control switch statements
to enable prompt caching, matching the behavior of other Claude models.

Fixes RooCodeInc#9567

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: Add contact links to About Roo Code settings page (RooCodeInc#9570)

* feat: add contact links to About settings page

* Tweaks

* i18n

* Update webview-ui/src/components/settings/__tests__/About.spec.tsx

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

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* feat: add Claude Opus 4.5 model to Bedrock provider (RooCodeInc#9572)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* chore: add changeset for v3.34.3 (RooCodeInc#9578)

* Changeset version bump (RooCodeInc#9579)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve dynamic MCP tool names in native mode API history (RooCodeInc#9559)

* fix: preserve tool_use blocks in summary message during condensing with native tools (RooCodeInc#9582)

* Add support for images api (RooCodeInc#9587)

* Make it clear that BFL Flux 2 is free (RooCodeInc#9588)

* Add BFL models to openrouter (RooCodeInc#9589)

* chore: add changeset for v3.34.4 (RooCodeInc#9590)

* Changeset version bump (RooCodeInc#9591)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: set native tools as default for minimax-m2 and claude-haiku-4.5 (RooCodeInc#9586)

* feat: enable multiple native tool calls per turn with failure guardrails (RooCodeInc#9273)

* feat: add Bedrock Opus 4.5 to global inference model list (RooCodeInc#9595)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: update API handler when toolProtocol changes (RooCodeInc#9599)

* Make single file read only apply to xml tools (RooCodeInc#9600)

* Revert "Add support for Roo Code Cloud as an embeddings provider" (RooCodeInc#9602)

* feat(web-evals): enhance dashboard with dynamic tool columns and UX improvements (RooCodeInc#9592)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix(webview): pass taskId to finishSubTask when canceling or deleting tasks

* chore: add changeset for v3.34.5 (RooCodeInc#9603)

* Changeset version bump (RooCodeInc#9604)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Feature/bedrock embeddings support (RooCodeInc#9475)

* feat: add AWS Bedrock support for codebase indexing

- Add bedrock as a new EmbedderProvider type
- Add AWS Bedrock embedding model profiles (titan-embed-text models)
- Create BedrockEmbedder class with support for Titan and Cohere models
- Add Bedrock configuration support to config manager and interfaces
- Update service factory to create BedrockEmbedder instances
- Add comprehensive tests for BedrockEmbedder
- Add localization strings for Bedrock support

Closes RooCodeInc#8658

* fix: add missing bedrockOptions to loadConfiguration return type

* Fix various issues that the original PR missed.

* Remove debug logs

* Rename AWS Bedrock -> Amazon Bedrock

* Remove some 'as any's

* Revert README changes

* Add translations

* More translations

* Remove leftover code from a debugging session.

* fix: add bedrock to codebaseIndexModelsSchema and update brace-expansion override

- Add bedrock provider to codebaseIndexModelsSchema type definition to fix empty model dropdown in UI
- Update pnpm override for brace-expansion from '>=2.0.2' to '^2.0.2' to resolve ESM/CommonJS compatibility issues

* Improvements to AWS Bedrock embeddings support

- Enhanced bedrock.ts embedder implementation
- Added comprehensive test coverage in bedrock.spec.ts
- Updated config-manager.ts for better Bedrock configuration handling
- Improved service-factory.ts integration
- Updated embeddingModels.ts with Bedrock models
- Enhanced CodeIndexPopover.tsx UI for Bedrock options
- Added auto-populate test for CodeIndexPopover
- Updated pnpm-lock.yaml dependencies

* Restore openrouter config

* Remove debug log

* Fix config-manager.spec.ts unit test.

* Add translations for "optional"

* Revert unnecessary change related to open ia embedder

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Smartsheet-JB-Brown <jb.brown@smartsheet.com>

* fix: restore content undefined check in WriteToFileTool.handlePartial() (RooCodeInc#9614)

---------

Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
Co-authored-by: Alex Ker <thealexker@gmail.com>
Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
Co-authored-by: Seb Duerr <sebastian.duerr@cerebras.net>
Co-authored-by: George Goranov <georgi.goranov@smartsheet.com>
Co-authored-by: Smartsheet-JB-Brown <jb.brown@smartsheet.com>
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Nov 27, 2025
* fix: include mcpServers in getState() for auto-approval (RooCodeInc#9199)

* fix: replace rate-limited badges with badgen.net (RooCodeInc#9200)

* Batch settings updates from the webview to the extension host (RooCodeInc#9165)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: Apply updated API profile settings when provider/model unchanged (RooCodeInc#9208) (RooCodeInc#9210)

fix: apply updated API profile settings when provider/model unchanged (RooCodeInc#9208)

* fix: migrate Issue Fixer to REST + ProjectsV2 (RooCodeInc#9207)

* fix(issue-fixer): migrate to REST for issue/comments and add ProjectsV2; remove Projects Classic mentions

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

* Update .roo/rules-issue-fixer/4_github_cli_usage.xml

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

---------

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

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API) (RooCodeInc#9203)

* Migrate conversation continuity to plugin-side encrypted reasoning items (Responses API)

Summary
We moved continuity off OpenAI servers and now maintain conversation state locally by persisting and replaying encrypted reasoning items. Requests are stateless (store=false) while retaining the performance/caching benefits of the Responses API.

Why
This aligns with how Roo manages context and simplifies our Responses API implementation while keeping all the benefits of continuity, caching, and latency improvements.

What changed
- All OpenAI models now use the Responses API; system instructions are passed via the top-level instructions field; requests include store=false and include=["reasoning.encrypted_content"].
- We persist encrypted reasoning items (type: "reasoning", encrypted_content, optional id) into API history and replay them on subsequent turns.
- Reasoning summaries default to summary: "auto" when supported; text.verbosity only when supported.
- Atomic persistence via safeWriteJson.

Removed
- previous_response_id flows, suppressPreviousResponseId/skipPrevResponseIdOnce, persistGpt5Metadata(), and GPT‑5 response ID metadata in UI messages.

Kept
- taskId and mode metadata for cross-provider features.

Result
- ZDR-friendly, stateless continuity with equal or better performance and a simpler codepath.

* fix(webview): remove unused metadata prop from ReasoningBlock render

* Responses API: retain response id for troubleshooting (not continuity)

Continuity is stateless via encrypted reasoning items that we persist and replay. We now capture the top-level response id in OpenAiNativeHandler and persist the assistant message id into api_conversation_history.json solely for debugging/correlation with provider logs; it is not used for continuity or control flow.

Also: silence request-body debug logging to avoid leaking prompts.

* remove DEPRECATED tests

* chore: remove unused Task types file to satisfy knip CI

* fix(task): properly type cleanConversationHistory and createMessage args in Task to address Dan's review

* chore: add changeset for v3.31.2 (RooCodeInc#9216)

* Changeset version bump (RooCodeInc#9217)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* rename: sliding-window -> context-management; truncateConversationIfNeeded -> manageContext (RooCodeInc#9206)

* Fix: Roo Anthropic input token normalization (avoid double-count) (RooCodeInc#9224)

* OpenAI Native: gate encrypted_content include; remove gpt-5-chat-latest verbosity flag (fixes RooCodeInc#9225) (RooCodeInc#9231)

openai-native: include reasoning.encrypted_content only when reasoningEffort is set; prevent Responses API error on non-reasoning models. types: remove supportsVerbosity from gpt-5-chat-latest to avoid invalid verbosity error. Fixes RooCodeInc#9225

* docs: remove Contributors section from README files (RooCodeInc#9198)

Co-authored-by: Roo Code <roomote@roocode.com>

* Release v3.31.3 (RooCodeInc#9232)

* Changeset version bump (RooCodeInc#9233)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add native tool call support (RooCodeInc#9159)

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

* Consistently use Package.name for better support of the nightly app (RooCodeInc#9240)

* fix: resolve 400 error with native tools on OpenRouter (RooCodeInc#9238)

* fix: change tool_choice from required to auto for native protocol (RooCodeInc#9242)

* docs: include PR numbers in release guide (RooCodeInc#9236)

* Add enum support to configuration schema (RooCodeInc#9247)

* refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate) (RooCodeInc#9237)

* refactor(task): wrap initial user message in <feedback> instead of <task> to prevent focus drift after context-management

Rationale: After a successful context-management event, framing the next user block as feedback reduces model focus drift. Mentions parsing already supports <feedback>, and tool flows (attemptCompletion, responses) are aligned. No change to loop/persistence.

* refactor(mentions): drop <task> parsing; standardize on <feedback>; update tests

* fix: Filter native tools by mode restrictions (RooCodeInc#9246)

* 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 broken share button (RooCodeInc#9253)

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

* Add GPT-5.1 models and clean up reasoning effort logic (RooCodeInc#9252)

* 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>

* fix: make line_ranges optional in read_file tool schema (RooCodeInc#9254)

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.

* fix: prevent consecutive user messages on streaming retry (RooCodeInc#9249)

* feat(openai): OpenAI Responses: model-driven prompt caching and generic reasoning options refactor (RooCodeInc#9259)

* revert out of scope changes from RooCodeInc#9252 (RooCodeInc#9258)

* Revert "refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate)" (RooCodeInc#9261)

* Release v3.32.0 (RooCodeInc#9264)

* Changeset version bump (RooCodeInc#9265)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* [FIX] Fix OpenAI Native handling of encrypted reasoning blocks to prevent error when condensing (RooCodeInc#9263)

* fix: prevent duplicate tool_result blocks in native protocol mode for 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.

* Fix duplicate tool blocks causing 'tool has already been used' error (RooCodeInc#9275)

* feat(openai-native): add abort controller for request cancellation (RooCodeInc#9276)

* Disable XML parser for native tool protocol (RooCodeInc#9277)

* Release v3.32.1 (RooCodeInc#9278)

* Changeset version bump (RooCodeInc#9280)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* refactor: centralize toolProtocol configuration checks (RooCodeInc#9279)

* 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 (RooCodeInc#9270)

* 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

* fix: prevent duplicate tool_result blocks in native tool protocol (RooCodeInc#9248)

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* Fix duplicate import (RooCodeInc#9281)

* chore(core): remove unused TelemetryEventName import

* feat: implement dynamic tool protocol resolution with proper precedence hierarchy (RooCodeInc#9286)

Co-authored-by: Roo Code <roomote@roocode.com>

* web: Roo Code Cloud Provider pricing page and changes elsewhere (RooCodeInc#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 <mrubens@users.noreply.github.com>

* feat(zgsm): add abort signal handling for streaming responses

* Move the native tool call toggle to experimental settings (RooCodeInc#9297)

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

* fix: Replace broken badgen.net badges with shields.io (RooCodeInc#9318)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: preserve tool blocks for native protocol in conversation history (RooCodeInc#9319)

* feat: add git status to environment details (RooCodeInc#9310)

* feat: Move Import/Export to Modes view toolbar (RooCodeInc#8686) Cleanup of Mode Edit view (RooCodeInc#9077)

* Add max git status files to evals settings (RooCodeInc#9322)

* Release: v1.86.0 (RooCodeInc#9323)

* fix: prevent infinite loop when attempt_completion succeeds (RooCodeInc#9325)

* feat: add tool protocol selector to advanced settings (RooCodeInc#9324)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Remove experimental setting for native tool calls (RooCodeInc#9333)

* Fix the type of the list files recursive parameter (RooCodeInc#9337)

* fix: use VSCode theme color for outline button borders (RooCodeInc#9336)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>

* feat: update cloud agent CTA to point to setup page (RooCodeInc#9338)

Co-authored-by: Roo Code <roomote@roocode.com>

* Improve Google Gemini defaults, temperature, and cost reporting (RooCodeInc#9327)

* fix: sync parser state with profile/model changes (RooCodeInc#9355)

* feat: enable native tool calling for openai-native provider (RooCodeInc#9348)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add Gemini 3 Pro Preview model (RooCodeInc#9357)

* fix: pass tool protocol parameter to lineCountTruncationError (RooCodeInc#9358)

* Remove the Roo model defaults (RooCodeInc#9340)

* chore: add changeset and announcement for v3.33.0 (RooCodeInc#9360)

* Changeset version bump (RooCodeInc#9362)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: resolve native tool protocol race condition causing 400 errors (RooCodeInc#9363)

* Retry eval tasks if API instability detected (RooCodeInc#9365)

* fix: exclude XML tool examples from MODES section when native protocol enabled (RooCodeInc#9367)

* Add native tool calling support to OpenAI-compatible (RooCodeInc#9369)

* Add native tool calling support to OpenAI-compatible

* Fix OpenAI strict mode schema validation by adding converter methods to BaseProvider

- Add convertToolsForOpenAI() and convertToolSchemaForOpenAI() methods to BaseProvider
- These methods ensure all properties are in required array and convert nullable types
- Remove line_ranges from required array in read_file tool (converter handles it)
- Update OpenAiHandler and BaseOpenAiCompatibleProvider to use helper methods
- Eliminates code duplication across multiple tool usage sites
- Fixes: OpenAI completion error: 400 Invalid schema for function 'read_file'

---------

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: ensure no XML parsing when protocol is native (RooCodeInc#9371)

* fix: ensure no XML parsing when protocol is native

* refactor: remove redundant non-null assertions

* fix: gemini maxOutputTokens and reasoning config (RooCodeInc#9375)

* fix: gemini maxOutputTokens and reasoning config

* test: tighten gemini reasoning typings

* fix: Update tools to return structured JSON for native protocol (RooCodeInc#9373)

* feat: add toolProtocol property to PostHog tool usage telemetry (RooCodeInc#9374)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: Include nativeArgs in tool repetition detection (RooCodeInc#9377)

* fix: Include nativeArgs in tool repetition detection

Fixes false positive 'stuck in a loop' error for native protocol tools
like read_file that store parameters in nativeArgs instead of params.

Previously, the ToolRepetitionDetector only compared the params object,
which was empty for native protocol tools. This caused all read_file
calls to appear identical, triggering false loop detection even when
reading different files.

Changes:
- Updated serializeToolUse() to include nativeArgs in comparison
- Added comprehensive tests for native protocol scenarios
- Maintains backward compatibility with XML protocol tools

Closes: Issue reported in Discord about read_file loop detection

* Try to use safe-stable-stringify in the tool repetition detector

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Fix Gemini thought signature validation and token counting errors (RooCodeInc#9380)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release v3.33.1 (RooCodeInc#9383)

* Changeset version bump (RooCodeInc#9384)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve user images in native tool call results (RooCodeInc#9401)

* feat: migrate PostHog client to ph.roocode.com (RooCodeInc#9402)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: enable native tool calling for gemini provider (RooCodeInc#9343)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add a RCC credit balance display (RooCodeInc#9386)

* Add a RCC credit balance display

* Replace the provider docs with the balance when logged in

* PR feedback

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* perf: reduce excessive getModel() calls & implement disk cache fallback (RooCodeInc#9410)

* Show zero price for free models (RooCodeInc#9419)

* Release v3.33.2 (RooCodeInc#9420)

* Changeset version bump (RooCodeInc#9421)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Improve read_file tool description with examples (RooCodeInc#9422)

* Improve read_file tool description with examples

- Add explicit JSON structure documentation
- Include three concrete examples (single file, with line ranges, multiple files)
- Clarify that 'path' is required and 'line_ranges' is optional
- Better explain line range format (1-based inclusive)

This addresses agent confusion by providing clear examples similar to the XML tool definition.

* Make read_file tool dynamic based on partialReadsEnabled setting

- Convert read_file from static export to createReadFileTool() factory function
- Add getNativeTools() function that accepts partialReadsEnabled parameter
- Create buildNativeToolsArray() helper to encapsulate tool building logic
- Update Task.ts to build native tools dynamically using maxReadFileLine setting
- When partialReadsEnabled is false, line_ranges parameter is excluded from schema
- Examples and descriptions adjust based on whether line ranges are supported

This matches the behavior of the XML tool definition which dynamically adjusts
its documentation based on settings, reducing confusion for agents.

* Fix Marketplace crash by removing wildcard activation event (RooCodeInc#9423)

* Revert "Fix Marketplace crash by removing wildcard activation event" (RooCodeInc#9432)

* Fix OpenAI Native parallel tool calls for native protocol (RooCodeInc#9433)

Fixes an issue where using the OpenAI Native provider together with Native Tool Calling could cause OpenAI’s Responses API to fail with errors like:

* feat: add Google Gemini 3 Pro Image Preview to image generation models (RooCodeInc#9440)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: prevent duplicate environment_details when resuming cancelled tasks (RooCodeInc#9442)

- Filter out complete environment_details blocks before appending fresh ones
- Check for both opening and closing tags to ensure we're matching complete blocks
- Prevents stale environment data from being kept during task resume
- Add tests to verify deduplication logic and edge cases

* Update glob to ^11.1.0 (RooCodeInc#9449)

* chore: update tar-fs to 3.1.1 via pnpm override (RooCodeInc#9450)

Co-authored-by: Roo Code <roomote@roocode.com>

* Store reasoning in conversation history for all providers (RooCodeInc#9451)

* Fix preserveReasoning flag to control API reasoning inclusion (RooCodeInc#9453)

* feat: store reasoning in conversation history for all providers

* refactor: address review feedback

- Move comments inside else block
- Combine reasoning checks into single if block
- Make comments more concise

* refactor: make comments more concise

* Fix preserveReasoning flag to control API reasoning inclusion

Changes:
1. Removed hardcoded <think> tag logic in streaming
   - Previously hardcoded reasoning into assistant message text
   - Now passes reasoning to addToApiConversationHistory as parameter

2. Updated buildCleanConversationHistory to respect preserveReasoning flag
   - When preserveReasoning: true → reasoning block included in API requests
   - When preserveReasoning: false/undefined → reasoning stripped from API
   - Reasoning stored in history for all cases

3. Added temporary debug logs to base-openai-compatible-provider.ts
   - Shows preserveReasoning flag value
   - Logs reasoning blocks in incoming messages
   - Logs <think> tags in converted messages sent to API

* Fix: Use api.getModel() directly instead of cachedStreamingModel

Addresses review comment: cachedStreamingModel is set during streaming but
buildCleanConversationHistory is called before streaming starts. Using the
cached value could cause stale model info when switching models between requests.

Now directly uses this.api.getModel().info.preserveReasoning to ensure we
always check the current model's flag, not a potentially stale cached value.

* Clean up comments in Task.ts

Removed outdated comment regarding model's preserveReasoning flag.

* fix: remove unnecessary reasoningBlock variable in task reasoning logic

* fix: send tool_result blocks for skipped tools in native protocol (RooCodeInc#9457)

* fix: improve markdown formatting and add reasoning support (RooCodeInc#9458)

* feat: implement Minimax as Anthropic-compatible provider (RooCodeInc#9455)

* fix: improve search and replace symbol parsing (RooCodeInc#9456)

* chore: add changeset for v3.33.3 (RooCodeInc#9459)

* Changeset version bump (RooCodeInc#9460)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(terminal): add inline shell integration with user input support

* Release: v1.87.0 (RooCodeInc#9477)

* refactor(terminal): remove inline shell integration callback and improve terminal process handling

* fix: add fallback to yield tool calls regardless of finish_reason (RooCodeInc#9476)

* Improvements to base openai compatible (RooCodeInc#9462)

Co-authored-by: Roo Code <roomote@roocode.com>

* Browser Use 2.0 (RooCodeInc#8941)

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

* fix: resolve apply_diff performance regression from PR RooCodeInc#9456 (RooCodeInc#9474)

* fix: implement model cache refresh to prevent stale disk cache (RooCodeInc#9478)

* fix: Make cancel button immediately responsive during streaming (RooCodeInc#9448)

* Test a provider-oriented welcome screen (RooCodeInc#9484)

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

* (feat): Add Baseten Provider (RooCodeInc#9461)

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

* fix: copy model-level capabilities to OpenRouter endpoint models (RooCodeInc#9483)

* Pin the Roo provider to the top of the list (RooCodeInc#9485)

* Wait to experiment until state is hydrated (RooCodeInc#9488)

* Change baseten default model to glm for now (RooCodeInc#9489)

* Revert "Wait to experiment until state is hydrated" (RooCodeInc#9491)

* Try to fix build (RooCodeInc#9490)

* Update webview-ui Vite config (RooCodeInc#9493)

* Enhance native tool descriptions with examples and clarifications (RooCodeInc#9486)

* Revert "Revert "Wait to experiment until state is hydrated"" (RooCodeInc#9494)

* chore: add changeset and announcement for v3.34.0 (RooCodeInc#9495)

* Changeset version bump (RooCodeInc#9496)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Enable the Roo Code Cloud provider in evals (RooCodeInc#9492)

* Show the prompt for image gen (RooCodeInc#9505)

* feat(chat): conditionally render UpdateTodoListToolBlock based on alwaysAllowUpdateTodoList flag

* fix(web-evals): update checkbox handler in new-run component

* Remove double todo list (RooCodeInc#9517)

* Track cloud synced messages (RooCodeInc#9518)

* 3.34.1 (RooCodeInc#9522)

* Changeset version bump (RooCodeInc#9523)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: support reasoning_details format for Gemini 3 models (RooCodeInc#9506)

* feat: update Cerebras models (RooCodeInc#9527)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: ensure XML parser state matches tool protocol on config update (RooCodeInc#9535)

* fix: flush LiteLLM cache when credentials change on refresh (RooCodeInc#9536)

* Add Roo Code Cloud as an imagegen provider (RooCodeInc#9528)

* fix: gracefully skip unsupported content blocks in Gemini transformer (RooCodeInc#9537)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: add claude-opus-4.5 to OpenRouter prompt caching and reasoning budget models (RooCodeInc#9540)

* feat: add claude-opus-4.5 to Anthropic and Vertex providers (RooCodeInc#9541)

* Release v3.34.2 (RooCodeInc#9545)

* Changeset version bump (RooCodeInc#9546)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add support for Roo Code Cloud as an embeddings provider (RooCodeInc#9543)

* Switch from asdf to mise-en-place in bare-metal evals setup script (RooCodeInc#9548)

* feat: implement streaming for native tool calls (RooCodeInc#9542)

* Add Opus 4.5 to Claude Code provider (RooCodeInc#9560)

* Fix ask_followup_question streaming issue and add missing tool cases (RooCodeInc#9561)

* feat(auth): enhance login status logging and use dynamic plugin version

* refactor:  remove disable provider and add client id headers

* test(webview): remove disable  provider tests across multiple test files

* fix: enable caching for Opus 4.5 model (RooCodeInc#9568)

Added claude-opus-4-5-20251101 to the cache control switch statements
to enable prompt caching, matching the behavior of other Claude models.

Fixes RooCodeInc#9567

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: Add contact links to About Roo Code settings page (RooCodeInc#9570)

* feat: add contact links to About settings page

* Tweaks

* i18n

* Update webview-ui/src/components/settings/__tests__/About.spec.tsx

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

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* feat: add Claude Opus 4.5 model to Bedrock provider (RooCodeInc#9572)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* chore: add changeset for v3.34.3 (RooCodeInc#9578)

* Changeset version bump (RooCodeInc#9579)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve dynamic MCP tool names in native mode API history (RooCodeInc#9559)

* fix: preserve tool_use blocks in summary message during condensing with native tools (RooCodeInc#9582)

* Add support for images api (RooCodeInc#9587)

* Make it clear that BFL Flux 2 is free (RooCodeInc#9588)

* Add BFL models to openrouter (RooCodeInc#9589)

* chore: add changeset for v3.34.4 (RooCodeInc#9590)

* Changeset version bump (RooCodeInc#9591)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: set native tools as default for minimax-m2 and claude-haiku-4.5 (RooCodeInc#9586)

* feat: enable multiple native tool calls per turn with failure guardrails (RooCodeInc#9273)

* feat: add Bedrock Opus 4.5 to global inference model list (RooCodeInc#9595)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: update API handler when toolProtocol changes (RooCodeInc#9599)

* Make single file read only apply to xml tools (RooCodeInc#9600)

* Revert "Add support for Roo Code Cloud as an embeddings provider" (RooCodeInc#9602)

* feat(web-evals): enhance dashboard with dynamic tool columns and UX improvements (RooCodeInc#9592)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix(webview): pass taskId to finishSubTask when canceling or deleting tasks

* chore: add changeset for v3.34.5 (RooCodeInc#9603)

* Changeset version bump (RooCodeInc#9604)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Feature/bedrock embeddings support (RooCodeInc#9475)

* feat: add AWS Bedrock support for codebase indexing

- Add bedrock as a new EmbedderProvider type
- Add AWS Bedrock embedding model profiles (titan-embed-text models)
- Create BedrockEmbedder class with support for Titan and Cohere models
- Add Bedrock configuration support to config manager and interfaces
- Update service factory to create BedrockEmbedder instances
- Add comprehensive tests for BedrockEmbedder
- Add localization strings for Bedrock support

Closes RooCodeInc#8658

* fix: add missing bedrockOptions to loadConfiguration return type

* Fix various issues that the original PR missed.

* Remove debug logs

* Rename AWS Bedrock -> Amazon Bedrock

* Remove some 'as any's

* Revert README changes

* Add translations

* More translations

* Remove leftover code from a debugging session.

* fix: add bedrock to codebaseIndexModelsSchema and update brace-expansion override

- Add bedrock provider to codebaseIndexModelsSchema type definition to fix empty model dropdown in UI
- Update pnpm override for brace-expansion from '>=2.0.2' to '^2.0.2' to resolve ESM/CommonJS compatibility issues

* Improvements to AWS Bedrock embeddings support

- Enhanced bedrock.ts embedder implementation
- Added comprehensive test coverage in bedrock.spec.ts
- Updated config-manager.ts for better Bedrock configuration handling
- Improved service-factory.ts integration
- Updated embeddingModels.ts with Bedrock models
- Enhanced CodeIndexPopover.tsx UI for Bedrock options
- Added auto-populate test for CodeIndexPopover
- Updated pnpm-lock.yaml dependencies

* Restore openrouter config

* Remove debug log

* Fix config-manager.spec.ts unit test.

* Add translations for "optional"

* Revert unnecessary change related to open ia embedder

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Smartsheet-JB-Brown <jb.brown@smartsheet.com>

* fix: restore content undefined check in WriteToFileTool.handlePartial() (RooCodeInc#9614)

* fix: exclude access_mcp_resource tool when MCP has no resources (RooCodeInc#9615)

* fix: prevent model cache from persisting empty API responses (RooCodeInc#9623)

* fix: update default settings for inline terminal and codebase indexing (RooCodeInc#9622)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat(mistral): add native tool calling support (RooCodeInc#9625)

* feat: wire MULTIPLE_NATIVE_TOOL_CALLS experiment to OpenAI parallel_tool_calls (RooCodeInc#9621)

* feat(bedrock): allow global inference selection when cross-region is enabled (RooCodeInc#9616)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: defer new_task tool_result until subtask completes for native protocol (RooCodeInc#9628)

* fix: convert line_ranges strings to lineRanges objects in native tool calls (RooCodeInc#9627)

* fix: filter non-Anthropic content blocks before sending to Vertex API (RooCodeInc#9618)

* Add fine grained tool streaming for OpenRouter Anthropic (RooCodeInc#9629)

* Release v3.34.6 (RooCodeInc#9631)

* Changeset version bump (RooCodeInc#9632)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: OpenRouter GPT-5 strict schema validation for read_file tool (RooCodeInc#9633)

* fix: create parent directories early in write_to_file to prevent ENOENT errors (RooCodeInc#9640)

* Fix openrouter tool calls (RooCodeInc#9642)

* fix(claude-code): disable native tools and temperature support (RooCodeInc#9643)

* Enable native tool calling for z.ai (RooCodeInc#9645)

* Moonshot native tool call support (RooCodeInc#9646)

* Support native tools in the anthropic provider (RooCodeInc#9644)

Co-authored-by: Roo Code <roomote@roocode.com>

---------

Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
Co-authored-by: Alex Ker <thealexker@gmail.com>
Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
Co-authored-by: Seb Duerr <sebastian.duerr@cerebras.net>
Co-authored-by: George Goranov <georgi.goranov@smartsheet.com>
Co-authored-by: Smartsheet-JB-Brown <jb.brown@smartsheet.com>
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Nov 29, 2025
* fix: Filter native tools by mode restrictions (RooCodeInc#9246)

* 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 broken share button (RooCodeInc#9253)

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

* Add GPT-5.1 models and clean up reasoning effort logic (RooCodeInc#9252)

* 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>

* fix: make line_ranges optional in read_file tool schema (RooCodeInc#9254)

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.

* fix: prevent consecutive user messages on streaming retry (RooCodeInc#9249)

* feat(openai): OpenAI Responses: model-driven prompt caching and generic reasoning options refactor (RooCodeInc#9259)

* revert out of scope changes from RooCodeInc#9252 (RooCodeInc#9258)

* Revert "refactor(task): switch to <feedback> wrapper to prevent focus drift after context-management event (condense/truncate)" (RooCodeInc#9261)

* Release v3.32.0 (RooCodeInc#9264)

* Changeset version bump (RooCodeInc#9265)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* [FIX] Fix OpenAI Native handling of encrypted reasoning blocks to prevent error when condensing (RooCodeInc#9263)

* fix: prevent duplicate tool_result blocks in native protocol mode for 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.

* Fix duplicate tool blocks causing 'tool has already been used' error (RooCodeInc#9275)

* feat(openai-native): add abort controller for request cancellation (RooCodeInc#9276)

* Disable XML parser for native tool protocol (RooCodeInc#9277)

* Release v3.32.1 (RooCodeInc#9278)

* Changeset version bump (RooCodeInc#9280)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* refactor: centralize toolProtocol configuration checks (RooCodeInc#9279)

* 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 (RooCodeInc#9270)

* 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

* fix: prevent duplicate tool_result blocks in native tool protocol (RooCodeInc#9248)

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* Fix duplicate import (RooCodeInc#9281)

* chore(core): remove unused TelemetryEventName import

* feat: implement dynamic tool protocol resolution with proper precedence hierarchy (RooCodeInc#9286)

Co-authored-by: Roo Code <roomote@roocode.com>

* web: Roo Code Cloud Provider pricing page and changes elsewhere (RooCodeInc#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 <mrubens@users.noreply.github.com>

* feat(zgsm): add abort signal handling for streaming responses

* Move the native tool call toggle to experimental settings (RooCodeInc#9297)

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

* fix: Replace broken badgen.net badges with shields.io (RooCodeInc#9318)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: preserve tool blocks for native protocol in conversation history (RooCodeInc#9319)

* feat: add git status to environment details (RooCodeInc#9310)

* feat: Move Import/Export to Modes view toolbar (RooCodeInc#8686) Cleanup of Mode Edit view (RooCodeInc#9077)

* Add max git status files to evals settings (RooCodeInc#9322)

* Release: v1.86.0 (RooCodeInc#9323)

* fix: prevent infinite loop when attempt_completion succeeds (RooCodeInc#9325)

* feat: add tool protocol selector to advanced settings (RooCodeInc#9324)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Remove experimental setting for native tool calls (RooCodeInc#9333)

* Fix the type of the list files recursive parameter (RooCodeInc#9337)

* fix: use VSCode theme color for outline button borders (RooCodeInc#9336)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>

* feat: update cloud agent CTA to point to setup page (RooCodeInc#9338)

Co-authored-by: Roo Code <roomote@roocode.com>

* Improve Google Gemini defaults, temperature, and cost reporting (RooCodeInc#9327)

* fix: sync parser state with profile/model changes (RooCodeInc#9355)

* feat: enable native tool calling for openai-native provider (RooCodeInc#9348)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add Gemini 3 Pro Preview model (RooCodeInc#9357)

* fix: pass tool protocol parameter to lineCountTruncationError (RooCodeInc#9358)

* Remove the Roo model defaults (RooCodeInc#9340)

* chore: add changeset and announcement for v3.33.0 (RooCodeInc#9360)

* Changeset version bump (RooCodeInc#9362)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: resolve native tool protocol race condition causing 400 errors (RooCodeInc#9363)

* Retry eval tasks if API instability detected (RooCodeInc#9365)

* fix: exclude XML tool examples from MODES section when native protocol enabled (RooCodeInc#9367)

* Add native tool calling support to OpenAI-compatible (RooCodeInc#9369)

* Add native tool calling support to OpenAI-compatible

* Fix OpenAI strict mode schema validation by adding converter methods to BaseProvider

- Add convertToolsForOpenAI() and convertToolSchemaForOpenAI() methods to BaseProvider
- These methods ensure all properties are in required array and convert nullable types
- Remove line_ranges from required array in read_file tool (converter handles it)
- Update OpenAiHandler and BaseOpenAiCompatibleProvider to use helper methods
- Eliminates code duplication across multiple tool usage sites
- Fixes: OpenAI completion error: 400 Invalid schema for function 'read_file'

---------

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: ensure no XML parsing when protocol is native (RooCodeInc#9371)

* fix: ensure no XML parsing when protocol is native

* refactor: remove redundant non-null assertions

* fix: gemini maxOutputTokens and reasoning config (RooCodeInc#9375)

* fix: gemini maxOutputTokens and reasoning config

* test: tighten gemini reasoning typings

* fix: Update tools to return structured JSON for native protocol (RooCodeInc#9373)

* feat: add toolProtocol property to PostHog tool usage telemetry (RooCodeInc#9374)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: Include nativeArgs in tool repetition detection (RooCodeInc#9377)

* fix: Include nativeArgs in tool repetition detection

Fixes false positive 'stuck in a loop' error for native protocol tools
like read_file that store parameters in nativeArgs instead of params.

Previously, the ToolRepetitionDetector only compared the params object,
which was empty for native protocol tools. This caused all read_file
calls to appear identical, triggering false loop detection even when
reading different files.

Changes:
- Updated serializeToolUse() to include nativeArgs in comparison
- Added comprehensive tests for native protocol scenarios
- Maintains backward compatibility with XML protocol tools

Closes: Issue reported in Discord about read_file loop detection

* Try to use safe-stable-stringify in the tool repetition detector

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Fix Gemini thought signature validation and token counting errors (RooCodeInc#9380)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release v3.33.1 (RooCodeInc#9383)

* Changeset version bump (RooCodeInc#9384)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve user images in native tool call results (RooCodeInc#9401)

* feat: migrate PostHog client to ph.roocode.com (RooCodeInc#9402)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: enable native tool calling for gemini provider (RooCodeInc#9343)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add a RCC credit balance display (RooCodeInc#9386)

* Add a RCC credit balance display

* Replace the provider docs with the balance when logged in

* PR feedback

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* perf: reduce excessive getModel() calls & implement disk cache fallback (RooCodeInc#9410)

* Show zero price for free models (RooCodeInc#9419)

* Release v3.33.2 (RooCodeInc#9420)

* Changeset version bump (RooCodeInc#9421)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Improve read_file tool description with examples (RooCodeInc#9422)

* Improve read_file tool description with examples

- Add explicit JSON structure documentation
- Include three concrete examples (single file, with line ranges, multiple files)
- Clarify that 'path' is required and 'line_ranges' is optional
- Better explain line range format (1-based inclusive)

This addresses agent confusion by providing clear examples similar to the XML tool definition.

* Make read_file tool dynamic based on partialReadsEnabled setting

- Convert read_file from static export to createReadFileTool() factory function
- Add getNativeTools() function that accepts partialReadsEnabled parameter
- Create buildNativeToolsArray() helper to encapsulate tool building logic
- Update Task.ts to build native tools dynamically using maxReadFileLine setting
- When partialReadsEnabled is false, line_ranges parameter is excluded from schema
- Examples and descriptions adjust based on whether line ranges are supported

This matches the behavior of the XML tool definition which dynamically adjusts
its documentation based on settings, reducing confusion for agents.

* Fix Marketplace crash by removing wildcard activation event (RooCodeInc#9423)

* Revert "Fix Marketplace crash by removing wildcard activation event" (RooCodeInc#9432)

* Fix OpenAI Native parallel tool calls for native protocol (RooCodeInc#9433)

Fixes an issue where using the OpenAI Native provider together with Native Tool Calling could cause OpenAI’s Responses API to fail with errors like:

* feat: add Google Gemini 3 Pro Image Preview to image generation models (RooCodeInc#9440)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: prevent duplicate environment_details when resuming cancelled tasks (RooCodeInc#9442)

- Filter out complete environment_details blocks before appending fresh ones
- Check for both opening and closing tags to ensure we're matching complete blocks
- Prevents stale environment data from being kept during task resume
- Add tests to verify deduplication logic and edge cases

* Update glob to ^11.1.0 (RooCodeInc#9449)

* chore: update tar-fs to 3.1.1 via pnpm override (RooCodeInc#9450)

Co-authored-by: Roo Code <roomote@roocode.com>

* Store reasoning in conversation history for all providers (RooCodeInc#9451)

* Fix preserveReasoning flag to control API reasoning inclusion (RooCodeInc#9453)

* feat: store reasoning in conversation history for all providers

* refactor: address review feedback

- Move comments inside else block
- Combine reasoning checks into single if block
- Make comments more concise

* refactor: make comments more concise

* Fix preserveReasoning flag to control API reasoning inclusion

Changes:
1. Removed hardcoded <think> tag logic in streaming
   - Previously hardcoded reasoning into assistant message text
   - Now passes reasoning to addToApiConversationHistory as parameter

2. Updated buildCleanConversationHistory to respect preserveReasoning flag
   - When preserveReasoning: true → reasoning block included in API requests
   - When preserveReasoning: false/undefined → reasoning stripped from API
   - Reasoning stored in history for all cases

3. Added temporary debug logs to base-openai-compatible-provider.ts
   - Shows preserveReasoning flag value
   - Logs reasoning blocks in incoming messages
   - Logs <think> tags in converted messages sent to API

* Fix: Use api.getModel() directly instead of cachedStreamingModel

Addresses review comment: cachedStreamingModel is set during streaming but
buildCleanConversationHistory is called before streaming starts. Using the
cached value could cause stale model info when switching models between requests.

Now directly uses this.api.getModel().info.preserveReasoning to ensure we
always check the current model's flag, not a potentially stale cached value.

* Clean up comments in Task.ts

Removed outdated comment regarding model's preserveReasoning flag.

* fix: remove unnecessary reasoningBlock variable in task reasoning logic

* fix: send tool_result blocks for skipped tools in native protocol (RooCodeInc#9457)

* fix: improve markdown formatting and add reasoning support (RooCodeInc#9458)

* feat: implement Minimax as Anthropic-compatible provider (RooCodeInc#9455)

* fix: improve search and replace symbol parsing (RooCodeInc#9456)

* chore: add changeset for v3.33.3 (RooCodeInc#9459)

* Changeset version bump (RooCodeInc#9460)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(terminal): add inline shell integration with user input support

* Release: v1.87.0 (RooCodeInc#9477)

* refactor(terminal): remove inline shell integration callback and improve terminal process handling

* fix: add fallback to yield tool calls regardless of finish_reason (RooCodeInc#9476)

* Improvements to base openai compatible (RooCodeInc#9462)

Co-authored-by: Roo Code <roomote@roocode.com>

* Browser Use 2.0 (RooCodeInc#8941)

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

* fix: resolve apply_diff performance regression from PR RooCodeInc#9456 (RooCodeInc#9474)

* fix: implement model cache refresh to prevent stale disk cache (RooCodeInc#9478)

* fix: Make cancel button immediately responsive during streaming (RooCodeInc#9448)

* Test a provider-oriented welcome screen (RooCodeInc#9484)

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

* (feat): Add Baseten Provider (RooCodeInc#9461)

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

* fix: copy model-level capabilities to OpenRouter endpoint models (RooCodeInc#9483)

* Pin the Roo provider to the top of the list (RooCodeInc#9485)

* Wait to experiment until state is hydrated (RooCodeInc#9488)

* Change baseten default model to glm for now (RooCodeInc#9489)

* Revert "Wait to experiment until state is hydrated" (RooCodeInc#9491)

* Try to fix build (RooCodeInc#9490)

* Update webview-ui Vite config (RooCodeInc#9493)

* Enhance native tool descriptions with examples and clarifications (RooCodeInc#9486)

* Revert "Revert "Wait to experiment until state is hydrated"" (RooCodeInc#9494)

* chore: add changeset and announcement for v3.34.0 (RooCodeInc#9495)

* Changeset version bump (RooCodeInc#9496)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Enable the Roo Code Cloud provider in evals (RooCodeInc#9492)

* Show the prompt for image gen (RooCodeInc#9505)

* feat(chat): conditionally render UpdateTodoListToolBlock based on alwaysAllowUpdateTodoList flag

* fix(web-evals): update checkbox handler in new-run component

* Remove double todo list (RooCodeInc#9517)

* Track cloud synced messages (RooCodeInc#9518)

* 3.34.1 (RooCodeInc#9522)

* Changeset version bump (RooCodeInc#9523)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: support reasoning_details format for Gemini 3 models (RooCodeInc#9506)

* feat: update Cerebras models (RooCodeInc#9527)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: ensure XML parser state matches tool protocol on config update (RooCodeInc#9535)

* fix: flush LiteLLM cache when credentials change on refresh (RooCodeInc#9536)

* Add Roo Code Cloud as an imagegen provider (RooCodeInc#9528)

* fix: gracefully skip unsupported content blocks in Gemini transformer (RooCodeInc#9537)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: add claude-opus-4.5 to OpenRouter prompt caching and reasoning budget models (RooCodeInc#9540)

* feat: add claude-opus-4.5 to Anthropic and Vertex providers (RooCodeInc#9541)

* Release v3.34.2 (RooCodeInc#9545)

* Changeset version bump (RooCodeInc#9546)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add support for Roo Code Cloud as an embeddings provider (RooCodeInc#9543)

* Switch from asdf to mise-en-place in bare-metal evals setup script (RooCodeInc#9548)

* feat: implement streaming for native tool calls (RooCodeInc#9542)

* Add Opus 4.5 to Claude Code provider (RooCodeInc#9560)

* Fix ask_followup_question streaming issue and add missing tool cases (RooCodeInc#9561)

* feat(auth): enhance login status logging and use dynamic plugin version

* refactor:  remove disable provider and add client id headers

* test(webview): remove disable  provider tests across multiple test files

* fix: enable caching for Opus 4.5 model (RooCodeInc#9568)

Added claude-opus-4-5-20251101 to the cache control switch statements
to enable prompt caching, matching the behavior of other Claude models.

Fixes RooCodeInc#9567

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: Add contact links to About Roo Code settings page (RooCodeInc#9570)

* feat: add contact links to About settings page

* Tweaks

* i18n

* Update webview-ui/src/components/settings/__tests__/About.spec.tsx

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

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* feat: add Claude Opus 4.5 model to Bedrock provider (RooCodeInc#9572)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* chore: add changeset for v3.34.3 (RooCodeInc#9578)

* Changeset version bump (RooCodeInc#9579)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve dynamic MCP tool names in native mode API history (RooCodeInc#9559)

* fix: preserve tool_use blocks in summary message during condensing with native tools (RooCodeInc#9582)

* Add support for images api (RooCodeInc#9587)

* Make it clear that BFL Flux 2 is free (RooCodeInc#9588)

* Add BFL models to openrouter (RooCodeInc#9589)

* chore: add changeset for v3.34.4 (RooCodeInc#9590)

* Changeset version bump (RooCodeInc#9591)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: set native tools as default for minimax-m2 and claude-haiku-4.5 (RooCodeInc#9586)

* feat: enable multiple native tool calls per turn with failure guardrails (RooCodeInc#9273)

* feat: add Bedrock Opus 4.5 to global inference model list (RooCodeInc#9595)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: update API handler when toolProtocol changes (RooCodeInc#9599)

* Make single file read only apply to xml tools (RooCodeInc#9600)

* Revert "Add support for Roo Code Cloud as an embeddings provider" (RooCodeInc#9602)

* feat(web-evals): enhance dashboard with dynamic tool columns and UX improvements (RooCodeInc#9592)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix(webview): pass taskId to finishSubTask when canceling or deleting tasks

* chore: add changeset for v3.34.5 (RooCodeInc#9603)

* Changeset version bump (RooCodeInc#9604)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Feature/bedrock embeddings support (RooCodeInc#9475)

* feat: add AWS Bedrock support for codebase indexing

- Add bedrock as a new EmbedderProvider type
- Add AWS Bedrock embedding model profiles (titan-embed-text models)
- Create BedrockEmbedder class with support for Titan and Cohere models
- Add Bedrock configuration support to config manager and interfaces
- Update service factory to create BedrockEmbedder instances
- Add comprehensive tests for BedrockEmbedder
- Add localization strings for Bedrock support

Closes RooCodeInc#8658

* fix: add missing bedrockOptions to loadConfiguration return type

* Fix various issues that the original PR missed.

* Remove debug logs

* Rename AWS Bedrock -> Amazon Bedrock

* Remove some 'as any's

* Revert README changes

* Add translations

* More translations

* Remove leftover code from a debugging session.

* fix: add bedrock to codebaseIndexModelsSchema and update brace-expansion override

- Add bedrock provider to codebaseIndexModelsSchema type definition to fix empty model dropdown in UI
- Update pnpm override for brace-expansion from '>=2.0.2' to '^2.0.2' to resolve ESM/CommonJS compatibility issues

* Improvements to AWS Bedrock embeddings support

- Enhanced bedrock.ts embedder implementation
- Added comprehensive test coverage in bedrock.spec.ts
- Updated config-manager.ts for better Bedrock configuration handling
- Improved service-factory.ts integration
- Updated embeddingModels.ts with Bedrock models
- Enhanced CodeIndexPopover.tsx UI for Bedrock options
- Added auto-populate test for CodeIndexPopover
- Updated pnpm-lock.yaml dependencies

* Restore openrouter config

* Remove debug log

* Fix config-manager.spec.ts unit test.

* Add translations for "optional"

* Revert unnecessary change related to open ia embedder

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Smartsheet-JB-Brown <jb.brown@smartsheet.com>

* fix: restore content undefined check in WriteToFileTool.handlePartial() (RooCodeInc#9614)

* fix: exclude access_mcp_resource tool when MCP has no resources (RooCodeInc#9615)

* fix: prevent model cache from persisting empty API responses (RooCodeInc#9623)

* fix: update default settings for inline terminal and codebase indexing (RooCodeInc#9622)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat(mistral): add native tool calling support (RooCodeInc#9625)

* feat: wire MULTIPLE_NATIVE_TOOL_CALLS experiment to OpenAI parallel_tool_calls (RooCodeInc#9621)

* feat(bedrock): allow global inference selection when cross-region is enabled (RooCodeInc#9616)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: defer new_task tool_result until subtask completes for native protocol (RooCodeInc#9628)

* fix: convert line_ranges strings to lineRanges objects in native tool calls (RooCodeInc#9627)

* fix: filter non-Anthropic content blocks before sending to Vertex API (RooCodeInc#9618)

* Add fine grained tool streaming for OpenRouter Anthropic (RooCodeInc#9629)

* Release v3.34.6 (RooCodeInc#9631)

* Changeset version bump (RooCodeInc#9632)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: OpenRouter GPT-5 strict schema validation for read_file tool (RooCodeInc#9633)

* fix: create parent directories early in write_to_file to prevent ENOENT errors (RooCodeInc#9640)

* Fix openrouter tool calls (RooCodeInc#9642)

* fix(claude-code): disable native tools and temperature support (RooCodeInc#9643)

* Enable native tool calling for z.ai (RooCodeInc#9645)

* Moonshot native tool call support (RooCodeInc#9646)

* Support native tools in the anthropic provider (RooCodeInc#9644)

Co-authored-by: Roo Code <roomote@roocode.com>

* Add 'taking you to cloud' screen after provider welcome (RooCodeInc#9652)

* chore: add changeset for v3.34.7 (RooCodeInc#9651)

* Changeset version bump (RooCodeInc#9654)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: race condition in new_task tool for native protocol (RooCodeInc#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.

* chore: add changeset for v3.34.8 (RooCodeInc#9657)

* Changeset version bump (RooCodeInc#9658)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: add model-specific tool customization via excludedTools and includedTools (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>

* feat(web-evals): add task log viewing, export failed logs, and new run options (RooCodeInc#9637)

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

* Metadata‑driven subtasks (no UI changes): automatic parent resume and single‑open safety (RooCodeInc#9090)

* feat: add search_and_replace tool for batch text replacements (RooCodeInc#9549)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* feat: enable native tool support for DeepSeek and Doubao models (RooCodeInc#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.

* feat: add native tool support to Requesty provider (RooCodeInc#9672)

- 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

* Include tool format in environment details (RooCodeInc#9661)

* feat(groq): enable native tool support for models that support function calling (RooCodeInc#9673)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: add native tools support for OpenAI-compatible providers (RooCodeInc#9676)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: enable native tool calls for Vertex Gemini models (RooCodeInc#9678)

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

* fix: display install count in millions instead of thousands (RooCodeInc#9677)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: add apply_patch native tool (RooCodeInc#9663)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* feat: add debug buttons to view API and UI history (RooCodeInc#9684)

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

* test(workflow): update test expectations after removing run_test functionality

---------

Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
Co-authored-by: Alex Ker <thealexker@gmail.com>
Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
Co-authored-by: Seb Duerr <sebastian.duerr@cerebras.net>
Co-authored-by: George Goranov <georgi.goranov@smartsheet.com>
Co-authored-by: Smartsheet-JB-Brown <jb.brown@smartsheet.com>
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Nov 30, 2025
* Release v3.32.0 (RooCodeInc#9264)

* Changeset version bump (RooCodeInc#9265)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* [FIX] Fix OpenAI Native handling of encrypted reasoning blocks to prevent error when condensing (RooCodeInc#9263)

* fix: prevent duplicate tool_result blocks in native protocol mode for 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.

* Fix duplicate tool blocks causing 'tool has already been used' error (RooCodeInc#9275)

* feat(openai-native): add abort controller for request cancellation (RooCodeInc#9276)

* Disable XML parser for native tool protocol (RooCodeInc#9277)

* Release v3.32.1 (RooCodeInc#9278)

* Changeset version bump (RooCodeInc#9280)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* refactor: centralize toolProtocol configuration checks (RooCodeInc#9279)

* 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 (RooCodeInc#9270)

* 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

* fix: prevent duplicate tool_result blocks in native tool protocol (RooCodeInc#9248)

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* Fix duplicate import (RooCodeInc#9281)

* chore(core): remove unused TelemetryEventName import

* feat: implement dynamic tool protocol resolution with proper precedence hierarchy (RooCodeInc#9286)

Co-authored-by: Roo Code <roomote@roocode.com>

* web: Roo Code Cloud Provider pricing page and changes elsewhere (RooCodeInc#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 <mrubens@users.noreply.github.com>

* feat(zgsm): add abort signal handling for streaming responses

* Move the native tool call toggle to experimental settings (RooCodeInc#9297)

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

* fix: Replace broken badgen.net badges with shields.io (RooCodeInc#9318)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: preserve tool blocks for native protocol in conversation history (RooCodeInc#9319)

* feat: add git status to environment details (RooCodeInc#9310)

* feat: Move Import/Export to Modes view toolbar (RooCodeInc#8686) Cleanup of Mode Edit view (RooCodeInc#9077)

* Add max git status files to evals settings (RooCodeInc#9322)

* Release: v1.86.0 (RooCodeInc#9323)

* fix: prevent infinite loop when attempt_completion succeeds (RooCodeInc#9325)

* feat: add tool protocol selector to advanced settings (RooCodeInc#9324)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Remove experimental setting for native tool calls (RooCodeInc#9333)

* Fix the type of the list files recursive parameter (RooCodeInc#9337)

* fix: use VSCode theme color for outline button borders (RooCodeInc#9336)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>

* feat: update cloud agent CTA to point to setup page (RooCodeInc#9338)

Co-authored-by: Roo Code <roomote@roocode.com>

* Improve Google Gemini defaults, temperature, and cost reporting (RooCodeInc#9327)

* fix: sync parser state with profile/model changes (RooCodeInc#9355)

* feat: enable native tool calling for openai-native provider (RooCodeInc#9348)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add Gemini 3 Pro Preview model (RooCodeInc#9357)

* fix: pass tool protocol parameter to lineCountTruncationError (RooCodeInc#9358)

* Remove the Roo model defaults (RooCodeInc#9340)

* chore: add changeset and announcement for v3.33.0 (RooCodeInc#9360)

* Changeset version bump (RooCodeInc#9362)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: resolve native tool protocol race condition causing 400 errors (RooCodeInc#9363)

* Retry eval tasks if API instability detected (RooCodeInc#9365)

* fix: exclude XML tool examples from MODES section when native protocol enabled (RooCodeInc#9367)

* Add native tool calling support to OpenAI-compatible (RooCodeInc#9369)

* Add native tool calling support to OpenAI-compatible

* Fix OpenAI strict mode schema validation by adding converter methods to BaseProvider

- Add convertToolsForOpenAI() and convertToolSchemaForOpenAI() methods to BaseProvider
- These methods ensure all properties are in required array and convert nullable types
- Remove line_ranges from required array in read_file tool (converter handles it)
- Update OpenAiHandler and BaseOpenAiCompatibleProvider to use helper methods
- Eliminates code duplication across multiple tool usage sites
- Fixes: OpenAI completion error: 400 Invalid schema for function 'read_file'

---------

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: ensure no XML parsing when protocol is native (RooCodeInc#9371)

* fix: ensure no XML parsing when protocol is native

* refactor: remove redundant non-null assertions

* fix: gemini maxOutputTokens and reasoning config (RooCodeInc#9375)

* fix: gemini maxOutputTokens and reasoning config

* test: tighten gemini reasoning typings

* fix: Update tools to return structured JSON for native protocol (RooCodeInc#9373)

* feat: add toolProtocol property to PostHog tool usage telemetry (RooCodeInc#9374)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: Include nativeArgs in tool repetition detection (RooCodeInc#9377)

* fix: Include nativeArgs in tool repetition detection

Fixes false positive 'stuck in a loop' error for native protocol tools
like read_file that store parameters in nativeArgs instead of params.

Previously, the ToolRepetitionDetector only compared the params object,
which was empty for native protocol tools. This caused all read_file
calls to appear identical, triggering false loop detection even when
reading different files.

Changes:
- Updated serializeToolUse() to include nativeArgs in comparison
- Added comprehensive tests for native protocol scenarios
- Maintains backward compatibility with XML protocol tools

Closes: Issue reported in Discord about read_file loop detection

* Try to use safe-stable-stringify in the tool repetition detector

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Fix Gemini thought signature validation and token counting errors (RooCodeInc#9380)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release v3.33.1 (RooCodeInc#9383)

* Changeset version bump (RooCodeInc#9384)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve user images in native tool call results (RooCodeInc#9401)

* feat: migrate PostHog client to ph.roocode.com (RooCodeInc#9402)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: enable native tool calling for gemini provider (RooCodeInc#9343)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add a RCC credit balance display (RooCodeInc#9386)

* Add a RCC credit balance display

* Replace the provider docs with the balance when logged in

* PR feedback

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* perf: reduce excessive getModel() calls & implement disk cache fallback (RooCodeInc#9410)

* Show zero price for free models (RooCodeInc#9419)

* Release v3.33.2 (RooCodeInc#9420)

* Changeset version bump (RooCodeInc#9421)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Improve read_file tool description with examples (RooCodeInc#9422)

* Improve read_file tool description with examples

- Add explicit JSON structure documentation
- Include three concrete examples (single file, with line ranges, multiple files)
- Clarify that 'path' is required and 'line_ranges' is optional
- Better explain line range format (1-based inclusive)

This addresses agent confusion by providing clear examples similar to the XML tool definition.

* Make read_file tool dynamic based on partialReadsEnabled setting

- Convert read_file from static export to createReadFileTool() factory function
- Add getNativeTools() function that accepts partialReadsEnabled parameter
- Create buildNativeToolsArray() helper to encapsulate tool building logic
- Update Task.ts to build native tools dynamically using maxReadFileLine setting
- When partialReadsEnabled is false, line_ranges parameter is excluded from schema
- Examples and descriptions adjust based on whether line ranges are supported

This matches the behavior of the XML tool definition which dynamically adjusts
its documentation based on settings, reducing confusion for agents.

* Fix Marketplace crash by removing wildcard activation event (RooCodeInc#9423)

* Revert "Fix Marketplace crash by removing wildcard activation event" (RooCodeInc#9432)

* Fix OpenAI Native parallel tool calls for native protocol (RooCodeInc#9433)

Fixes an issue where using the OpenAI Native provider together with Native Tool Calling could cause OpenAI’s Responses API to fail with errors like:

* feat: add Google Gemini 3 Pro Image Preview to image generation models (RooCodeInc#9440)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: prevent duplicate environment_details when resuming cancelled tasks (RooCodeInc#9442)

- Filter out complete environment_details blocks before appending fresh ones
- Check for both opening and closing tags to ensure we're matching complete blocks
- Prevents stale environment data from being kept during task resume
- Add tests to verify deduplication logic and edge cases

* Update glob to ^11.1.0 (RooCodeInc#9449)

* chore: update tar-fs to 3.1.1 via pnpm override (RooCodeInc#9450)

Co-authored-by: Roo Code <roomote@roocode.com>

* Store reasoning in conversation history for all providers (RooCodeInc#9451)

* Fix preserveReasoning flag to control API reasoning inclusion (RooCodeInc#9453)

* feat: store reasoning in conversation history for all providers

* refactor: address review feedback

- Move comments inside else block
- Combine reasoning checks into single if block
- Make comments more concise

* refactor: make comments more concise

* Fix preserveReasoning flag to control API reasoning inclusion

Changes:
1. Removed hardcoded <think> tag logic in streaming
   - Previously hardcoded reasoning into assistant message text
   - Now passes reasoning to addToApiConversationHistory as parameter

2. Updated buildCleanConversationHistory to respect preserveReasoning flag
   - When preserveReasoning: true → reasoning block included in API requests
   - When preserveReasoning: false/undefined → reasoning stripped from API
   - Reasoning stored in history for all cases

3. Added temporary debug logs to base-openai-compatible-provider.ts
   - Shows preserveReasoning flag value
   - Logs reasoning blocks in incoming messages
   - Logs <think> tags in converted messages sent to API

* Fix: Use api.getModel() directly instead of cachedStreamingModel

Addresses review comment: cachedStreamingModel is set during streaming but
buildCleanConversationHistory is called before streaming starts. Using the
cached value could cause stale model info when switching models between requests.

Now directly uses this.api.getModel().info.preserveReasoning to ensure we
always check the current model's flag, not a potentially stale cached value.

* Clean up comments in Task.ts

Removed outdated comment regarding model's preserveReasoning flag.

* fix: remove unnecessary reasoningBlock variable in task reasoning logic

* fix: send tool_result blocks for skipped tools in native protocol (RooCodeInc#9457)

* fix: improve markdown formatting and add reasoning support (RooCodeInc#9458)

* feat: implement Minimax as Anthropic-compatible provider (RooCodeInc#9455)

* fix: improve search and replace symbol parsing (RooCodeInc#9456)

* chore: add changeset for v3.33.3 (RooCodeInc#9459)

* Changeset version bump (RooCodeInc#9460)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(terminal): add inline shell integration with user input support

* Release: v1.87.0 (RooCodeInc#9477)

* refactor(terminal): remove inline shell integration callback and improve terminal process handling

* fix: add fallback to yield tool calls regardless of finish_reason (RooCodeInc#9476)

* Improvements to base openai compatible (RooCodeInc#9462)

Co-authored-by: Roo Code <roomote@roocode.com>

* Browser Use 2.0 (RooCodeInc#8941)

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

* fix: resolve apply_diff performance regression from PR RooCodeInc#9456 (RooCodeInc#9474)

* fix: implement model cache refresh to prevent stale disk cache (RooCodeInc#9478)

* fix: Make cancel button immediately responsive during streaming (RooCodeInc#9448)

* Test a provider-oriented welcome screen (RooCodeInc#9484)

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

* (feat): Add Baseten Provider (RooCodeInc#9461)

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

* fix: copy model-level capabilities to OpenRouter endpoint models (RooCodeInc#9483)

* Pin the Roo provider to the top of the list (RooCodeInc#9485)

* Wait to experiment until state is hydrated (RooCodeInc#9488)

* Change baseten default model to glm for now (RooCodeInc#9489)

* Revert "Wait to experiment until state is hydrated" (RooCodeInc#9491)

* Try to fix build (RooCodeInc#9490)

* Update webview-ui Vite config (RooCodeInc#9493)

* Enhance native tool descriptions with examples and clarifications (RooCodeInc#9486)

* Revert "Revert "Wait to experiment until state is hydrated"" (RooCodeInc#9494)

* chore: add changeset and announcement for v3.34.0 (RooCodeInc#9495)

* Changeset version bump (RooCodeInc#9496)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Enable the Roo Code Cloud provider in evals (RooCodeInc#9492)

* Show the prompt for image gen (RooCodeInc#9505)

* feat(chat): conditionally render UpdateTodoListToolBlock based on alwaysAllowUpdateTodoList flag

* fix(web-evals): update checkbox handler in new-run component

* Remove double todo list (RooCodeInc#9517)

* Track cloud synced messages (RooCodeInc#9518)

* 3.34.1 (RooCodeInc#9522)

* Changeset version bump (RooCodeInc#9523)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: support reasoning_details format for Gemini 3 models (RooCodeInc#9506)

* feat: update Cerebras models (RooCodeInc#9527)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: ensure XML parser state matches tool protocol on config update (RooCodeInc#9535)

* fix: flush LiteLLM cache when credentials change on refresh (RooCodeInc#9536)

* Add Roo Code Cloud as an imagegen provider (RooCodeInc#9528)

* fix: gracefully skip unsupported content blocks in Gemini transformer (RooCodeInc#9537)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: add claude-opus-4.5 to OpenRouter prompt caching and reasoning budget models (RooCodeInc#9540)

* feat: add claude-opus-4.5 to Anthropic and Vertex providers (RooCodeInc#9541)

* Release v3.34.2 (RooCodeInc#9545)

* Changeset version bump (RooCodeInc#9546)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add support for Roo Code Cloud as an embeddings provider (RooCodeInc#9543)

* Switch from asdf to mise-en-place in bare-metal evals setup script (RooCodeInc#9548)

* feat: implement streaming for native tool calls (RooCodeInc#9542)

* Add Opus 4.5 to Claude Code provider (RooCodeInc#9560)

* Fix ask_followup_question streaming issue and add missing tool cases (RooCodeInc#9561)

* feat(auth): enhance login status logging and use dynamic plugin version

* refactor:  remove disable provider and add client id headers

* test(webview): remove disable  provider tests across multiple test files

* fix: enable caching for Opus 4.5 model (RooCodeInc#9568)

Added claude-opus-4-5-20251101 to the cache control switch statements
to enable prompt caching, matching the behavior of other Claude models.

Fixes RooCodeInc#9567

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: Add contact links to About Roo Code settings page (RooCodeInc#9570)

* feat: add contact links to About settings page

* Tweaks

* i18n

* Update webview-ui/src/components/settings/__tests__/About.spec.tsx

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

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* feat: add Claude Opus 4.5 model to Bedrock provider (RooCodeInc#9572)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* chore: add changeset for v3.34.3 (RooCodeInc#9578)

* Changeset version bump (RooCodeInc#9579)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve dynamic MCP tool names in native mode API history (RooCodeInc#9559)

* fix: preserve tool_use blocks in summary message during condensing with native tools (RooCodeInc#9582)

* Add support for images api (RooCodeInc#9587)

* Make it clear that BFL Flux 2 is free (RooCodeInc#9588)

* Add BFL models to openrouter (RooCodeInc#9589)

* chore: add changeset for v3.34.4 (RooCodeInc#9590)

* Changeset version bump (RooCodeInc#9591)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: set native tools as default for minimax-m2 and claude-haiku-4.5 (RooCodeInc#9586)

* feat: enable multiple native tool calls per turn with failure guardrails (RooCodeInc#9273)

* feat: add Bedrock Opus 4.5 to global inference model list (RooCodeInc#9595)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: update API handler when toolProtocol changes (RooCodeInc#9599)

* Make single file read only apply to xml tools (RooCodeInc#9600)

* Revert "Add support for Roo Code Cloud as an embeddings provider" (RooCodeInc#9602)

* feat(web-evals): enhance dashboard with dynamic tool columns and UX improvements (RooCodeInc#9592)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix(webview): pass taskId to finishSubTask when canceling or deleting tasks

* chore: add changeset for v3.34.5 (RooCodeInc#9603)

* Changeset version bump (RooCodeInc#9604)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Feature/bedrock embeddings support (RooCodeInc#9475)

* feat: add AWS Bedrock support for codebase indexing

- Add bedrock as a new EmbedderProvider type
- Add AWS Bedrock embedding model profiles (titan-embed-text models)
- Create BedrockEmbedder class with support for Titan and Cohere models
- Add Bedrock configuration support to config manager and interfaces
- Update service factory to create BedrockEmbedder instances
- Add comprehensive tests for BedrockEmbedder
- Add localization strings for Bedrock support

Closes RooCodeInc#8658

* fix: add missing bedrockOptions to loadConfiguration return type

* Fix various issues that the original PR missed.

* Remove debug logs

* Rename AWS Bedrock -> Amazon Bedrock

* Remove some 'as any's

* Revert README changes

* Add translations

* More translations

* Remove leftover code from a debugging session.

* fix: add bedrock to codebaseIndexModelsSchema and update brace-expansion override

- Add bedrock provider to codebaseIndexModelsSchema type definition to fix empty model dropdown in UI
- Update pnpm override for brace-expansion from '>=2.0.2' to '^2.0.2' to resolve ESM/CommonJS compatibility issues

* Improvements to AWS Bedrock embeddings support

- Enhanced bedrock.ts embedder implementation
- Added comprehensive test coverage in bedrock.spec.ts
- Updated config-manager.ts for better Bedrock configuration handling
- Improved service-factory.ts integration
- Updated embeddingModels.ts with Bedrock models
- Enhanced CodeIndexPopover.tsx UI for Bedrock options
- Added auto-populate test for CodeIndexPopover
- Updated pnpm-lock.yaml dependencies

* Restore openrouter config

* Remove debug log

* Fix config-manager.spec.ts unit test.

* Add translations for "optional"

* Revert unnecessary change related to open ia embedder

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Smartsheet-JB-Brown <jb.brown@smartsheet.com>

* fix: restore content undefined check in WriteToFileTool.handlePartial() (RooCodeInc#9614)

* fix: exclude access_mcp_resource tool when MCP has no resources (RooCodeInc#9615)

* fix: prevent model cache from persisting empty API responses (RooCodeInc#9623)

* fix: update default settings for inline terminal and codebase indexing (RooCodeInc#9622)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat(mistral): add native tool calling support (RooCodeInc#9625)

* feat: wire MULTIPLE_NATIVE_TOOL_CALLS experiment to OpenAI parallel_tool_calls (RooCodeInc#9621)

* feat(bedrock): allow global inference selection when cross-region is enabled (RooCodeInc#9616)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: defer new_task tool_result until subtask completes for native protocol (RooCodeInc#9628)

* fix: convert line_ranges strings to lineRanges objects in native tool calls (RooCodeInc#9627)

* fix: filter non-Anthropic content blocks before sending to Vertex API (RooCodeInc#9618)

* Add fine grained tool streaming for OpenRouter Anthropic (RooCodeInc#9629)

* Release v3.34.6 (RooCodeInc#9631)

* Changeset version bump (RooCodeInc#9632)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: OpenRouter GPT-5 strict schema validation for read_file tool (RooCodeInc#9633)

* fix: create parent directories early in write_to_file to prevent ENOENT errors (RooCodeInc#9640)

* Fix openrouter tool calls (RooCodeInc#9642)

* fix(claude-code): disable native tools and temperature support (RooCodeInc#9643)

* Enable native tool calling for z.ai (RooCodeInc#9645)

* Moonshot native tool call support (RooCodeInc#9646)

* Support native tools in the anthropic provider (RooCodeInc#9644)

Co-authored-by: Roo Code <roomote@roocode.com>

* Add 'taking you to cloud' screen after provider welcome (RooCodeInc#9652)

* chore: add changeset for v3.34.7 (RooCodeInc#9651)

* Changeset version bump (RooCodeInc#9654)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: race condition in new_task tool for native protocol (RooCodeInc#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.

* chore: add changeset for v3.34.8 (RooCodeInc#9657)

* Changeset version bump (RooCodeInc#9658)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: add model-specific tool customization via excludedTools and includedTools (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>

* feat(web-evals): add task log viewing, export failed logs, and new run options (RooCodeInc#9637)

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

* Metadata‑driven subtasks (no UI changes): automatic parent resume and single‑open safety (RooCodeInc#9090)

* feat: add search_and_replace tool for batch text replacements (RooCodeInc#9549)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* feat: enable native tool support for DeepSeek and Doubao models (RooCodeInc#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.

* feat: add native tool support to Requesty provider (RooCodeInc#9672)

- 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

* Include tool format in environment details (RooCodeInc#9661)

* feat(groq): enable native tool support for models that support function calling (RooCodeInc#9673)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: add native tools support for OpenAI-compatible providers (RooCodeInc#9676)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: enable native tool calls for Vertex Gemini models (RooCodeInc#9678)

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

* fix: display install count in millions instead of thousands (RooCodeInc#9677)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: add apply_patch native tool (RooCodeInc#9663)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* feat: add debug buttons to view API and UI history (RooCodeInc#9684)

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

* test(workflow): update test expectations after removing run_test functionality

* Add web-evals updates and kill run functionality (RooCodeInc#9681)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>

* Add Grok 4 Fast and Grok 4.1 Fast, plus xAI native tool calling (RooCodeInc#9690)

* Add Grok 4 Fast and Grok 4.1 Fast

* Add native tool calling support

* Add native tool calling for deepinfra (RooCodeInc#9691)

* fix(chat): correct message visibility condition filter

* fix(utils): wrap os-name call in safe fallback for zgsm OS detection

* refactor(core): clean up unused imports and improve file handling logic

* refactor: adjust file limits and multipliers

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
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: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
Co-authored-by: Alex Ker <thealexker@gmail.com>
Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
Co-authored-by: Seb Duerr <sebastian.duerr@cerebras.net>
Co-authored-by: George Goranov <georgi.goranov@smartsheet.com>
Co-authored-by: Smartsheet-JB-Brown <jb.brown@smartsheet.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
mini2s added a commit to zgsm-ai/costrict that referenced this pull request Dec 2, 2025
* [FIX] Fix OpenAI Native handling of encrypted reasoning blocks to prevent error when condensing (RooCodeInc#9263)

* fix: prevent duplicate tool_result blocks in native protocol mode for 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.

* Fix duplicate tool blocks causing 'tool has already been used' error (RooCodeInc#9275)

* feat(openai-native): add abort controller for request cancellation (RooCodeInc#9276)

* Disable XML parser for native tool protocol (RooCodeInc#9277)

* Release v3.32.1 (RooCodeInc#9278)

* Changeset version bump (RooCodeInc#9280)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* refactor: centralize toolProtocol configuration checks (RooCodeInc#9279)

* 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 (RooCodeInc#9270)

* 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

* fix: prevent duplicate tool_result blocks in native tool protocol (RooCodeInc#9248)

* Merge remote-tracking branch 'upstream/main' into roo-to-main

* Fix duplicate import (RooCodeInc#9281)

* chore(core): remove unused TelemetryEventName import

* feat: implement dynamic tool protocol resolution with proper precedence hierarchy (RooCodeInc#9286)

Co-authored-by: Roo Code <roomote@roocode.com>

* web: Roo Code Cloud Provider pricing page and changes elsewhere (RooCodeInc#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 <mrubens@users.noreply.github.com>

* feat(zgsm): add abort signal handling for streaming responses

* Move the native tool call toggle to experimental settings (RooCodeInc#9297)

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

* fix: Replace broken badgen.net badges with shields.io (RooCodeInc#9318)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: preserve tool blocks for native protocol in conversation history (RooCodeInc#9319)

* feat: add git status to environment details (RooCodeInc#9310)

* feat: Move Import/Export to Modes view toolbar (RooCodeInc#8686) Cleanup of Mode Edit view (RooCodeInc#9077)

* Add max git status files to evals settings (RooCodeInc#9322)

* Release: v1.86.0 (RooCodeInc#9323)

* fix: prevent infinite loop when attempt_completion succeeds (RooCodeInc#9325)

* feat: add tool protocol selector to advanced settings (RooCodeInc#9324)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Remove experimental setting for native tool calls (RooCodeInc#9333)

* Fix the type of the list files recursive parameter (RooCodeInc#9337)

* fix: use VSCode theme color for outline button borders (RooCodeInc#9336)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>

* feat: update cloud agent CTA to point to setup page (RooCodeInc#9338)

Co-authored-by: Roo Code <roomote@roocode.com>

* Improve Google Gemini defaults, temperature, and cost reporting (RooCodeInc#9327)

* fix: sync parser state with profile/model changes (RooCodeInc#9355)

* feat: enable native tool calling for openai-native provider (RooCodeInc#9348)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add Gemini 3 Pro Preview model (RooCodeInc#9357)

* fix: pass tool protocol parameter to lineCountTruncationError (RooCodeInc#9358)

* Remove the Roo model defaults (RooCodeInc#9340)

* chore: add changeset and announcement for v3.33.0 (RooCodeInc#9360)

* Changeset version bump (RooCodeInc#9362)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: resolve native tool protocol race condition causing 400 errors (RooCodeInc#9363)

* Retry eval tasks if API instability detected (RooCodeInc#9365)

* fix: exclude XML tool examples from MODES section when native protocol enabled (RooCodeInc#9367)

* Add native tool calling support to OpenAI-compatible (RooCodeInc#9369)

* Add native tool calling support to OpenAI-compatible

* Fix OpenAI strict mode schema validation by adding converter methods to BaseProvider

- Add convertToolsForOpenAI() and convertToolSchemaForOpenAI() methods to BaseProvider
- These methods ensure all properties are in required array and convert nullable types
- Remove line_ranges from required array in read_file tool (converter handles it)
- Update OpenAiHandler and BaseOpenAiCompatibleProvider to use helper methods
- Eliminates code duplication across multiple tool usage sites
- Fixes: OpenAI completion error: 400 Invalid schema for function 'read_file'

---------

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: ensure no XML parsing when protocol is native (RooCodeInc#9371)

* fix: ensure no XML parsing when protocol is native

* refactor: remove redundant non-null assertions

* fix: gemini maxOutputTokens and reasoning config (RooCodeInc#9375)

* fix: gemini maxOutputTokens and reasoning config

* test: tighten gemini reasoning typings

* fix: Update tools to return structured JSON for native protocol (RooCodeInc#9373)

* feat: add toolProtocol property to PostHog tool usage telemetry (RooCodeInc#9374)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* fix: Include nativeArgs in tool repetition detection (RooCodeInc#9377)

* fix: Include nativeArgs in tool repetition detection

Fixes false positive 'stuck in a loop' error for native protocol tools
like read_file that store parameters in nativeArgs instead of params.

Previously, the ToolRepetitionDetector only compared the params object,
which was empty for native protocol tools. This caused all read_file
calls to appear identical, triggering false loop detection even when
reading different files.

Changes:
- Updated serializeToolUse() to include nativeArgs in comparison
- Added comprehensive tests for native protocol scenarios
- Maintains backward compatibility with XML protocol tools

Closes: Issue reported in Discord about read_file loop detection

* Try to use safe-stable-stringify in the tool repetition detector

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Fix Gemini thought signature validation and token counting errors (RooCodeInc#9380)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Release v3.33.1 (RooCodeInc#9383)

* Changeset version bump (RooCodeInc#9384)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve user images in native tool call results (RooCodeInc#9401)

* feat: migrate PostHog client to ph.roocode.com (RooCodeInc#9402)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: enable native tool calling for gemini provider (RooCodeInc#9343)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* Add a RCC credit balance display (RooCodeInc#9386)

* Add a RCC credit balance display

* Replace the provider docs with the balance when logged in

* PR feedback

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* perf: reduce excessive getModel() calls & implement disk cache fallback (RooCodeInc#9410)

* Show zero price for free models (RooCodeInc#9419)

* Release v3.33.2 (RooCodeInc#9420)

* Changeset version bump (RooCodeInc#9421)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Improve read_file tool description with examples (RooCodeInc#9422)

* Improve read_file tool description with examples

- Add explicit JSON structure documentation
- Include three concrete examples (single file, with line ranges, multiple files)
- Clarify that 'path' is required and 'line_ranges' is optional
- Better explain line range format (1-based inclusive)

This addresses agent confusion by providing clear examples similar to the XML tool definition.

* Make read_file tool dynamic based on partialReadsEnabled setting

- Convert read_file from static export to createReadFileTool() factory function
- Add getNativeTools() function that accepts partialReadsEnabled parameter
- Create buildNativeToolsArray() helper to encapsulate tool building logic
- Update Task.ts to build native tools dynamically using maxReadFileLine setting
- When partialReadsEnabled is false, line_ranges parameter is excluded from schema
- Examples and descriptions adjust based on whether line ranges are supported

This matches the behavior of the XML tool definition which dynamically adjusts
its documentation based on settings, reducing confusion for agents.

* Fix Marketplace crash by removing wildcard activation event (RooCodeInc#9423)

* Revert "Fix Marketplace crash by removing wildcard activation event" (RooCodeInc#9432)

* Fix OpenAI Native parallel tool calls for native protocol (RooCodeInc#9433)

Fixes an issue where using the OpenAI Native provider together with Native Tool Calling could cause OpenAI’s Responses API to fail with errors like:

* feat: add Google Gemini 3 Pro Image Preview to image generation models (RooCodeInc#9440)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: prevent duplicate environment_details when resuming cancelled tasks (RooCodeInc#9442)

- Filter out complete environment_details blocks before appending fresh ones
- Check for both opening and closing tags to ensure we're matching complete blocks
- Prevents stale environment data from being kept during task resume
- Add tests to verify deduplication logic and edge cases

* Update glob to ^11.1.0 (RooCodeInc#9449)

* chore: update tar-fs to 3.1.1 via pnpm override (RooCodeInc#9450)

Co-authored-by: Roo Code <roomote@roocode.com>

* Store reasoning in conversation history for all providers (RooCodeInc#9451)

* Fix preserveReasoning flag to control API reasoning inclusion (RooCodeInc#9453)

* feat: store reasoning in conversation history for all providers

* refactor: address review feedback

- Move comments inside else block
- Combine reasoning checks into single if block
- Make comments more concise

* refactor: make comments more concise

* Fix preserveReasoning flag to control API reasoning inclusion

Changes:
1. Removed hardcoded <think> tag logic in streaming
   - Previously hardcoded reasoning into assistant message text
   - Now passes reasoning to addToApiConversationHistory as parameter

2. Updated buildCleanConversationHistory to respect preserveReasoning flag
   - When preserveReasoning: true → reasoning block included in API requests
   - When preserveReasoning: false/undefined → reasoning stripped from API
   - Reasoning stored in history for all cases

3. Added temporary debug logs to base-openai-compatible-provider.ts
   - Shows preserveReasoning flag value
   - Logs reasoning blocks in incoming messages
   - Logs <think> tags in converted messages sent to API

* Fix: Use api.getModel() directly instead of cachedStreamingModel

Addresses review comment: cachedStreamingModel is set during streaming but
buildCleanConversationHistory is called before streaming starts. Using the
cached value could cause stale model info when switching models between requests.

Now directly uses this.api.getModel().info.preserveReasoning to ensure we
always check the current model's flag, not a potentially stale cached value.

* Clean up comments in Task.ts

Removed outdated comment regarding model's preserveReasoning flag.

* fix: remove unnecessary reasoningBlock variable in task reasoning logic

* fix: send tool_result blocks for skipped tools in native protocol (RooCodeInc#9457)

* fix: improve markdown formatting and add reasoning support (RooCodeInc#9458)

* feat: implement Minimax as Anthropic-compatible provider (RooCodeInc#9455)

* fix: improve search and replace symbol parsing (RooCodeInc#9456)

* chore: add changeset for v3.33.3 (RooCodeInc#9459)

* Changeset version bump (RooCodeInc#9460)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat(terminal): add inline shell integration with user input support

* Release: v1.87.0 (RooCodeInc#9477)

* refactor(terminal): remove inline shell integration callback and improve terminal process handling

* fix: add fallback to yield tool calls regardless of finish_reason (RooCodeInc#9476)

* Improvements to base openai compatible (RooCodeInc#9462)

Co-authored-by: Roo Code <roomote@roocode.com>

* Browser Use 2.0 (RooCodeInc#8941)

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

* fix: resolve apply_diff performance regression from PR RooCodeInc#9456 (RooCodeInc#9474)

* fix: implement model cache refresh to prevent stale disk cache (RooCodeInc#9478)

* fix: Make cancel button immediately responsive during streaming (RooCodeInc#9448)

* Test a provider-oriented welcome screen (RooCodeInc#9484)

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

* (feat): Add Baseten Provider (RooCodeInc#9461)

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

* fix: copy model-level capabilities to OpenRouter endpoint models (RooCodeInc#9483)

* Pin the Roo provider to the top of the list (RooCodeInc#9485)

* Wait to experiment until state is hydrated (RooCodeInc#9488)

* Change baseten default model to glm for now (RooCodeInc#9489)

* Revert "Wait to experiment until state is hydrated" (RooCodeInc#9491)

* Try to fix build (RooCodeInc#9490)

* Update webview-ui Vite config (RooCodeInc#9493)

* Enhance native tool descriptions with examples and clarifications (RooCodeInc#9486)

* Revert "Revert "Wait to experiment until state is hydrated"" (RooCodeInc#9494)

* chore: add changeset and announcement for v3.34.0 (RooCodeInc#9495)

* Changeset version bump (RooCodeInc#9496)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Enable the Roo Code Cloud provider in evals (RooCodeInc#9492)

* Show the prompt for image gen (RooCodeInc#9505)

* feat(chat): conditionally render UpdateTodoListToolBlock based on alwaysAllowUpdateTodoList flag

* fix(web-evals): update checkbox handler in new-run component

* Remove double todo list (RooCodeInc#9517)

* Track cloud synced messages (RooCodeInc#9518)

* 3.34.1 (RooCodeInc#9522)

* Changeset version bump (RooCodeInc#9523)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: support reasoning_details format for Gemini 3 models (RooCodeInc#9506)

* feat: update Cerebras models (RooCodeInc#9527)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: ensure XML parser state matches tool protocol on config update (RooCodeInc#9535)

* fix: flush LiteLLM cache when credentials change on refresh (RooCodeInc#9536)

* Add Roo Code Cloud as an imagegen provider (RooCodeInc#9528)

* fix: gracefully skip unsupported content blocks in Gemini transformer (RooCodeInc#9537)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: add claude-opus-4.5 to OpenRouter prompt caching and reasoning budget models (RooCodeInc#9540)

* feat: add claude-opus-4.5 to Anthropic and Vertex providers (RooCodeInc#9541)

* Release v3.34.2 (RooCodeInc#9545)

* Changeset version bump (RooCodeInc#9546)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Add support for Roo Code Cloud as an embeddings provider (RooCodeInc#9543)

* Switch from asdf to mise-en-place in bare-metal evals setup script (RooCodeInc#9548)

* feat: implement streaming for native tool calls (RooCodeInc#9542)

* Add Opus 4.5 to Claude Code provider (RooCodeInc#9560)

* Fix ask_followup_question streaming issue and add missing tool cases (RooCodeInc#9561)

* feat(auth): enhance login status logging and use dynamic plugin version

* refactor:  remove disable provider and add client id headers

* test(webview): remove disable  provider tests across multiple test files

* fix: enable caching for Opus 4.5 model (RooCodeInc#9568)

Added claude-opus-4-5-20251101 to the cache control switch statements
to enable prompt caching, matching the behavior of other Claude models.

Fixes RooCodeInc#9567

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: Add contact links to About Roo Code settings page (RooCodeInc#9570)

* feat: add contact links to About settings page

* Tweaks

* i18n

* Update webview-ui/src/components/settings/__tests__/About.spec.tsx

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

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com>

* feat: add Claude Opus 4.5 model to Bedrock provider (RooCodeInc#9572)

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* chore: add changeset for v3.34.3 (RooCodeInc#9578)

* Changeset version bump (RooCodeInc#9579)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: preserve dynamic MCP tool names in native mode API history (RooCodeInc#9559)

* fix: preserve tool_use blocks in summary message during condensing with native tools (RooCodeInc#9582)

* Add support for images api (RooCodeInc#9587)

* Make it clear that BFL Flux 2 is free (RooCodeInc#9588)

* Add BFL models to openrouter (RooCodeInc#9589)

* chore: add changeset for v3.34.4 (RooCodeInc#9590)

* Changeset version bump (RooCodeInc#9591)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: set native tools as default for minimax-m2 and claude-haiku-4.5 (RooCodeInc#9586)

* feat: enable multiple native tool calls per turn with failure guardrails (RooCodeInc#9273)

* feat: add Bedrock Opus 4.5 to global inference model list (RooCodeInc#9595)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: update API handler when toolProtocol changes (RooCodeInc#9599)

* Make single file read only apply to xml tools (RooCodeInc#9600)

* Revert "Add support for Roo Code Cloud as an embeddings provider" (RooCodeInc#9602)

* feat(web-evals): enhance dashboard with dynamic tool columns and UX improvements (RooCodeInc#9592)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix(webview): pass taskId to finishSubTask when canceling or deleting tasks

* chore: add changeset for v3.34.5 (RooCodeInc#9603)

* Changeset version bump (RooCodeInc#9604)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* Feature/bedrock embeddings support (RooCodeInc#9475)

* feat: add AWS Bedrock support for codebase indexing

- Add bedrock as a new EmbedderProvider type
- Add AWS Bedrock embedding model profiles (titan-embed-text models)
- Create BedrockEmbedder class with support for Titan and Cohere models
- Add Bedrock configuration support to config manager and interfaces
- Update service factory to create BedrockEmbedder instances
- Add comprehensive tests for BedrockEmbedder
- Add localization strings for Bedrock support

Closes RooCodeInc#8658

* fix: add missing bedrockOptions to loadConfiguration return type

* Fix various issues that the original PR missed.

* Remove debug logs

* Rename AWS Bedrock -> Amazon Bedrock

* Remove some 'as any's

* Revert README changes

* Add translations

* More translations

* Remove leftover code from a debugging session.

* fix: add bedrock to codebaseIndexModelsSchema and update brace-expansion override

- Add bedrock provider to codebaseIndexModelsSchema type definition to fix empty model dropdown in UI
- Update pnpm override for brace-expansion from '>=2.0.2' to '^2.0.2' to resolve ESM/CommonJS compatibility issues

* Improvements to AWS Bedrock embeddings support

- Enhanced bedrock.ts embedder implementation
- Added comprehensive test coverage in bedrock.spec.ts
- Updated config-manager.ts for better Bedrock configuration handling
- Improved service-factory.ts integration
- Updated embeddingModels.ts with Bedrock models
- Enhanced CodeIndexPopover.tsx UI for Bedrock options
- Added auto-populate test for CodeIndexPopover
- Updated pnpm-lock.yaml dependencies

* Restore openrouter config

* Remove debug log

* Fix config-manager.spec.ts unit test.

* Add translations for "optional"

* Revert unnecessary change related to open ia embedder

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Smartsheet-JB-Brown <jb.brown@smartsheet.com>

* fix: restore content undefined check in WriteToFileTool.handlePartial() (RooCodeInc#9614)

* fix: exclude access_mcp_resource tool when MCP has no resources (RooCodeInc#9615)

* fix: prevent model cache from persisting empty API responses (RooCodeInc#9623)

* fix: update default settings for inline terminal and codebase indexing (RooCodeInc#9622)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat(mistral): add native tool calling support (RooCodeInc#9625)

* feat: wire MULTIPLE_NATIVE_TOOL_CALLS experiment to OpenAI parallel_tool_calls (RooCodeInc#9621)

* feat(bedrock): allow global inference selection when cross-region is enabled (RooCodeInc#9616)

Co-authored-by: Roo Code <roomote@roocode.com>

* fix: defer new_task tool_result until subtask completes for native protocol (RooCodeInc#9628)

* fix: convert line_ranges strings to lineRanges objects in native tool calls (RooCodeInc#9627)

* fix: filter non-Anthropic content blocks before sending to Vertex API (RooCodeInc#9618)

* Add fine grained tool streaming for OpenRouter Anthropic (RooCodeInc#9629)

* Release v3.34.6 (RooCodeInc#9631)

* Changeset version bump (RooCodeInc#9632)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: OpenRouter GPT-5 strict schema validation for read_file tool (RooCodeInc#9633)

* fix: create parent directories early in write_to_file to prevent ENOENT errors (RooCodeInc#9640)

* Fix openrouter tool calls (RooCodeInc#9642)

* fix(claude-code): disable native tools and temperature support (RooCodeInc#9643)

* Enable native tool calling for z.ai (RooCodeInc#9645)

* Moonshot native tool call support (RooCodeInc#9646)

* Support native tools in the anthropic provider (RooCodeInc#9644)

Co-authored-by: Roo Code <roomote@roocode.com>

* Add 'taking you to cloud' screen after provider welcome (RooCodeInc#9652)

* chore: add changeset for v3.34.7 (RooCodeInc#9651)

* Changeset version bump (RooCodeInc#9654)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* fix: race condition in new_task tool for native protocol (RooCodeInc#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.

* chore: add changeset for v3.34.8 (RooCodeInc#9657)

* Changeset version bump (RooCodeInc#9658)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: add model-specific tool customization via excludedTools and includedTools (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>

* feat(web-evals): add task log viewing, export failed logs, and new run options (RooCodeInc#9637)

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

* Metadata‑driven subtasks (no UI changes): automatic parent resume and single‑open safety (RooCodeInc#9090)

* feat: add search_and_replace tool for batch text replacements (RooCodeInc#9549)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* feat: enable native tool support for DeepSeek and Doubao models (RooCodeInc#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.

* feat: add native tool support to Requesty provider (RooCodeInc#9672)

- 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

* Include tool format in environment details (RooCodeInc#9661)

* feat(groq): enable native tool support for models that support function calling (RooCodeInc#9673)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: add native tools support for OpenAI-compatible providers (RooCodeInc#9676)

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>

* feat: enable native tool calls for Vertex Gemini models (RooCodeInc#9678)

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

* fix: display install count in millions instead of thousands (RooCodeInc#9677)

Co-authored-by: Roo Code <roomote@roocode.com>

* feat: add apply_patch native tool (RooCodeInc#9663)

Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>

* feat: add debug buttons to view API and UI history (RooCodeInc#9684)

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

* test(workflow): update test expectations after removing run_test functionality

* Add web-evals updates and kill run functionality (RooCodeInc#9681)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>

* Add Grok 4 Fast and Grok 4.1 Fast, plus xAI native tool calling (RooCodeInc#9690)

* Add Grok 4 Fast and Grok 4.1 Fast

* Add native tool calling support

* Add native tool calling for deepinfra (RooCodeInc#9691)

* fix(chat): correct message visibility condition filter

* fix(utils): wrap os-name call in safe fallback for zgsm OS detection

* refactor(core): clean up unused imports and improve file handling logic

* refactor: adjust file limits and multipliers

* Merge remote-tracking branch 'upstream/main' into roo-to-main

---------

Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
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: daniel-lxs <ricciodaniel98@gmail.com>
Co-authored-by: Chris Estreich <cestreich@gmail.com>
Co-authored-by: John Richmond <5629+jr@users.noreply.github.com>
Co-authored-by: Alex Ker <thealexker@gmail.com>
Co-authored-by: AlexKer <AlexKer@users.noreply.github.com>
Co-authored-by: Seb Duerr <sebastian.duerr@cerebras.net>
Co-authored-by: George Goranov <georgi.goranov@smartsheet.com>
Co-authored-by: Smartsheet-JB-Brown <jb.brown@smartsheet.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer PR - Needs Preliminary Review size:XXL This PR changes 1000+ lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants