Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThinkingBudget.tsx now uses extended reasoning-effort typing and option handling to support higher tiers such as xhigh and max. The tests and select mocks were updated to cover fallback behavior, option rendering, and persistence for xhigh. ChangesReasoning Effort Tier Expansion
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
webview-ui/src/components/settings/ThinkingBudget.tsx (1)
92-110: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winKeep the select value inside the explicit option set. For array-based
supportsReasoningEffortvalues that omit"disable",currentReasoningEffortstill resolves to"disable"on first render, but Radix Select leaves the trigger empty when the controlled value has no matchingSelectItem. Derive the fallback fromavailableOptionsinstead.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@webview-ui/src/components/settings/ThinkingBudget.tsx` around lines 92 - 110, The controlled select value can fall outside the rendered option set when an explicit supportsReasoningEffort array omits "disable", causing the Radix Select trigger to render empty. Update ThinkingBudget’s option/value logic so currentReasoningEffort is derived from availableOptions (for example, fall back to the first valid item or another item in the explicit set) instead of hardcoding "disable", and keep the selected value guaranteed to match one of the rendered ReasoningEffortOption items.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@webview-ui/src/components/settings/ThinkingBudget.tsx`:
- Around line 92-110: The controlled select value can fall outside the rendered
option set when an explicit supportsReasoningEffort array omits "disable",
causing the Radix Select trigger to render empty. Update ThinkingBudget’s
option/value logic so currentReasoningEffort is derived from availableOptions
(for example, fall back to the first valid item or another item in the explicit
set) instead of hardcoding "disable", and keep the selected value guaranteed to
match one of the rendered ReasoningEffortOption items.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: be695fd6-744b-4e1f-abcc-c1f3e20013a1
📒 Files selected for processing (2)
webview-ui/src/components/settings/ThinkingBudget.tsxwebview-ui/src/components/settings/__tests__/ThinkingBudget.spec.tsx
) [imported from upstream 211d360]
Related GitHub Issue
Closes: #713
Description
The Model Reasoning Effort dropdown in settings was typed against
ReasoningEffortWithMinimal(minimal | low | medium | high), which excludedxhigh,max,none, anddisable— even though these values were already present in the model capability arrays (e.g. GPT-5.5 advertises["none","low","medium","high","xhigh"]). At runtime the dropdown happened to render them via the array path, but the types were lying and.includes("disable" as any)masked the gap.How:
ReasoningEffortWithMinimalwithReasoningEffortOption(ReasoningEffortExtended | "disable") as the type forbaseAvailableOptions, removing all unsafe casts includingas any.ReasoningEffortWithMinimalimport.Reviewers should note:
xhighexplicitly safe end-to-end.openai-native.ts) and persistence layer (provider-settings.ts) already handledxhighcorrectly viaReasoningEffortExtended; only the UI component's types were wrong.Test Procedure
ThinkingBudget.spec.tsx:Select/SelectContent/SelectItemmocks now threadonValueChangethrough so selection behavior can be exercised.xhighrenders for a GPT-5.5-shaped capability array, with no straydisable/maxentries.select-item-xhighand assertssetApiConfigurationField("enableReasoningEffort", true)andsetApiConfigurationField("reasoningEffort", "xhigh")are both called.pnpm --filter @roo-code/vscode-webview check-types— cleanpnpm --filter @roo-code/types test— 225/225 passThinkingBudget.spec.tsxtests passPre-Submission Checklist
Documentation Updates
Get in Touch
edelauna@gmail.com
Summary by CodeRabbit
New Features
xhighandmax).disableavailability).Tests
xhigh, including correct behavior with emptysupportsReasoningEffort.