-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix bedrock max tokens #5168
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
Fix bedrock max tokens #5168
Conversation
…ficial specs **Fixes:** [RooCodeInc#2500](RooCodeInc#2500) ### Changes: - Updated `maxTokens` values in `packages/types/src/providers/bedrock.ts` to align with [official Anthropic documentation](https://docs.anthropic.com/en/docs/about-claude/models/overview#model-comparison) ### Models Updated: - **Claude Sonnet 4** (`anthropic.claude-sonnet-4-20250514-v1:0`): `8,192` → `64,000` tokens - **Claude Opus 4** (`anthropic.claude-opus-4-20250514-v1:0`): `8,192` → `32,000` tokens - **Claude 3.7 Sonnet** (`anthropic.claude-3-7-sonnet-20250219-v1:0`): `8,192` → `64,000` tokens ### Impact: - Users now see correct max output token limits in settings UI - Enables generation of significantly longer responses (up to 7.8x increase) - Resolves discrepancy between displayed limits and AWS Bedrock documentation ### References: - AWS Bedrock Claude 3.7 documentation: 64k tokens (128k with beta header) - Anthropic official model comparison table
|
What does the output tokens default to after this change? Do these have sliders? |
For most users: They'll now get the full model capability by default (64k tokens for Claude 3.7 Sonnet, 32k for Opus 4) with no sliders needed - its just set at the correct limit. No other defaults were changed, just the model information that was incorrect. |
- Updated maxTokens values to use numeric separators (e.g., 64_000) - Improves readability and consistency with other large numbers like contextWindow - Applied to all three updated models: - anthropic.claude-sonnet-4-20250514-v1:0 - anthropic.claude-opus-4-20250514-v1:0 - anthropic.claude-3-7-sonnet-20250219-v1:0
My concern is that I don't actually think that 64k output tokens is clearly an improvement. That 64k is always reserved in the context window, reducing the amount that's usable for input. I think it makes sense that the user can opt into it, but I think the default shouldn't be higher than 16k for modes with a 200k context window. |
|
Closing as we need to setup a max token slider across providers where models have the ability to have variable tokens set. |



Related GitHub Issue
Closes: #2500
Description
Fix: Update AWS Bedrock Claude model max output tokens to match official specs
Changes:
maxTokensvalues inpackages/types/src/providers/bedrock.tsto align with official Anthropic documentationModels Updated:
anthropic.claude-sonnet-4-20250514-v1:0):8,192→64,000tokensanthropic.claude-opus-4-20250514-v1:0):8,192→32,000tokensanthropic.claude-3-7-sonnet-20250219-v1:0):8,192→64,000tokensImpact:
References:
Test Procedure
Pre-Submission Checklist
Screenshots / Videos
Documentation Updates
Additional Notes
I've looked over Bedrock official documentation, and it links back to Anthropic's. I don't believe there are different values for models used through Bedrock. There is no explicit list of the mentioned models with their Max Output values in Bedrock's documentation, only on Anthropic's.
Get in Touch
@MuriloFP
Important
Update
maxTokensfor three models inbedrock.tsto align with official documentation, correcting UI limits and resolving documentation discrepancies.maxTokensinbedrock.tsfor modelsanthropic.claude-sonnet-4-20250514-v1:0,anthropic.claude-opus-4-20250514-v1:0, andanthropic.claude-3-7-sonnet-20250219-v1:0.maxTokensvalues:64,000,32,000, and64,000respectively.This description was created by
for 6d29f44. You can customize this summary. It will automatically update as commits are pushed.