-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: add AWS Bedrock service tier support #9955
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
Conversation
- Add service tier type definitions (STANDARD, FLEX, PRIORITY) - Add awsBedrockServiceTier field to provider settings schema - Include service_tier parameter in Bedrock API requests for supported models - Apply tier-specific pricing (75% premium for Priority, 50% discount for Flex) - Add UI selector for service tier in Bedrock settings component - Add models that support service tiers based on AWS documentation: - Amazon Nova models (Lite, Pro, Pro Latency Optimized) - DeepSeek R1 - Qwen models - OpenAI GPT-OSS models - Add translation strings for service tier UI Addresses #9874
All issues have been resolved. Recent changes fix grammar typos in Catalan and Spanish translations.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
src/api/providers/bedrock.ts
Outdated
| } | ||
|
|
||
| // Add service tier if specified and model supports it | ||
| if (this.options.awsBedrockServiceTier && BEDROCK_SERVICE_TIER_MODEL_IDS.includes(baseModelId as any)) { |
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.
This service tier feature should have test coverage. The existing bedrock.spec.ts has comprehensive tests for similar features (like the 1M context beta). Consider adding tests for: (1) service tier parameter being included in API requests for supported models, (2) pricing multipliers being correctly applied in getModel(), and (3) service tier NOT being applied for unsupported models.
Fix it with Roo Code or mention @roomote and request a fix.
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.
@roomote amazon.nova-2-lite-v1:0 is also supported for the Service Tiers. Add to the list of models
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.
Fixaroo
See task on Roo Cloud
Fixed the reported issues. All local checks passed.
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.
@roomote
1/Error message received - Unknown Error: The model returned the following errors: Malformed input request: #: extraneous key [service_tier] is not permitted, please reformat your input and try again.
2/The code is adding service_tier to additionalModelRequestFields, but according to the AWS Bedrock documentation, service_tier should be a top-level parameter in the request, not nested inside additionalModelRequestFields. Fix accordingly
3/Documentation https://docs.aws.amazon.com/bedrock/latest/userguide/service-tiers-inference.html
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.
Fixaroo
See task on Roo Cloud
Fixed the service_tier placement. Per AWS documentation, it must be a top-level request parameter, not nested inside additionalModelRequestFields. All tests pass.
Per AWS Bedrock documentation, service_tier must be a top-level parameter in the API request, not nested inside additionalModelRequestFields. The previous implementation incorrectly placed service_tier inside additionalModelRequestFields which caused "extraneous key [service_tier] is not permitted" errors from the Bedrock API. This fix: - Moves service_tier to be a top-level payload parameter - Updates tests to verify service_tier is at top level - Adds documentation links to the code for reference Refs: https://docs.aws.amazon.com/bedrock/latest/userguide/service-tiers-inference.html
|
@Smartsheet-JB-Brown @hannesrudolph @mrubens PR after updates tested locally and works as expected |
Working on the following:
|
Review complete. All previous issues have been addressed and no new issues found.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This PR attempts to address Issue #9874 by implementing AWS Bedrock service tier support.
Summary
Adds support for AWS Bedrock service tiers (STANDARD, FLEX, PRIORITY) allowing users to optimize their AI workloads based on cost and latency requirements.
Changes
awsBedrockServiceTierfield to provider settings schemaservice_tierparameter in API requestsSupported Models
Based on the AWS documentation provided, the following models support service tiers:
Testing
Notes
The pricing multipliers have been updated based on the feedback:
Feedback and guidance are welcome!
Closes #9874
Important
Adds AWS Bedrock service tier support with UI updates, pricing adjustments, and tests for tier-specific functionality.
awsBedrockServiceTierfield to provider settings schema inprovider-settings.ts.AwsBedrockHandlerinbedrock.tsto includeservice_tierin API requests for supported models.bedrock.tswith 75% premium for Priority and 50% discount for Flex.Bedrock.tsx.bedrock.spec.tsfor pricing multipliers and API request parameters.bedrock.tsandprovider-settings.ts.bedrock.tsbased on AWS documentation.This description was created by
for 4936295. You can customize this summary. It will automatically update as commits are pushed.