Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Comments

Close side panel

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

Merged
thdxr merged 3 commits intoanomalyco:devanomalyco/opencode:devfrom
Dizzzmas:fix/bedrock-claudeDizzzmas/opencode:fix/bedrock-claudeCopy head branch name to clipboard
Jun 20, 2025
Merged

fix(#243): claude on aws bedrock#241
thdxr merged 3 commits intoanomalyco:devanomalyco/opencode:devfrom
Dizzzmas:fix/bedrock-claudeDizzzmas/opencode:fix/bedrock-claudeCopy head branch name to clipboard

Conversation

@Dizzzmas
Copy link
Contributor

@Dizzzmas Dizzzmas commented Jun 20, 2025

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

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

achembarpu pushed a commit to achembarpu/opencode that referenced this pull request Aug 4, 2025
Co-authored-by: Dax Raad <d@ironbay.co>
m-pa pushed a commit to m-pa/opencode that referenced this pull request Dec 4, 2025
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.