Repository navigation
Closed
Description
It doesn't seem like AWS Bedrock models work in regions outside of us-east-1. If I don't set the AWS_REGION I get the following error:
You don't have access to the model with the specified model ID. callback error
I guess that is to be expected. However, if I set my AWS_REGION to a region where I do have access to the model, I get the following output:
opencode run hi --model amazon-bedrock/anthropic.claude-3-sonnet-20240229-v1:0 --print-logs
INFO 2025-06-27T15:18:22 +0ms service=bus type=message.part.updated subscribing
INFO 2025-06-27T15:18:22 +1ms service=session session=ses_84e081b3affer687bDcbeaV641 chatting
INFO 2025-06-27T15:18:22 +0ms service=app name=provider registering service
INFO 2025-06-27T15:18:22 +1ms service=models.dev refreshing
INFO 2025-06-27T15:18:22 +1ms service=provider init
INFO 2025-06-27T15:18:22 +44ms service=provider providerID=amazon-bedrock found
INFO 2025-06-27T15:18:22 +0ms service=provider providerID=amazon-bedrock modelID=anthropic.claude-3-sonnet-20240229-v1:0 getModel
INFO 2025-06-27T15:18:22 +1ms service=provider status=started providerID=amazon-bedrock getSDK
INFO 2025-06-27T15:18:22 +15ms service=provider status=completed duration=15 providerID=amazon-bedrock getSDK
INFO 2025-06-27T15:18:22 +1ms service=provider providerID=amazon-bedrock modelID=anthropic.claude-3-sonnet-20240229-v1:0 found
INFO 2025-06-27T15:18:22 +0ms service=session sessionID=ses_84e081b3affer687bDcbeaV641 locking
INFO 2025-06-27T15:18:22 +6ms service=bus type=storage.write publishing
INFO 2025-06-27T15:18:22 +0ms service=bus type=message.updated publishing
INFO 2025-06-27T15:18:22 +1ms service=bus type=storage.write publishing
INFO 2025-06-27T15:18:22 +0ms service=bus type=message.updated publishing
INFO 2025-06-27T15:18:22 +1ms service=app name=mcp registering service
ERROR 2025-06-27T15:18:23 +400ms service=session error=AI_APICallError: undefined: The provided model identifier is invalid. callback error
INFO 2025-06-27T15:18:23 +0ms service=bus type=session.error publishing
INFO 2025-06-27T15:18:23 +1ms service=session session=ses_84e081b3affer687bDcbeaV641 type=error part
INFO 2025-06-27T15:18:23 +0ms service=session session=ses_84e081b3affer687bDcbeaV641 type=error unhandled
INFO 2025-06-27T15:18:23 +3ms service=bus type=storage.write publishing
INFO 2025-06-27T15:18:23 +0ms service=bus type=message.updated publishing
INFO 2025-06-27T15:18:23 +0ms service=session sessionID=ses_84e081b3affer687bDcbeaV641 unlocking
INFO 2025-06-27T15:18:23 +51ms service=app name=session shutdown
INFO 2025-06-27T15:18:23 +0ms service=app name=mcp shutdown
The highlight here being:
AI_APICallError: undefined: The provided model identifier is invalid. callback error
Using models from the eu-west-2 marketplace is required in my organization.
Reacted by Daniel Jackson
Metadata
Metadata
Assignees
Labels
No labels
Activity
thdxr commentedon Jun 27, 2025
can you set AWS_REGION ?
bchilcott commentedon Jun 27, 2025
If I set
AWS_REGIONto the region where I have the model (eu-west-2 in my case), I get the error which I pasted in full above.Dizzzmas commentedon Jun 27, 2025
ahh, annoying
seems like this is an exception for
eu-west-2where it doesn't have & doesn't require a regional model IDe.g. in
current setup would work fine
my bad for not taking this into account when doing this PR: #241
i guess the fix would be having more detailed region checks for bedrock provider and transforming model id only in regions that require regional model IDs
Dizzzmas commentedon Jun 27, 2025
PR: #482
fix(anomalyco#467): more granular bedrock modelID based on aws region
fix(#467): more granular bedrock modelID based on aws region (#482)
naviniitk commentedon Aug 14, 2025
I am still getting this error
AI_APICallError: undefined: You don't have access to the model with the specified model ID.I am not sure if it's a problem with my setup but I did get access to the models in bedrock console
Fix reload-required spam; add auto-reload + resume (anomalyco#467)
fix(anomalyco#467): more granular bedrock modelID based on aws region (…
fix(anomalyco#467): more granular bedrock modelID based on aws region (…
feat(desktop): real integration logos, from the platform's own Logo.d…