-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: Add "Enable Reasoning" checkbox for Bedrock custom ARNs #10041
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
base: main
Are you sure you want to change the base?
Conversation
- Add awsCustomArnEnableReasoning field to ProviderSettings type - Add UI checkbox in Bedrock settings when custom ARN is used - Update bedrock.ts logic to check awsCustomArnEnableReasoning for custom ARNs - Only enable reasoning for custom ARNs when explicitly enabled by user - Fixes issue where custom ARNs like Nova Lite received unsupported reasoning flag Addresses #10040
Review complete. Found 1 issue that should be addressed before merging.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
| const thinkingEnabled = this.options.awsCustomArn | ||
| ? this.options.awsCustomArnEnableReasoning && modelConfig.reasoning && modelConfig.reasoningBudget | ||
| : thinkingEnabledBySettings |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The condition here uses modelConfig.reasoning && modelConfig.reasoningBudget, but in createMessage() the equivalent check uses modelConfig.info.supportsReasoningBudget. This inconsistency could cause reasoning to be enabled in streaming calls but not in non-streaming calls (or vice versa) for the same custom ARN and settings. Consider aligning both methods to use the same condition:
| const thinkingEnabled = this.options.awsCustomArn | |
| ? this.options.awsCustomArnEnableReasoning && modelConfig.reasoning && modelConfig.reasoningBudget | |
| : thinkingEnabledBySettings | |
| const thinkingEnabled = this.options.awsCustomArn | |
| ? this.options.awsCustomArnEnableReasoning && modelConfig.info.supportsReasoningBudget && modelConfig.reasoning && modelConfig.reasoningBudget | |
| : thinkingEnabledBySettings |
Fix it with Roo Code or mention @roomote and request a fix.
Review complete. The previous review correctly identified 1 issue that should be addressed before merging.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
This PR attempts to address Issue #10040.
closes #10040
Problem
When using custom ARNs with Bedrock, the system was sending reasoning flags by default without giving users control. Models like Nova Lite that do not support reasoning would return errors like:
Malformed input request: extraneous key [thinking] is not permitted.Solution
awsCustomArnEnableReasoningfield to ProviderSettingsChanges
packages/types/src/provider-settings.ts: AddedawsCustomArnEnableReasoningfield to bedrockSchemawebview-ui/src/components/settings/providers/Bedrock.tsx: Added checkbox UI that appears when custom ARN is setsrc/api/providers/bedrock.ts: Updated reasoning logic to checkawsCustomArnEnableReasoningfor custom ARNsTesting
Feedback and guidance are welcome.
Important
Adds an "Enable Reasoning" checkbox for Bedrock custom ARNs, allowing users to control reasoning settings.
awsCustomArnEnableReasoningfield toProviderSettingsto control reasoning for custom ARNs.Bedrock.tsxfor custom ARNs.AwsBedrockHandlerto respectawsCustomArnEnableReasoning.provider-settings.ts: AddsawsCustomArnEnableReasoningtobedrockSchema.Bedrock.tsx: Adds checkbox UI for enabling reasoning with custom ARNs.bedrock.ts: Modifies logic to checkawsCustomArnEnableReasoningfor custom ARNs.This description was created by
for 1b327bb. You can customize this summary. It will automatically update as commits are pushed.