Skip to content

fix(#243): claude on aws bedrock - #241

Merged
thdxr merged 3 commits into
anomalyco:devfrom
Dizzzmas:fix/bedrock-claude
Jun 20, 2025
Merged

thdxr merged 3 commits into
anomalyco:devfrom
Dizzzmas:fix/bedrock-claude

Conversation

@Dizzzmas

@Dizzzmas Dizzzmas commented Jun 20, 2025 •

Copy link
Copy Markdown
Contributor

Problem

#243
It's nice to have model expenses be part of the AWS bill & currently opencode doesn't work for me with Claude on Bedrock

With proper AWS credentials and region set in my env I'm getting this error when prompting:

AI_APICallError: undefined: Invocation of model ID anthropic.claude-sonnet-4-20250514-v1:0 with on-demand throughput isn’t supported. Retry your request with the ID or ARN of an inference profile that contains model
Screenshot 2025-06-20 at 13 43 51

Using Claude models on Bedrock seems to require specifying the region in model ID
Screenshot 2025-06-20 at 13 45 14

Suggested Solution

Detect bedrock + claude being used and append the aws region prefix from env to model ID

Tested it & worked well:
Screenshot 2025-06-20 at 13 49 02

@Dizzzmas Dizzzmas changed the title fix: claude on aws bedrock fix(#243): claude on aws bedrock Jun 20, 2025
@bchilcott

Copy link
Copy Markdown

Did you try this with models in different regions? It seems like that is no longer working #467

andreipromarketing-dev pushed a commit to andreipromarketing-dev/opencode that referenced this pull request Apr 7, 2026
docs: require default directory creation for initial user-level rules
bussard76 pushed a commit to bussard76/openwork that referenced this pull request May 12, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
meSingh pushed a commit to meSingh/opencode that referenced this pull request Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants