-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: add claude-opus-4.5 to OpenRouter prompt caching and reasoning budget models #9540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Review complete. No issues found. The changes correctly add Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
mrubens
approved these changes
Nov 24, 2025
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 <[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) * 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 <[email protected]> Co-authored-by: Bruno Bergher <[email protected]> * feat: update cloud agent CTA to point to setup page (RooCodeInc#9338) Co-authored-by: Roo Code <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * fix: resolve native tool protocol race condition causing 400 errors (RooCodeInc#9363) * Retry eval tasks if API instability detected (
Summary
This PR adds
anthropic/claude-opus-4.5to the OpenRouter model configurations:OPEN_ROUTER_PROMPT_CACHING_MODELS- enables prompt caching for claude-opus-4.5 via OpenRouterOPEN_ROUTER_REASONING_BUDGET_MODELS- enables reasoning budget support for claude-opus-4.5 via OpenRouterChanges
packages/types/src/providers/openrouter.ts: Addedanthropic/claude-opus-4.5to both model setsImportant
Adds
anthropic/claude-opus-4.5to prompt caching and reasoning budget models inopenrouter.ts.anthropic/claude-opus-4.5toOPEN_ROUTER_PROMPT_CACHING_MODELSinopenrouter.ts, enabling prompt caching.anthropic/claude-opus-4.5toOPEN_ROUTER_REASONING_BUDGET_MODELSinopenrouter.ts, enabling reasoning budget support.This description was created by
for f30c024. You can customize this summary. It will automatically update as commits are pushed.