Skip to content

Issue with Calling Bedrock Model via VSCODE Plugin #1998

@pavelmateju

Description

@pavelmateju

Which version of the app are you using?

3.10.5

plus

OS: Windows 10

VSCODE IDE 1.98.2

Which API Provider are you using?

AWS Bedrock

Which Model are you using?

anthropic.claude-3-7-sonnet-20250219-v1:0

What happened?

I am following up discussion on discord:

https://discord.com/channels/1332146336664915968/1354137660544782406

I am having troubles to use ROO CODE with our aws bedrock model ( anthropic.claude-3-7-sonnet-20250219-v1:0 ).

I can call the model from my local machine - from python code (using anthropic python sdk) but not via VS CODE ROO plugin.

The issue is when I tried to enter model as custom ARN.

If you advise what should be the format of the custom ARN - that would help.

Image

Steps to reproduce

This is ARN profile from the aws.

{ "inferenceProfileName": "EU Anthropic Claude 3.7 Sonnet", "description": "Routes requests to Anthropic Claude 3.7 Sonnet in eu-central-1, eu-north-1, eu-west-1 and eu-west-3.", "createdAt": "2025-03-17T00:00:00+00:00", "updatedAt": "2025-03-24T22:59:17.732909+00:00", "inferenceProfileArn": "arn:aws:bedrock:eu-west-1:104029271467:inference-profile/eu.anthropic.claude-3-7-sonnet-20250219-v1:0", "models": [ { "modelArn": "arn:aws:bedrock:eu-central-1::foundation-model/anthropic.claude-3-7-sonnet-20250219-v1:0" }, { "modelArn": "arn:aws:bedrock:eu-north-1::foundation-model/anthropic.claude-3-7-sonnet-20250219-v1:0" }, { "modelArn": "arn:aws:bedrock:eu-west-1::foundation-model/anthropic.claude-3-7-sonnet-20250219-v1:0" }, { "modelArn": "arn:aws:bedrock:eu-west-3::foundation-model/anthropic.claude-3-7-sonnet-20250219-v1:0" } ], "inferenceProfileId": "eu.anthropic.claude-3-7-sonnet-20250219-v1:0", "status": "ACTIVE", "type": "SYSTEM_DEFINED" }

roo setings

Image

roo error:

Image

this is the error from ROO

Error with custom ARN: 1 validation error detected: Value 'arn:aws:bedrock:eu-west-1:104029271467:foundation-model/anthropic.claude-3-7-sonnet-20250219-v1:0' at 'modelId' failed to satisfy constraint: Member must satisfy regular expression pattern: (arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:imported-model/[a-z0-9]{12})|([0-9]{12}:provisioned-model/[a-z0-9]{12})|([0-9]{12}:provisioned-model-v2/[a-z0-9]{12})|([0-9]{12}:performance-tier-provision/[a-z0-9]{12})))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|(([0-9a-zA-Z][-]?)+)|(arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{1,20}):(|[0-9]{12}):(model-gateway|inference-profile|application-inference-profile)/[a-zA-Z0-9-:.]+)|([a-zA-Z0-9-:.]+)|(^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:prompt/[0-9a-zA-Z]{10}(?::[0-9]{1,5})?))$|(^arn:aws:sagemaker:[a-z0-9-]+:[0-9]{12}:endpoint/[a-zA-Z0-9-]+$)|(^arn:aws(-[^:]+)?:bedrock:([0-9a-z-]{1,20}):([0-9]{12}):(default-)?prompt-router/[a-zA-Z0-9-:.]+$)_

_Please check:

  1. Your AWS credentials are valid and have the necessary permissions
  2. The ARN format is correct
  3. The region in the ARN matches the region where you're making the request`_

Relevant API REQUEST output

validation error detected: Value 'arn:aws:bedrock:eu-west-1:104029271467:foundation-model/anthropic.claude-3-7-sonnet-20250219-v1:0' at 'modelId' failed to satisfy constraint: Member must satisfy regular expression pattern: (arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|([0-9]{12}:imported-model/[a-z0-9]{12})|([0-9]{12}:provisioned-model/[a-z0-9]{12})|([0-9]{12}:provisioned-model-v2/[a-z0-9]{12})|([0-9]{12}:performance-tier-provision/[a-z0-9]{12})))|([a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}([.:]?[a-z0-9-]{1,63}))|(([0-9a-zA-Z][-]?)+)|(arn:aws(|-us-gov|-cn|-iso|-iso-b):bedrock:(|[0-9a-z-]{1,20}):(|[0-9]{12}):(model-gateway|inference-profile|application-inference-profile)/[a-zA-Z0-9-:.]+)|([a-zA-Z0-9-:.]+)|(^(arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:[0-9]{12}:prompt/[0-9a-zA-Z]{10}(?::[0-9]{1,5})?))$|(^arn:aws:sagemaker:[a-z0-9-]+:[0-9]{12}:endpoint/[a-zA-Z0-9-]+$)|(^arn:aws(-[^:]+)?:bedrock:([0-9a-z-]{1,20}):([0-9]{12}):(default-)?prompt-router/[a-zA-Z0-9-:.]+$)_

Additional context

Update from today : yesterday i was not able to pick the model from the list of predefined models - when i picked i was getting error

Invocation of model ID anthropic.claude-3-7-sonnet-20250219-v1:0 with on-demand throughput isn’t supported. Retry your request with the ID or ARN of an inference profile that contains this model.

SO seems like we have workaround - but the custom ARN still does not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - Needs InfoMissing details or unclear. Waiting on author to provide more context.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions