Users need the ability to use custom ARNs (Amazon Resource Names) with AWS Bedrock for intelligent prompt routing. #1550
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add support for custom ARNs in AWS Bedrock
Problem
Users need the ability to use custom ARNs (Amazon Resource Names) with AWS Bedrock for intelligent prompt routing. This is particularly useful for:
Currently, when attempting to use a custom ARN, users encounter the error:
Solution
This PR adds support for custom ARNs in AWS Bedrock by:
Implementation Details
UI Changes
Backend Changes
awsCustomArnto the API handler options and global state keysgetModelmethod to handle custom ARNscreateMessageandcompletePromptmethods to skip cross-region inference for custom ARNsTesting
test-custom-arn.js) for verifying AWS Bedrock Intelligent Prompt Routing:AWS_PROFILEenvironment variableRemaining Issue
If you encounter errors while testing:
Things to verify:
Implemented Fixes
This PR includes the following fixes to help diagnose and resolve the issue:
Enhanced Error Handling: Added specific error messages for common ARN-related issues:
Improved Logging: Added detailed logging when using custom ARNs:
User-Friendly Error Messages: Provides more specific guidance to users when errors occur:
Test Script for Prompt Routing: Created a dedicated test script for verifying AWS Bedrock Intelligent Prompt Routing:
These changes will help users diagnose and fix issues with custom ARNs more easily.
Important
Adds support for custom ARNs in AWS Bedrock, including UI, backend changes, and tests for intelligent prompt routing.
ApiOptions.tsxto include a dropdown option for "Use custom ARN..." and a text field for ARN input.bedrock.tsto handle custom ARNs, including region extraction and validation.bedrock-custom-arn.test.tsfor testing custom ARN functionality.test-custom-arn.jsscript for manual testing of custom ARNs.api.tsandglobalState.tsto includeawsCustomArnin configuration keys.This description was created by
for 3eb8cd8d0cf81070a73071a6f329c70950c9dccb. It will automatically update as commits are pushed.