- Add requestyBaseUrl field to provider settings schema
- Update RequestyHandler to use custom base URL when provided
- Update fetcher functions to support custom base URL parameter
- Add UI checkbox and text field for custom URL configuration
- Update webview message handler to pass base URL to model fetcher
- Add tests for custom base URL functionality
Fixes#6983
* fix: add explicit max_output_tokens for GPT-5 Responses API
- Added max_output_tokens parameter to GPT-5 request body using model.maxTokens
- This prevents GPT-5 from defaulting to very large token limits (e.g., 120k)
- Updated tests to expect max_output_tokens in GPT-5 request bodies
- Fixed test for handling unhandled stream events by properly mocking SDK fallback
* fix: add missing translations for reasoningEffort.minimal in Indonesian and Dutch locales
* fix: correct GPT-5 response ID persistence and usage
- Renamed metadata field from 'previous_response_id' to 'response_id' for clarity
- Fixed logic to correctly use the response_id from the previous message as previous_response_id for the next request
- This resolves the 'Previous response with id not found' errors that occurred after multiple turns in the same session
* feat: add robust error handling for GPT-5 previous_response_id failures
- Automatically retry without previous_response_id when it's not found (400 error)
- Clear stored lastResponseId to prevent reusing stale IDs
- Handle errors in both SDK and SSE fallback paths
- Log warnings when retrying to help with debugging
* fix: handle GPT-5 response ID race condition with nano model
- Add promise-based synchronization for response ID persistence
- Wait for pending response ID from previous request before using it
- Resolve promise when response ID is received or cleared
- Add 100ms timeout to avoid blocking too long on ID resolution
- Properly clean up resolver on errors to prevent memory leaks
This fixes the race condition where fast nano model responses could cause
the next request to be initiated before the response ID was fully persisted.
* fix: address PR review comments for GPT-5 implementation
- Extract usage normalization helper to reduce duplication
- Suppress conversation continuity for first message (but respect explicit metadata)
- Deduplicate response ID resolver logic
- Remove dead enableGpt5ReasoningSummary option references
- DRY up GPT-5 event/usage handling with normalizeGpt5Usage helper
- Centralize default GPT-5 reasoning effort using model info
- Fix Indonesian locale minimal string misplacement
- Add clarifying comments for Developer prefix usage
- Add TODO for future verbosity UI capability gating
- Fix failing test in reasoning.spec.ts
* fix(openai-native): address Roomote inline feedback\n\n- Delegate standard GPT-5 SSE event types to shared processor to reduce duplication\n- Add JSDoc for response ID accessors\n- Standardize key error messages for GPT-5 Responses API fallback\n- Extract persistGpt5Metadata() in Task to simplify metadata writes\n- Add malformed JSON SSE parsing test\n
* fix(openai-native,gpt5): correct usage cost calc (use calculateApiCostOpenAI incl. cache); enforce 'skip once' continuity via suppressPreviousResponseId; dedupe responseId resolver on SSE 400; feat: gate reasoning.summary by enableGpt5ReasoningSummary; centralize default reasoning effort; types/ui: add ModelInfo.supportsVerbosity and gate Verbosity UI by capability; refactor: avoid duplicate usage emission in SSE done/completed
* fix(gpt5): default enableGpt5ReasoningSummary=true to preserve tests and expected behavior
* fix(gpt5): canonicalize GPT-5 metadata key to previous_response_id and align enableGpt5ReasoningSummary default docs
* fix(openai-native): remove review artifact comments and guard GPT-5 in completePrompt
* feat: add GPT-5 model support
- Added GPT-5 models (gpt-5-2025-08-07, gpt-5-mini-2025-08-07, gpt-5-nano-2025-08-07)
- Added nectarine-alpha-new-reasoning-effort-2025-07-25 experimental model
- Set gpt-5-2025-08-07 as default OpenAI Native model
- Implemented GPT-5 specific handling with streaming and reasoning effort support
* fix: remove hardcoded temperature from GPT-5 handler
- Updated handleGPT5Message to use configurable temperature
- Now uses this.options.modelTemperature ?? OPENAI_NATIVE_DEFAULT_TEMPERATURE
- Maintains consistency with other model handlers
* feat: add reasoning effort support for all OpenAI models
* fix: update test to expect new default model gpt-5-2025-08-07
* feat: increase GPT-5 models context window to 400,000
- Updated context window from 256,000 to 400,000 for gpt-5-2025-08-07
- Updated context window from 256,000 to 400,000 for gpt-5-mini-2025-08-07
- Updated context window from 256,000 to 400,000 for gpt-5-nano-2025-08-07
- Updated context window from 256,000 to 400,000 for nectarine-alpha-new-reasoning-effort-2025-07-25
As requested by @daniel-lxs in PR #6819
* revert: remove GPT-5 models, keep only nectarine experimental model
- Removed gpt-5-2025-08-07, gpt-5-mini-2025-08-07, gpt-5-nano-2025-08-07
- Kept nectarine-alpha-new-reasoning-effort-2025-07-25 experimental model
- Reverted default model back to gpt-4o
- Updated tests and changeset accordingly
* feat: add GPT-5 models with updated context windows
- Added gpt-5-2025-08-07, gpt-5-mini-2025-08-07, gpt-5-nano-2025-08-07 models
- All GPT-5 models configured with 400,000 context window
- Updated nectarine model context window to 256,000
- All models configured with reasoning effort support
- Set gpt-5-2025-08-07 as default OpenAI Native model
- Added GPT-5 model handling in openai-native.ts
- Updated tests to reflect new default model
* fix: restore reasoning effort support for o1 series models
- Added supportsReasoningEffort: true to o1, o1-preview, and o1-mini models
- This restores the ability to use reasoning effort parameters with these models
- The existing code in openai-native.ts already handles reasoning effort correctly
* Revert "fix: restore reasoning effort support for o1 series models"
This reverts commit 7251237ae8.
* fix: restore reasoning effort support for o3 and o4 models
- Added supportsReasoningEffort: true to o3, o3-high, o3-low models
- Added supportsReasoningEffort: true to o4-mini, o4-mini-high, o4-mini-low models
- Added supportsReasoningEffort: true to o3-mini, o3-mini-high, o3-mini-low models
- These models have both supportsReasoningEffort and reasoningEffort properties
* Revert "fix: restore reasoning effort support for o3 and o4 models"
This reverts commit a75a2b8a69.
* fix: restore reasoning effort support for o3 and o4 models
- Added supportsReasoningEffort: true to o3, o3-high, o3-low models
- Added supportsReasoningEffort: true to o4-mini, o4-mini-high, o4-mini-low models
- Added supportsReasoningEffort: true to o3-mini, o3-mini-high, o3-mini-low models
* fix: adjust reasoning effort support for o3/o4 models
- Keep supportsReasoningEffort only for base o3, o4-mini, and o3-mini models
- Remove supportsReasoningEffort from -high and -low variants
- Position supportsReasoningEffort right before reasoningEffort property
* fix: remove nectarine experimental model
- Removed nectarine-alpha-new-reasoning-effort-2025-07-25 from openai.ts
- Removed nectarine handling from openai-native.ts (renamed to handleGpt5Message)
- Removed associated changeset file
- Keep GPT-5 models with developer role handling
* feat: implement full GPT-5 support with verbosity and minimal reasoning
- Add all three GPT-5 models with accurate pricing (.25/0 for gpt-5, /bin/sh.25/ for mini, /bin/sh.05//bin/sh.40 for nano)
- Implement verbosity control (low/medium/high) that passes through to API
- Add minimal reasoning effort support for fastest response times
- GPT-5 models use developer role instead of system role
- Set gpt-5-2025-08-07 as default OpenAI Native model
- Add Responses API infrastructure for future migration
- Update tests to verify all GPT-5 features
- All 27 tests passing
Note: UI controls for verbosity still need to be added in a follow-up PR
* feat: add verbosity setting for GPT-5 models
- Add VerbosityLevel type definition to model types
- Add verbosity field to ProviderSettings schema
- Create Verbosity UI component for settings
- Add verbosity labels to all localization files
- Integrate verbosity handling in model parameters transformation
- Update OpenAI native handler to support verbosity for GPT-5
- Add comprehensive tests for verbosity setting
- Update existing GPT-5 tests to use verbosity from settings
* Delete .roorules
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: hannesrudolph <hrudolph@gmail.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
* feat: add GLM-4.5 and OpenAI gpt-oss models to Fireworks provider
- Added GLM-4.5 (355B/32B active) and GLM-4.5-Air (106B/12B active) models from Z.ai
- Added gpt-oss-20b and gpt-oss-120b models from OpenAI
- All models configured with 128K context window
- Added comprehensive test coverage for all new models
Fixes#6753
* fix: update GLM-4.5 model IDs to use p instead of hyphen
- Changed glm-4-5 to glm-4p5
- Changed glm-4-5-air to glm-4p5-air
- Updated corresponding test cases
---------
Co-authored-by: Roo Code <roomote@roocode.com>
feat: increase Claude Code default max output tokens from 8k to 16k
- Changed CLAUDE_CODE_DEFAULT_MAX_OUTPUT_TOKENS from 8000 to 16000
- Users can still lower it to 8k via environment variable if needed
- Addresses issue #6125 regarding output token limits
Co-authored-by: Roo Code <roomote@roocode.com>
* feat: add prompt caching support for LiteLLM (#5791)
- Add litellmUsePromptCache configuration option to provider settings
- Implement cache control headers in LiteLLM handler when enabled
- Add UI checkbox for enabling prompt caching (only shown for supported models)
- Track cache read/write tokens in usage data
- Add comprehensive test for prompt caching functionality
- Reuse existing translation keys for consistency across languages
This allows LiteLLM users to benefit from prompt caching with supported models
like Claude 3.7, reducing costs and improving response times.
* fix: improve LiteLLM prompt caching to work for multi-turn conversations
- Convert system message to structured format with cache_control
- Handle both string and array content types for user messages
- Apply cache_control to content items, not just message level
- Update tests to match new message structure
This ensures prompt caching works correctly for all messages in a conversation,
not just the initial system prompt and first user message.
* fix: resolve TypeScript linter error for cache_control property
Use type assertion to handle cache_control property that's not in OpenAI types
* feat: Adding more settings and control over Gemini
- with topP, topK, maxOutputTokens
- allow users to enable URL context and Grounding Research
* feat: Adding parameter titles and descriptions + translation to all languages
* feat: adding more translations
* feat: adding `contextLimit` implementation from `maxContextWindow` PR + working with profile-specific thresholding
* feat: max value for context limit to model's limit + converting description and titles to settings for translation purposes
* feat: all languages translated
* feat: changing profile-specific threshold in context management setting will also change in Gemini context management
- sync between Context Management Settting <-> Gemini Context Management with regards to thresholding
* feat: max value of maxOutputTokens is model's maxTokens + adding more tests
* feat: improve unit tests and adding `data-testid` to slider and checkbox components
* fix: small changes in geminiContextManagement descriptions + minor fix
* fix: Switching from "Gemini Context Management" to "Token Management
- better naming and correct purpose
* fix: input field showed NaN -> annoying UX
* fix: Removing redundant "tokens" after the "set context limit"'s checkbox + removing the lengthy description
* fix: Changing the translation to be consistent with the english one
* fix: more translations
* fix: translations
* fix: removing contextLimit and token management related code
- due to the decision in: https://github.com/RooCodeInc/Roo-Code/issues/3717
* fix: removing `contextLimit` test and removing token management in translations
* fix: changing from `Advanced Features` to `Tools` to be consistent with Gemini docs/AI studio
* fix: adding `try-catch` block for `generateContentStream`
* feat: Include citations + improved type safety
* feat: adding citation for streams (generateContextStream)
* fix: set default values for `topP`, `topK` and `maxOutputTokens`
* fix: changing UI/UX according to the review/feedback from `daniel-lxs`
* fix: updating the `Gemini.spec.tsx` unit test
- testing when it is hidden
- testing when users click on the collapsible trigger and model configuration appears
* fix: more changes from the feedback/review from `daniel-lxs`
* fix: adding sources at the end of the stream to preserve
* fix: change the description for grounding with google search and url context
* fix: adding translations
* fix: removing redundant extra translations - a mistake made by the agent
* fix: remove duplicate translation keys in geminiSections and geminiParameters
- Fixed duplicate keys in 13 localization files (es, fr, hi, id, it, ja, ko, nl, pl, pt-BR, ru, tr, vi)
- Removed second occurrence of geminiSections and geminiParameters keys
- Kept first occurrence which contains more comprehensive descriptions
- All JSON files validated for syntax correctness
- Translation completeness verified with missing translations script
Resolves duplicate key issue identified in PR #4895
* fix: delete topK, topP and maxOutputTokens from Gemini
* fix: deleting topK, topP and maxOutputTokens from translations/locales
* fix: adjust spacing between labels and descriptions + sentence casing
* fix: adding maxOutputTokens back and removing unknown type
* fix: internalizing error Gemini error message
* fix: updating tests in Gemini and Vertex to adjust to the new error logging
* fix: address PR review feedback for Gemini tools feature
- Fix Hindi translation grammatical error in settings.json
- Internationalize 'Sources:' string and error messages in gemini.ts
- Add comprehensive error scenario tests to gemini-handler.spec.ts
- Remove unused currentModelId prop from Gemini component
- Update all locale files with new translation keys
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
* feat: Add support for message queueing
* fix: address PR review feedback for message queueing feature
- Restore original ChatView tests from main branch
- Fix broken test by updating ChatTextArea mock
- Add comprehensive tests for message queueing (simplified due to mocking constraints)
- Fix race condition using useRef and setTimeout in queue processing
- Extract QueuedMessage interface to shared types.ts file
- Replace inline styles with Tailwind classes in QueuedMessages
- Add i18n support for 'Queued Messages:' text
- Add keyboard navigation for removing queued messages
- Add JSDoc for fromQueue parameter in handleSendMessage
* refactor: move QueuedMessage interface to packages/types
- Move QueuedMessage interface from local types.ts to packages/types/src/message.ts
- Update imports in ChatView.tsx and QueuedMessages.tsx to use @roo-code/types
- Remove local types.ts file to follow codebase conventions
* fix: add id field when creating queued messages
- Generate unique id using timestamp when adding messages to queue
- Fixes TypeScript error after moving QueuedMessage interface
* Stop disabling sending
* Translations
* Fix tests
* Improved styling
* Remove unused string
* Test cleanup
* fix: address message queueing issues
- Fix race condition in queue processing by re-checking queue state inside setTimeout
- Add error handling for queue operations with retry mechanism
- Replace array index with stable message.id for React keys in QueuedMessages
- Generate more unique IDs using timestamp + random component
* feat: add inline editing for queued messages
- Add ability to edit queued messages by clicking on them
- Support Enter to save and Escape to cancel edits
- Add textarea that auto-resizes based on content
- Add hover effect to indicate messages are editable
- Add translation for click to edit tooltip
* feat: add scrollbar and fix height for queued messages
- Add max-height of 300px with scrollbar to queue container
- Add flex-shrink-0 to prevent message items from being squished
- Ensure consistent height for message items when multiple messages are queued
* feat: add translations for queued message edit tooltip
- Add 'queuedMessages.clickToEdit' translation key to all 18 language files
- Provides localized tooltip text for the click-to-edit functionality
* fix: improve message queue processing reliability
- Fix race condition by removing nested setState and setTimeout
- Add retry limit (3 attempts) to prevent infinite loops
- Add proper cleanup on component unmount
- Clear queue when starting new task
- Prevent queue processing during API errors
- Fix ESLint warnings for React hooks dependencies
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
* add more details
* format details better
* fix tests
* fix: address PR #6190 review feedback
- Move huggingface-models.ts to src/api/providers/fetchers/huggingface.ts
- Remove 'any' types and add proper TypeScript interfaces
- Add missing i18n keys and translations for all languages
- Replace magic numbers with named constants
- Add JSDoc documentation for HuggingFaceModel interface
- Improve error handling in API endpoint
- Update model capabilities display to match other providers
- Remove tool calling display (not used)
- Add comprehensive test coverage for new UI features
* fix: preserve HuggingFace provider details in model response
- Store raw HuggingFace models in cache to preserve provider information
- Export getCachedRawHuggingFaceModels to retrieve full model data
- Update huggingface-models.ts to return cached raw models when available
- Include provider name in model descriptions
- Always add provider-specific variants to show all available providers
- Remove console.log statements from fetcher
---------
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>