* 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 <ricciodaniel98@gmail.com>
* 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 <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* 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 #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#5721
* fix: add missing translations for maximumIndexedFilesForFileSearch setting
* test: improve file-search tests to verify configuration behavior
- 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#8893
Co-authored-by: Roo Code <roomote@roocode.com>
* 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 <mrubens@users.noreply.github.com>
---------
Co-authored-by: kevint-cerebras <kevin.taylor@cerebras.net>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* 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.
* 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#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 <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
* 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#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
* 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 <christiaan.arnoldus@outlook.com>