Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Dec 11, 2025

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

  • Added a new awsCustomArnEnableReasoning field to ProviderSettings
  • Added an "Enable Reasoning" checkbox in Bedrock settings that appears when a custom ARN is used
  • Updated the backend logic to only enable reasoning for custom ARNs when explicitly enabled by the user
  • Maintained existing behavior for dropdown-selected models

Changes

  • packages/types/src/provider-settings.ts: Added awsCustomArnEnableReasoning field to bedrockSchema
  • webview-ui/src/components/settings/providers/Bedrock.tsx: Added checkbox UI that appears when custom ARN is set
  • src/api/providers/bedrock.ts: Updated reasoning logic to check awsCustomArnEnableReasoning for custom ARNs

Testing

  • Linting passed
  • Type checking passed
  • All existing tests pass

Feedback and guidance are welcome.


Important

Adds an "Enable Reasoning" checkbox for Bedrock custom ARNs, allowing users to control reasoning settings.

  • Behavior:
    • Adds awsCustomArnEnableReasoning field to ProviderSettings to control reasoning for custom ARNs.
    • Introduces "Enable Reasoning" checkbox in Bedrock.tsx for custom ARNs.
    • Updates reasoning logic in AwsBedrockHandler to respect awsCustomArnEnableReasoning.
  • Files:
    • provider-settings.ts: Adds awsCustomArnEnableReasoning to bedrockSchema.
    • Bedrock.tsx: Adds checkbox UI for enabling reasoning with custom ARNs.
    • bedrock.ts: Modifies logic to check awsCustomArnEnableReasoning for custom ARNs.
  • Testing:
    • Linting and type checking passed.
    • All existing tests pass.

This description was created by Ellipsis for 1b327bb. You can customize this summary. It will automatically update as commits are pushed.

- 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
@roomote
Copy link
Contributor Author

roomote bot commented Dec 11, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. Found 1 issue that should be addressed before merging.

  • Inconsistent reasoning conditions between createMessage() and completePrompt() in bedrock.ts

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

Comment on lines +732 to +734
const thinkingEnabled = this.options.awsCustomArn
? this.options.awsCustomArnEnableReasoning && modelConfig.reasoning && modelConfig.reasoningBudget
: thinkingEnabledBySettings
Copy link
Contributor Author

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:

Suggested change
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.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Dec 12, 2025
@hannesrudolph hannesrudolph moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jan 7, 2026
@hannesrudolph hannesrudolph marked this pull request as ready for review January 7, 2026 21:13
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. Enhancement New feature or request labels Jan 7, 2026
@roomote
Copy link
Contributor Author

roomote bot commented Jan 7, 2026

Rooviewer Clock   See task on Roo Cloud

Review complete. The previous review correctly identified 1 issue that should be addressed before merging.

  • Inconsistent reasoning conditions between createMessage() and completePrompt() in bedrock.ts - the custom ARN check in completePrompt() is missing modelConfig.info.supportsReasoningBudget

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request PR - Needs Preliminary Review size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Status: PR [Needs Prelim Review]

Development

Successfully merging this pull request may close these issues.

[BUG] Bedrock Custom ARNs to have "Enable Reasoning" checkbox

3 participants