Skip to content

Conversation

@daniel-lxs
Copy link
Member

@daniel-lxs daniel-lxs commented Jun 13, 2025

Closes #4201

This is the second attempt of #4481 but without removing the reasoning options for other providers, I tested it with non-reasoning and reasoning models across providers, works as expected.


Important

Reintroduces reasoning support for Bedrock models with new logic and tests, while updating UI components to reflect these changes.

  • Behavior:
    • Reintroduces reasoning support for Bedrock models by adding supportsReasoningBudget to bedrockModels in bedrock.ts.
    • Implements reasoning logic in AwsBedrockHandler in bedrock.ts, enabling reasoning based on settings and metadata.
    • Adds tests in bedrock-reasoning.test.ts to verify reasoning behavior, including payload verification and logging.
  • UI:
    • Updates ThinkingBudget.tsx to adjust sliders for reasoning tokens based on model capabilities.
    • Modifies Bedrock.tsx to include reasoning-related settings and options.

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

hannesrudolph and others added 4 commits June 11, 2025 16:50
…ponents

- Introduced `supportsReasoningBudget` property in Bedrock models.
- Enhanced `AwsBedrockHandler` to handle reasoning budget in payloads.
- Updated `ThinkingBudget` component to dynamically set max tokens based on reasoning support.
- Modified `ApiOptions` and `Bedrock` components to conditionally render `ThinkingBudget`.
- Added tests for extended thinking functionality in `bedrock-reasoning.test.ts`.
- Simplify ThinkingBudget ternary logic since component only renders when reasoning budget supported
- Break down complex thinking enabled condition with clear documentation
- Replace 'as any' usage with proper TypeScript interfaces for AWS SDK events
- Add comprehensive documentation for multiple stream structures explaining AWS SDK compatibility
Remove selectedProviderModels.length check to display ThinkingBudget
for all providers, not just those with available models
@daniel-lxs daniel-lxs requested review from cte, jr and mrubens as code owners June 13, 2025 13:42
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Jun 13, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Jun 13, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 13, 2025
@mrubens mrubens merged commit 28ad8d7 into main Jun 13, 2025
21 checks passed
@mrubens mrubens deleted the feature/thinking-budget-always-visible branch June 13, 2025 15:07
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 13, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Jun 13, 2025
cte pushed a commit that referenced this pull request Jun 24, 2025
* Add reasoning budget support to Bedrock models and update related components

- Introduced `supportsReasoningBudget` property in Bedrock models.
- Enhanced `AwsBedrockHandler` to handle reasoning budget in payloads.
- Updated `ThinkingBudget` component to dynamically set max tokens based on reasoning support.
- Modified `ApiOptions` and `Bedrock` components to conditionally render `ThinkingBudget`.
- Added tests for extended thinking functionality in `bedrock-reasoning.test.ts`.

* Add BedrockThinkingConfig interface and update payload structure

* fix: address PR review feedback (#4481)

- Simplify ThinkingBudget ternary logic since component only renders when reasoning budget supported
- Break down complex thinking enabled condition with clear documentation
- Replace 'as any' usage with proper TypeScript interfaces for AWS SDK events
- Add comprehensive documentation for multiple stream structures explaining AWS SDK compatibility

* feat: show ThinkingBudget component unconditionally

Remove selectedProviderModels.length check to display ThinkingBudget
for all providers, not just those with available models

---------

Co-authored-by: hannesrudolph <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer PR - Needs Review size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

AWS Bedrock does not show or support Sonnet and Opus 4 Extended Thinking

4 participants