Skip to content

Commit 27c114f

Browse files
mini2sgithub-actions[bot]mrubensroomote[bot]ellipsis-dev[bot]
authored
Roo to main (#661)
* Changeset version bump (RooCodeInc#8855) * changeset version bump * Update CHANGELOG for version 3.29.1 release Updated version number and added release notes for 3.29.1. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Rubens <[email protected]> * Merge remote-tracking branch 'upstream/main' into roo-to-main * Fix caching logic in Roo provider (RooCodeInc#8860) * fix: Remove specific Claude model version from settings descriptions (RooCodeInc#8437) Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Co-authored-by: Roo Code <[email protected]> Co-authored-by: daniel-lxs <[email protected]> Co-authored-by: Daniel <[email protected]> * feat: add LongCat-Flash-Thinking-FP8 models to Chutes AI provider (RooCodeInc#8426) Co-authored-by: Roo Code <[email protected]> Co-authored-by: daniel-lxs <[email protected]> * Make sure not to show prices for free models (RooCodeInc#8864) * chore: add changeset for v3.29.2 (RooCodeInc#8865) * Changeset version bump (RooCodeInc#8866) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Rubens <[email protected]> * fix: resolve checkpoint menu popover overflow (RooCodeInc#8867) * fix: process queued messages after context condensing completes (RooCodeInc#8478) Co-authored-by: Roo Code <[email protected]> * fix: use max_output_tokens when available in LiteLLM fetcher (RooCodeInc#8455) Co-authored-by: Roo Code <[email protected]> * Use monotonic clock for rate limiting (RooCodeInc#8456) * Fix LiteLLM test failures after merge (RooCodeInc#8870) * Use monotonic clock for rate limiting * Fix LiteLLM test failures after merge - Remove supportsComputerUse from LiteLLM implementation as it's no longer part of ModelInfo interface - Update test expectations to include cacheWritesPrice and cacheReadsPrice fields - Fix test for max_output_tokens preference functionality --------- Co-authored-by: Christiaan Arnoldus <[email protected]> * feat: add settings to configure time and cost in system prompt (RooCodeInc#8451) Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Co-authored-by: Roo Code <[email protected]> Co-authored-by: daniel-lxs <[email protected]> Co-authored-by: Daniel <[email protected]> * Enabled reasoning in Roo provider (RooCodeInc#8874) * feat: Add supportsReasoning property for Z.ai GLM binary thinking mode (RooCodeInc#8872) * feat: Add supportsReasoning property for Z.ai GLM binary thinking mode - Add supportsReasoning to ModelInfo schema for binary reasoning models - Update GLM-4.5 and GLM-4.6 models to use supportsReasoning: true - Implement thinking parameter support in ZAiHandler for Deep Thinking API - Update ThinkingBudget component to show simple toggle for supportsReasoning models - Add comprehensive tests for binary reasoning functionality Closes RooCodeInc#8465 * refactor: rename supportsReasoning to supportsReasoningBinary for clarity - Rename supportsReasoning -> supportsReasoningBinary in model schema - Update Z.AI GLM model configurations to use supportsReasoningBinary - Update Z.AI provider logic in createStream and completePrompt methods - Update ThinkingBudget UI component and tests - Update all test comments and expectations This change improves naming clarity by distinguishing between: - supportsReasoningBinary: Simple on/off reasoning toggle - supportsReasoningBudget: Advanced reasoning with token budget controls - supportsReasoningEffort: Advanced reasoning with effort levels * feat: update Gemini models with latest 09-2025 versions (RooCodeInc#8486) * feat: update Gemini models with latest 09-2025 versions - Add gemini-flash-latest and gemini-flash-lite-latest models - Add gemini-2.5-flash-preview-09-2025 and gemini-2.5-flash-lite-preview-09-2025 - Reorganize models list with most recent versions at the top - Maintain all existing models for backward compatibility Fixes RooCodeInc#8485 * fix: restore missing maxThinkingTokens and supportsReasoningBudget for gemini-2.5-pro-preview-03-25 Backward compatibility regression fix - these properties were accidentally removed during reorganization and are required to preserve existing reasoning-budget controls for users pinned to this model version. --------- Co-authored-by: Roo Code <[email protected]> Co-authored-by: daniel-lxs <[email protected]> * Focus textbox and add newlines after adding to context (RooCodeInc#8877) * chore: add changeset for v3.29.3 (RooCodeInc#8878) * Add how it works section to reviewer landing page (RooCodeInc#8884) * Add exponential backoff for mid-stream retry failures (RooCodeInc#8888) * Add exponential backoff for mid-stream retry failures - Extend StackItem with retryAttempt counter - Extract shared backoffAndAnnounce helper for consistent retry UX - Apply exponential backoff to mid-stream failures when auto-approval enabled - Add debug throw for testing mid-stream retry path * Add abort check in retry countdown loop Allows early exit from exponential backoff if task is cancelled during delay * Changeset version bump (RooCodeInc#8879) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Rubens <[email protected]> * fix: auto-sync enableReasoningEffort with reasoning dropdown selection (RooCodeInc#8890) * Prevent a noisy cloud agent exception (RooCodeInc#8577) * fix(modes): custom modes under custom path not showing (RooCodeInc#8499) * docs(vscode-lm): clarify VS Code LM API integration warning (RooCodeInc#8493) * docs(vscode-lm): clarify VS Code LM API integration blurb, provider wording, and error guidance * fix(vscode-lm): update settings UI warning; revert package description change * Restored * restored * i18n(vscode-lm): unify vscodeLmWarning text across all locales * i18n(vscode-lm): translate vscodeLmWarning across locales * fix: prevent MCP server restart when toggling tool permissions (RooCodeInc#8633) * fix: prevent MCP server restart when toggling tool permissions Add isProgrammaticUpdate flag to distinguish between programmatic config updates and user-initiated file changes. Skip file watcher processing during programmatic updates to prevent unnecessary server restarts. * fix(mcp): prevent server reconnection when toggling disabled state Fixed bug where MCP servers would reconnect instead of staying disabled when toggled off. The issue was that toggleServerDisabled() used stale in-memory config instead of reading the fresh config from disk after writing the disabled flag. Changes: Added readServerConfigFromFile() helper to read and validate server config from disk Updated disable path to read fresh config before calling connectToServer() Updated enable path to read fresh config before calling connectToServer() This ensures the disabled: true flag is properly read, causing connectToServer() to create a disabled placeholder connection instead of actually connecting the server. + refactor(mcp): use safeWriteJson for atomic config writes Replace JSON.stringify + fs.writeFile with safeWriteJson in McpHub.ts to prevent data corruption through atomic writes with file locking. * fix(mcp): prevent race condition in isProgrammaticUpdate flag Replace multiple independent reset timers with a single timer that gets cleared and rescheduled on each programmatic config update. This prevents the flag from being reset prematurely when multiple rapid updates occur, which could cause unwanted server restarts during the file watcher's debounce period. + fix(mcp): ensure isProgrammaticUpdate flag cleanup with try-finally Wrap safeWriteJson() calls in try-finally blocks to guarantee the isProgrammaticUpdate flag is always reset, even if the write operation fails. This prevents the flag from being stuck at true indefinitely, which would cause subsequent user-initiated config changes to be silently ignored. * docs(readme): update readme images and image compression * docs: replace inline base64 images with image file references * Merge remote-tracking branch 'upstream/main' into roo-to-main * feat(terminal): refactor execa command execution for shell handling * Feat: Add Minimax Provider (fixes RooCodeInc#8818) (RooCodeInc#8820) Co-authored-by: xiaose <[email protected]> Co-authored-by: Matt Rubens <[email protected]> * Release v3.29.4 (RooCodeInc#8906) * fix: Gate auth-driven Roo model refresh to active provider only (RooCodeInc#8915) * feat: add zai-glm-4.6 model to Cerebras and set gpt-oss-120b as default (RooCodeInc#8920) * feat: add zai-glm-4.6 model and update gpt-oss-120b for Cerebras - Add zai-glm-4.6 with 128K context window and 40K max tokens - Set zai-glm-4.6 as default Cerebras model - Update gpt-oss-120b to 128K context and 40K max tokens * feat: add zai-glm-4.6 model to Cerebras provider - Add zai-glm-4.6 with 128K context window and 40K max tokens - Set zai-glm-4.6 as default Cerebras model - Model provides ~2000 tokens/s for general-purpose tasks * add [SOON TO BE DEPRECATED] warning for Q3C * chore: set gpt-oss-120b as default Cerebras model * Fix cerebras test: update expected default model to gpt-oss-120b * Apply suggestion from @mrubens Co-authored-by: Matt Rubens <[email protected]> --------- Co-authored-by: kevint-cerebras <[email protected]> Co-authored-by: Matt Rubens <[email protected]> * roo provider: update session token on every request (RooCodeInc#8923) * roo provider: update session token on every request * Cleanup: remove unused imports * Also refresh token before completePrompt() * feat: add We're hiring link to announcement modal (RooCodeInc#8931) Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Co-authored-by: Roo Code <[email protected]> Co-authored-by: Matt Rubens <[email protected]> * Fix: Enhanced codebase index recovery and reuse ('Start Indexing' button now reuses existing Qdrant index) (RooCodeInc#8588) Co-authored-by: daniel-lxs <[email protected]> * fix: make code index initialization non-blocking at activation (RooCodeInc#8933) * fix(context): truncate type definition to match max read line (RooCodeInc#8509) Co-authored-by: daniel-lxs <[email protected]> * fix: prevent infinite loop when canceling during auto-retry (RooCodeInc#8902) * fix: prevent infinite loop when canceling during auto-retry - Add abort check after backoffAndAnnounce in first-chunk retry logic - Add abort check after backoffAndAnnounce in mid-stream retry logic - Properly handle task abortion to break retry loops Fixes RooCodeInc#8901 * docs: add critical comments explaining abort checks - Document the importance of abort checks after backoff - Explain how these checks prevent infinite loops - Add context for future maintainability --------- Co-authored-by: Roo Code <[email protected]> * feat: rename MCP Errors tab to Logs for mixed-level messages (RooCodeInc#8894) - Update McpView.tsx to use "logs" tab ID instead of "errors" - Rename translation key from tabs.errors to tabs.logs in all locales - Change empty state message from "No errors found" to "No logs yet" This better reflects that the tab shows all server messages (info, warnings, errors), not just errors. Fixes RooCodeInc#8893 Co-authored-by: Roo Code <[email protected]> * feat: improve @ file search for large projects (RooCodeInc#8805) * feat: improve @ file search for large projects - Increase default file limit from 5,000 to 10,000 (configurable up to 500,000) - Respect VSCode search settings (useIgnoreFiles, useGlobalIgnoreFiles, useParentIgnoreFiles) - Add 'maximumIndexedFilesForFileSearch' configuration setting - Add tests for new functionality Conservative default of 10k keeps memory usage low while still providing 2x improvement. Users with large projects can opt-in to higher limits (up to 500k). This is a simplified alternative to PR RooCodeInc#5723 that solves the same problem without the complexity of caching. Ripgrep is already fast enough for 10k+ files, and the benefit of caching doesn't justify 2,200+ lines of additional code and maintenance burden. Fixes RooCodeInc#5721 * fix: add missing translations for maximumIndexedFilesForFileSearch setting * test: improve file-search tests to verify configuration behavior * fix: remove search_and_replace tool from codebase (RooCodeInc#8892) Co-authored-by: Roo Code <[email protected]> Co-authored-by: daniel-lxs <[email protected]> Co-authored-by: Hannes Rudolph <[email protected]> * Release v3.29.5 (RooCodeInc#8942) * Changeset version bump (RooCodeInc#8907) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Rubens <[email protected]> * Fix cost and token tracking between provider styles (RooCodeInc#8954) * web: Attempt at compliant, cookie-less anonymous tracking for the website (RooCodeInc#8957) * Merge remote-tracking branch 'upstream/main' into roo-to-main * fix: add keyword index for type field to fix Qdrant codebase_search error (RooCodeInc#8964) Co-authored-by: Roo Code <[email protected]> * chore: add changeset for v3.29.5 (RooCodeInc#8967) * Changeset version bump (RooCodeInc#8968) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Rubens <[email protected]> * Capture the reasoning content in base-openai-compatible for GLM 4.6 (RooCodeInc#8976) * feat: optimize router model fetching with single-provider filtering (RooCodeInc#8956) * fix: prevent message loss during queue drain race condition (RooCodeInc#8955) * fix: create new Requesty profile during OAuth (RooCodeInc#8699) Co-authored-by: John Costa <[email protected]> * feat: convert Chutes to dynamic/router provider (RooCodeInc#8980) * feat: convert Chutes to dynamic/router provider - Add chutes to dynamicProviders array in provider-settings - Add chutes entry to dynamicProviderExtras in api.ts - Create fetcher function for Chutes models API - Convert ChutesHandler to extend RouterProvider - Update tests to work with dynamic provider setup - Export chutesDefaultModelInfo for RouterProvider constructor * fix: address security and code quality issues from review - Fix potential API key leakage in error logging - Add temperature support check before setting temperature - Improve code consistency with RouterProvider patterns * fix: add chutes to routerModels initialization - Fix TypeScript error in webviewMessageHandler - Ensure chutes is included in RouterName Record type * Fixes * Support reasoning * Fix tests * Remove reasoning checkbox --------- Co-authored-by: Roo Code <[email protected]> Co-authored-by: Matt Rubens <[email protected]> * feat: add OpenRouter embedding provider support (RooCodeInc#8973) * feat: add OpenRouter embedding provider support Implement comprehensive OpenRouter embedding provider support for codebase indexing with the following features: - New OpenRouterEmbedder class with full API compatibility - Support for OpenRouter's OpenAI-compatible embedding endpoint - Rate limiting and retry logic with exponential backoff - Base64 embedding handling to bypass OpenAI package limitations - Global rate limit state management across embedder instances - Configuration updates for API key storage and provider selection - UI integration for OpenRouter provider settings - Comprehensive test suite with mocking - Model dimension support for OpenRouter's embedding models This adds OpenRouter as the 7th supported embedding provider alongside OpenAI, Ollama, OpenAI-compatible, Gemini, Mistral, and Vercel AI Gateway. * Add translation key * Fix mutex double release bug * Add translations * Add more translations * Fix failing tests * code-index(openrouter): fix HTTP-Referer header to RooCodeInc/Roo-Code; i18n: add and wire OpenRouter Code Index strings; test: assert default headers in embedder --------- Co-authored-by: daniel-lxs <[email protected]> * feat: add GLM-4.6 model to Fireworks provider (RooCodeInc#8754) Co-authored-by: Roo Code <[email protected]> * feat: add MiniMax M2 model to Fireworks.ai provider (RooCodeInc#8962) Co-authored-by: Roo Code <[email protected]> * Union a hard-coded list of chutes models with the dynamic list (RooCodeInc#8988) * Handle <think> tags in the base OpenAI-compatible provider (RooCodeInc#8989) * Don't output newline-only reasoning (RooCodeInc#8990) Co-authored-by: Roo Code <[email protected]> * feat: implement Google Consent Mode v2 with cookieless pings (RooCodeInc#8987) * feat: implement Google Consent Mode v2 with cookieless pings - Add consent defaults before gtag.js loads (required for Consent Mode v2) - Enable cookieless pings with url_passthrough for Google Ads - Implement consent update logic for all consent categories - Support both granted and denied consent states - Maintain backward compatibility with existing consent manager * fix: remove shouldLoad from useEffect dependency array to prevent re-initialization loop --------- Co-authored-by: Roo Code <[email protected]> * Terminal settings: Cleanup terminal settings tab and change default terminal to inline (RooCodeInc#8342) Co-authored-by: Copilot <[email protected]> * feat: add preserveReasoning flag to include reasoning in API history (RooCodeInc#8934) * fix: update terminal settings documentation link (RooCodeInc#8997) * refactor(terminal): simplify getTerminalByVSCETerminal method * fix: prevent UI flicker and enable resumption after task cancellation (RooCodeInc#8986) * docs: Update readme to link the new Custom Modes video (RooCodeInc#9000) Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Co-authored-by: Sannidhya <[email protected]> * feat(web): add /pr-fixer page and Cloud Agents footer (RooCodeInc#8996) Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Co-authored-by: Matt Rubens <[email protected]> Co-authored-by: roomote[bot] <219738659+roomote[bot]@users.noreply.github.com> Co-authored-by: Roo Code <[email protected]> Co-authored-by: Bruno Bergher <[email protected]> Co-authored-by: Bruno Bergher <[email protected]> * v3.29.6 (RooCodeInc#9004) * chore: add changeset for v3.30.0 (RooCodeInc#9006) * Changeset version bump (RooCodeInc#9005) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Chris Estreich <[email protected]> * 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 <[email protected]> * 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 <[email protected]> Co-authored-by: daniel-lxs <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * web: Agent Landing Page A/B testing toolkit (RooCodeInc#9018) Co-authored-by: Roo Code <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * feat: add MiniMax-M2-Stable model and enable prompt caching (RooCodeInc#9072) Co-authored-by: Roo Code <[email protected]> Co-authored-by: Daniel <[email protected]> * 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 <[email protected]> * Clarify: setting 0 disables Error & Repetition Limit (RooCodeInc#8965) Co-authored-by: Roo Code <[email protected]> Co-authored-by: daniel-lxs <[email protected]> * fix: use system role for OpenAI Compatible provider when streaming is disabled (RooCodeInc#8216) Co-authored-by: Roo Code <[email protected]> Co-authored-by: daniel-lxs <[email protected]> * 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 <[email protected]> Co-authored-by: heyseth <[email protected]> Co-authored-by: Roo Code <[email protected]> * fix: prevent notification sound on attempt_completion with queued messages (RooCodeInc#8540) Co-authored-by: Roo Code <[email protected]> * 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 <[email protected]> * fix: respect custom OpenRouter URL for all API operations (RooCodeInc#8951) Co-authored-by: Roo Code <[email protected]> * 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 <[email protected]> * fix: prevent context condensing on settings save when provider/model unchanged (RooCodeInc#9108) Co-authored-by: Matt Rubens <[email protected]> * 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 <[email protected]> * fix: improve mobile responsiveness of hero section on /reviewer page (RooCodeInc#9138) Co-authored-by: Roo Code <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * Changeset version bump (RooCodeInc#9154) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Rubens <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * [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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * fix: Replace broken badgen.net badges with shields.io (RooCodeInc#9318) Co-authored-by: Roo Code <[email protected]> * 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 <[email protected]> Co-authored-by: Matt Rubens <[email protected]> * Remove experimental setting for native tool calls (RooCodeInc#9333) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Rubens <[email protected]> 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 <[email protected]> Co-authored-by: daniel-lxs <[email protected]> Co-authored-by: Daniel <[email protected]> Co-authored-by: Christiaan Arnoldus <[email protected]> Co-authored-by: Chris Estreich <[email protected]> Co-authored-by: Dicha Zelianivan Arkana <[email protected]> Co-authored-by: Hannes Rudolph <[email protected]> Co-authored-by: Seth Miller <[email protected]> Co-authored-by: Maosghoul <[email protected]> Co-authored-by: xiaose <[email protected]> Co-authored-by: kevint-cerebras <[email protected]> Co-authored-by: John Richmond <[email protected]> Co-authored-by: Bruno Bergher <[email protected]> Co-authored-by: Thibault Jaigu <[email protected]> Co-authored-by: John Costa <[email protected]> Co-authored-by: David Markey <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: SannidhyaSah <[email protected]> Co-authored-by: Sannidhya <[email protected]> Co-authored-by: Bruno Bergher <[email protected]> Co-authored-by: Seb Duerr <[email protected]> Co-authored-by: dleffel <[email protected]> Co-authored-by: AJ Juaire <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent 324179a commit 27c114f

File tree

18 files changed

+181
-445
lines changed

18 files changed

+181
-445
lines changed

packages/types/src/experiment.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@ import type { Keys, Equals, AssertEqual } from "./type-fu.js"
77
*/
88

99
export const experimentIds = [
10+
"chatSearch",
11+
"alwaysIncludeFileDetails",
1012
"powerSteering",
1113
"multiFileApplyDiff",
1214
"preventFocusDisruption",
1315
"imageGeneration",
1416
"runSlashCommand",
15-
"chatSearch",
16-
"alwaysIncludeFileDetails",
17-
"nativeToolCalling",
1817
] as const
1918

2019
export const experimentIdsSchema = z.enum(experimentIds)
@@ -26,14 +25,13 @@ export type ExperimentId = z.infer<typeof experimentIdsSchema>
2625
*/
2726

2827
export const experimentsSchema = z.object({
28+
chatSearch: z.boolean().optional(),
29+
alwaysIncludeFileDetails: z.boolean().optional(),
2930
powerSteering: z.boolean().optional(),
3031
multiFileApplyDiff: z.boolean().optional(),
3132
preventFocusDisruption: z.boolean().optional(),
3233
imageGeneration: z.boolean().optional(),
3334
runSlashCommand: z.boolean().optional(),
34-
chatSearch: z.boolean().optional(),
35-
alwaysIncludeFileDetails: z.boolean().optional(),
36-
nativeToolCalling: z.boolean().optional(),
3735
})
3836

3937
export type Experiments = z.infer<typeof experimentsSchema>

src/core/assistant-message/presentAssistantMessage.ts

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,7 @@ export async function presentAssistantMessage(cline: Task) {
282282
let hasToolResult = false
283283

284284
// Check if we're using native tool protocol (do this once before defining pushToolResult)
285-
const state = await cline.providerRef.deref()?.getState()
286-
const toolProtocol = resolveToolProtocol(
287-
cline.apiConfiguration,
288-
cline.api.getModel().info,
289-
cline.apiConfiguration.apiProvider,
290-
state?.experiments,
291-
)
285+
const toolProtocol = resolveToolProtocol(cline.apiConfiguration, cline.api.getModel().info)
292286
const isNative = isNativeProtocol(toolProtocol)
293287
const toolCallId = (block as any).id
294288

@@ -531,13 +525,7 @@ export async function presentAssistantMessage(cline: Task) {
531525
await checkpointSaveAndMark(cline)
532526

533527
// Check if native protocol is enabled - if so, always use single-file class-based tool
534-
const state = await cline.providerRef.deref()?.getState()
535-
const applyDiffToolProtocol = resolveToolProtocol(
536-
cline.apiConfiguration,
537-
cline.api.getModel().info,
538-
cline.apiConfiguration.apiProvider,
539-
state?.experiments,
540-
)
528+
const applyDiffToolProtocol = resolveToolProtocol(cline.apiConfiguration, cline.api.getModel().info)
541529
if (isNativeProtocol(applyDiffToolProtocol)) {
542530
await applyDiffToolClass.handle(cline, block as ToolUse<"apply_diff">, {
543531
askApproval,

src/core/task/Task.ts

Lines changed: 11 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -428,12 +428,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
428428
// Initialize the assistant message parser only for XML protocol.
429429
// For native protocol, tool calls come as tool_call chunks, not XML.
430430
// experiments is always provided via TaskOptions (defaults to experimentDefault in provider)
431-
const toolProtocol = resolveToolProtocol(
432-
this.apiConfiguration,
433-
this.api.getModel().info,
434-
this.apiConfiguration.apiProvider,
435-
experimentsConfig,
436-
)
431+
const toolProtocol = resolveToolProtocol(this.apiConfiguration, this.api.getModel().info)
437432
this.assistantMessageParser = toolProtocol === "xml" ? new AssistantMessageParser() : undefined
438433

439434
this.messageQueueService = new MessageQueueService()
@@ -1347,12 +1342,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
13471342
)
13481343
const modelInfo = this.api.getModel().info
13491344
const state = await this.providerRef.deref()?.getState()
1350-
const toolProtocol = resolveToolProtocol(
1351-
this.apiConfiguration,
1352-
modelInfo,
1353-
this.apiConfiguration.apiProvider,
1354-
state?.experiments,
1355-
)
1345+
const toolProtocol = resolveToolProtocol(this.apiConfiguration, modelInfo)
13561346
return formatResponse.toolError(formatResponse.missingToolParameterError(paramName, toolProtocol))
13571347
}
13581348

@@ -1496,12 +1486,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
14961486
// conversations with tool uses and no tool schema.
14971487
// For native protocol, we preserve tool_use and tool_result blocks as they're expected by the API.
14981488
const state = await this.providerRef.deref()?.getState()
1499-
const protocol = resolveToolProtocol(
1500-
this.apiConfiguration,
1501-
this.api.getModel().info,
1502-
this.apiConfiguration.apiProvider,
1503-
state?.experiments,
1504-
)
1489+
const protocol = resolveToolProtocol(this.apiConfiguration, this.api.getModel().info)
15051490
const useNative = isNativeProtocol(protocol)
15061491

15071492
// Only convert tool blocks to text for XML protocol
@@ -1859,12 +1844,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
18591844
} else {
18601845
const modelInfo = this.api.getModel().info
18611846
const state = await this.providerRef.deref()?.getState()
1862-
const toolProtocol = resolveToolProtocol(
1863-
this.apiConfiguration,
1864-
modelInfo,
1865-
this.apiConfiguration.apiProvider,
1866-
state?.experiments,
1867-
)
1847+
const toolProtocol = resolveToolProtocol(this.apiConfiguration, modelInfo)
18681848
nextUserContent = [{ type: "text", text: formatResponse.noToolsUsed(toolProtocol) }]
18691849
this.consecutiveMistakeCount++
18701850
}
@@ -2549,12 +2529,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
25492529
// Check if we're using native protocol
25502530
const state = await this.providerRef.deref()?.getState()
25512531
const isNative = isNativeProtocol(
2552-
resolveToolProtocol(
2553-
this.apiConfiguration,
2554-
this.api.getModel().info,
2555-
this.apiConfiguration.apiProvider,
2556-
state?.experiments,
2557-
),
2532+
resolveToolProtocol(this.apiConfiguration, this.api.getModel().info),
25582533
)
25592534

25602535
if (isNative) {
@@ -2695,12 +2670,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
26952670
if (!didToolUse) {
26962671
const modelInfo = this.api.getModel().info
26972672
const state = await this.providerRef.deref()?.getState()
2698-
const toolProtocol = resolveToolProtocol(
2699-
this.apiConfiguration,
2700-
modelInfo,
2701-
this.apiConfiguration.apiProvider,
2702-
state?.experiments,
2703-
)
2673+
const toolProtocol = resolveToolProtocol(this.apiConfiguration, modelInfo)
27042674
this.userMessageContent.push({ type: "text", text: formatResponse.noToolsUsed(toolProtocol) })
27052675
this.consecutiveMistakeCount++
27062676
}
@@ -2731,14 +2701,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
27312701
// user messages (which would cause tool_result validation errors).
27322702
let state = await this.providerRef.deref()?.getState()
27332703
if (
2734-
isNativeProtocol(
2735-
resolveToolProtocol(
2736-
this.apiConfiguration,
2737-
this.api.getModel().info,
2738-
this.apiConfiguration.apiProvider,
2739-
state?.experiments,
2740-
),
2741-
) &&
2704+
isNativeProtocol(resolveToolProtocol(this.apiConfiguration, this.api.getModel().info)) &&
27422705
this.apiConversationHistory.length > 0
27432706
) {
27442707
const lastMessage = this.apiConversationHistory[this.apiConversationHistory.length - 1]
@@ -2805,14 +2768,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
28052768
// For native protocol, re-add the user message we removed
28062769
// Reuse the state variable from above
28072770
if (
2808-
isNativeProtocol(
2809-
resolveToolProtocol(
2810-
this.apiConfiguration,
2811-
this.api.getModel().info,
2812-
this.apiConfiguration.apiProvider,
2813-
state?.experiments,
2814-
),
2815-
)
2771+
isNativeProtocol(resolveToolProtocol(this.apiConfiguration, this.api.getModel().info))
28162772
) {
28172773
await this.addToApiConversationHistory({
28182774
role: "user",
@@ -2909,12 +2865,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
29092865
const canUseBrowserTool = modelSupportsBrowser && modeSupportsBrowser && (browserToolEnabled ?? true)
29102866

29112867
// Resolve the tool protocol based on profile, model, and provider settings
2912-
const toolProtocol = resolveToolProtocol(
2913-
apiConfiguration ?? this.apiConfiguration,
2914-
modelInfo,
2915-
(apiConfiguration ?? this.apiConfiguration)?.apiProvider,
2916-
experiments,
2917-
)
2868+
const toolProtocol = resolveToolProtocol(apiConfiguration ?? this.apiConfiguration, modelInfo)
29182869

29192870
return SYSTEM_PROMPT(
29202871
provider.context,
@@ -3025,7 +2976,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
30252976
apiConfiguration,
30262977
autoApprovalEnabled,
30272978
alwaysApproveResubmit,
3028-
requestDelaySeconds,
2979+
// requestDelaySeconds,
30292980
mode,
30302981
zgsmCodeMode,
30312982
autoCondenseContext = true,
@@ -3156,12 +3107,7 @@ export class Task extends EventEmitter<TaskEvents> implements TaskLike {
31563107
// 1. Tool protocol is set to NATIVE
31573108
// 2. Model supports native tools
31583109
const modelInfo = this.api.getModel().info
3159-
const toolProtocol = resolveToolProtocol(
3160-
this.apiConfiguration,
3161-
modelInfo,
3162-
this.apiConfiguration.apiProvider,
3163-
state?.experiments,
3164-
)
3110+
const toolProtocol = resolveToolProtocol(this.apiConfiguration, modelInfo)
31653111
const shouldIncludeTools = toolProtocol === TOOL_PROTOCOL.NATIVE && (modelInfo.supportsNativeTools ?? false)
31663112

31673113
// Build complete tools array: native tools + dynamic MCP tools, filtered by mode restrictions

src/core/tools/MultiApplyDiffTool.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,7 @@ export async function applyDiffTool(
6363
removeClosingTag: RemoveClosingTag,
6464
) {
6565
// Check if native protocol is enabled - if so, always use single-file class-based tool
66-
const provider = cline.providerRef.deref()
67-
const state = await provider?.getState()
68-
const toolProtocol = resolveToolProtocol(
69-
cline.apiConfiguration,
70-
cline.api.getModel().info,
71-
cline.apiConfiguration.apiProvider,
72-
state?.experiments,
73-
)
66+
const toolProtocol = resolveToolProtocol(cline.apiConfiguration, cline.api.getModel().info)
7467
if (isNativeProtocol(toolProtocol)) {
7568
return applyDiffToolClass.handle(cline, block as ToolUse<"apply_diff">, {
7669
askApproval,
@@ -81,6 +74,8 @@ export async function applyDiffTool(
8174
}
8275

8376
// Check if MULTI_FILE_APPLY_DIFF experiment is enabled
77+
const provider = cline.providerRef.deref()
78+
const state = await provider?.getState()
8479
if (provider && state) {
8580
const isMultiFileApplyDiffEnabled = experiments.isEnabled(
8681
state.experiments ?? {},

src/core/tools/ReadFileTool.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,7 @@ export class ReadFileTool extends BaseTool<"read_file"> {
109109
const { handleError, pushToolResult } = callbacks
110110
const fileEntries = params.files
111111
const modelInfo = task.api.getModel().info
112-
const state = await task.providerRef.deref()?.getState()
113-
const protocol = resolveToolProtocol(
114-
task.apiConfiguration,
115-
modelInfo,
116-
task.apiConfiguration.apiProvider,
117-
state?.experiments,
118-
)
112+
const protocol = resolveToolProtocol(task.apiConfiguration, modelInfo)
119113
const useNative = isNativeProtocol(protocol)
120114

121115
if (!fileEntries || fileEntries.length === 0) {

src/core/tools/__tests__/applyDiffTool.experiment.spec.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,22 +181,22 @@ describe("applyDiffTool experiment routing", () => {
181181
expect(applyDiffToolClass.handle).not.toHaveBeenCalled()
182182
})
183183

184-
it("should use class-based tool when native protocol is enabled regardless of experiment", async () => {
185-
// Update model to support native tools
184+
it("should use class-based tool when model defaults to native protocol", async () => {
185+
// Update model to support native tools and default to native protocol
186186
mockCline.api.getModel = vi.fn().mockReturnValue({
187187
id: "test-model",
188188
info: {
189189
maxTokens: 4096,
190190
contextWindow: 128000,
191191
supportsPromptCache: false,
192-
supportsNativeTools: true, // Enable native tools support
192+
supportsNativeTools: true, // Model supports native tools
193+
defaultToolProtocol: "native", // Model defaults to native protocol
193194
},
194195
})
195196

196197
mockProvider.getState.mockResolvedValue({
197198
experiments: {
198199
[EXPERIMENT_IDS.MULTI_FILE_APPLY_DIFF]: true,
199-
[EXPERIMENT_IDS.NATIVE_TOOL_CALLING]: true, // Enable native tool calling experiment
200200
},
201201
})
202202
;(applyDiffToolClass.handle as any).mockResolvedValue(undefined)
@@ -210,7 +210,7 @@ describe("applyDiffTool experiment routing", () => {
210210
mockRemoveClosingTag,
211211
)
212212

213-
// When native protocol is enabled, should always use class-based tool
213+
// When native protocol is used, should always use class-based tool
214214
expect(applyDiffToolClass.handle).toHaveBeenCalledWith(mockCline, mockBlock, {
215215
askApproval: mockAskApproval,
216216
handleError: mockHandleError,

src/core/webview/generateSystemPrompt.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const generateSystemPrompt = async (provider: ClineProvider, message: Web
7171
const canUseBrowserTool = modelSupportsBrowser && modeSupportsBrowser && (browserToolEnabled ?? true)
7272

7373
// Resolve tool protocol for system prompt generation
74-
const toolProtocol = resolveToolProtocol(apiConfiguration, modelInfo, apiConfiguration.apiProvider, experiments)
74+
const toolProtocol = resolveToolProtocol(apiConfiguration, modelInfo)
7575

7676
const systemPrompt = await SYSTEM_PROMPT(
7777
provider.context,

src/core/webview/webviewMessageHandler.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3192,7 +3192,7 @@ export const webviewMessageHandler = async (
31923192
break
31933193
}
31943194
case "copyError": {
3195-
const { message: errorMessage } = message.values ?? {}
3195+
const { message: errorMessage, originModelId, selectedLLM } = message.values ?? {}
31963196
const { apiConfiguration } = await provider.getState()
31973197
const httpProxy = process.env.http_proxy || process.env.HTTP_PROXY
31983198
const httpsProxy = process.env.https_proxy || process.env.HTTPS_PROXY
@@ -3226,7 +3226,7 @@ export const webviewMessageHandler = async (
32263226
await vscode.env.clipboard.writeText(dedent`
32273227
message: ${errorMessage}
32283228
provider: ${apiConfiguration.apiProvider}
3229-
Model: ${apiConfiguration.apiProvider === "zgsm" ? apiConfiguration.zgsmModelId : apiConfiguration.apiModelId}
3229+
Model: ${apiConfiguration.apiProvider === "zgsm" ? selectedLLM || originModelId || apiConfiguration.zgsmModelId : apiConfiguration.apiModelId}
32303230
${apiConfiguration.apiProvider === "zgsm" ? `BaseUrl: ${apiConfiguration.zgsmBaseUrl || ZgsmAuthConfig.getInstance().getDefaultApiBaseUrl()}` : ""}
32313231
vscodeVersion: ${vscode.version}
32323232
pluginVersion: ${Package.version}

src/shared/__tests__/experiments.spec.ts

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,16 @@ describe("experiments", () => {
2323
})
2424
})
2525

26-
describe("CHAT_SEARCH", () => {
27-
it("is configured correctly", () => {
28-
expect(EXPERIMENT_IDS.CHAT_SEARCH).toBe("chatSearch")
29-
expect(experimentConfigsMap.CHAT_SEARCH).toMatchObject({
30-
enabled: false,
31-
})
32-
})
33-
})
34-
35-
describe("NATIVE_TOOL_CALLING", () => {
36-
it("is configured correctly", () => {
37-
expect(EXPERIMENT_IDS.NATIVE_TOOL_CALLING).toBe("nativeToolCalling")
38-
expect(experimentConfigsMap.NATIVE_TOOL_CALLING).toMatchObject({
39-
enabled: false,
40-
})
41-
})
42-
})
43-
4426
describe("isEnabled", () => {
4527
it("returns false when POWER_STEERING experiment is not enabled", () => {
4628
const experiments: Record<ExperimentId, boolean> = {
4729
powerSteering: false,
4830
multiFileApplyDiff: false,
4931
preventFocusDisruption: false,
5032
imageGeneration: false,
51-
runSlashCommand: false,
5233
chatSearch: false,
5334
alwaysIncludeFileDetails: false,
54-
nativeToolCalling: false,
35+
runSlashCommand: false,
5536
}
5637
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.POWER_STEERING)).toBe(false)
5738
})
@@ -60,12 +41,11 @@ describe("experiments", () => {
6041
const experiments: Record<ExperimentId, boolean> = {
6142
powerSteering: true,
6243
multiFileApplyDiff: false,
44+
chatSearch: false,
45+
alwaysIncludeFileDetails: false,
6346
preventFocusDisruption: false,
6447
imageGeneration: false,
6548
runSlashCommand: false,
66-
chatSearch: false,
67-
alwaysIncludeFileDetails: false,
68-
nativeToolCalling: false,
6949
}
7050
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.POWER_STEERING)).toBe(true)
7151
})
@@ -74,12 +54,11 @@ describe("experiments", () => {
7454
const experiments: Record<ExperimentId, boolean> = {
7555
powerSteering: false,
7656
multiFileApplyDiff: false,
57+
chatSearch: false,
58+
alwaysIncludeFileDetails: false,
7759
preventFocusDisruption: false,
7860
imageGeneration: false,
7961
runSlashCommand: false,
80-
chatSearch: false,
81-
alwaysIncludeFileDetails: false,
82-
nativeToolCalling: false,
8362
}
8463
expect(Experiments.isEnabled(experiments, EXPERIMENT_IDS.POWER_STEERING)).toBe(false)
8564
})

0 commit comments

Comments
 (0)