Skip to content

Commit 6a08916

Browse files
authored
Update bedrock.ts
Allow ARNs from Bedrock Marketplace, which are different because models are deployed using SageMaker Inference behind the scenes.
1 parent 9a43222 commit 6a08916

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api/providers/bedrock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH
532532
* match[4] - The resource ID (e.g., "anthropic.claude-3-sonnet-20240229-v1:0")
533533
*/
534534

535-
const arnRegex = /^arn:aws:bedrock:([^:]+):([^:]*):(?:([^\/]+)\/([\w\.\-:]+)|([^\/]+))$/
535+
const arnRegex = /^arn:aws:(?:bedrock|sagemaker):([^:]+):([^:]*):(?:([^\/]+)\/([\w\.\-:]+)|([^\/]+))$/
536536
let match = arn.match(arnRegex)
537537

538538
if (match && match[1] && match[3] && match[4]) {

0 commit comments

Comments
 (0)