You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using ocr for some time now and my company got us on a plan for aws bedrock models, that use claude underneath. We no longer have api keys for claude.
AWS Bedrock support is a valuable feature request.
As a temporary workaround, you can try accessing Claude models on AWS Bedrock via the OpenAI-compatible bedrock-mantle endpoint. Since open-code-review already supports the OpenAI Chat Completions API, you may be able to configure it to point to Bedrock's endpoint (see AWS Doc for more details):
Generate a Bedrock API key from the AWS Console (Bedrock → API keys)
However, if your enterprise environment restricts the use of OpenAI-compatible endpoints and requires the native AWS SDK / Bedrock Converse API (e.g. for IAM role-based auth), please subscribe to PR #52 — it's a work-in-progress feature specification for adding multi-provider support, which aims to include native AWS Bedrock integration as a supported provider.
We'll keep this issue updated as the multi-provider support feature progresses. Thanks for your patience!
$ ocr config set llm.url https://bedrock-mantle.us-east-2.api.aws/v1
Set llm.url = https://bedrock-mantle.us-east-2.api.aws/v1
$ ocr llm test
Error: llm request failed: POST "https://bedrock-mantle.us-east-2.api.aws/v1/v1/messages": 404 Not Found
No matter what llm.url I use, /v1/messages always get included
$ ocr config set llm.url https://bedrock-mantle.us-east-2.api.aws/v1
Set llm.url = https://bedrock-mantle.us-east-2.api.aws/v1
$ ocr llm test
Error: llm request failed: POST "https://bedrock-mantle.us-east-2.api.aws/v1/v1/messages": 404 Not Found
No matter what llm.url I use, /v1/messages always get included
Thank you for your contribution! We are working on supporting the ability to preset multiple providers, and will roll it out as soon as possible. Once available, you will be able to extend it based on our provider capabilities.
$ ocr config set llm.url https://bedrock-mantle.us-east-2.api.aws/v1
Set llm.url = https://bedrock-mantle.us-east-2.api.aws/v1
$ ocr llm test
Error: llm request failed: POST "https://bedrock-mantle.us-east-2.api.aws/v1/v1/messages": 404 Not Found
No matter what llm.url I use, /v1/messages always get included
It seems that you're using an openai-compatible model url with anthropic sdk, maybe you can try this:
ocr config set llm.url https://bedrock-mantle.us-east-2.api.aws/v1
ocr config set llm.use_anthropic false
The extra llm.use_anthropic false will ensure that openai sdk will be used.
Hi @sh4ka — thanks for raising this. Good news: AWS Bedrock is now usable with OCR through a couple of paths:
LiteLLM AI Gateway — We recently added a built-in LiteLLM preset that includes bedrock/anthropic.claude-sonnet-4-6-v1 as a model option. If you run LiteLLM as a proxy in front of Bedrock, OCR works out of the box.
Custom provider — Since Bedrock now offers an OpenAI-compatible chat completions endpoint, you can configure a custom provider pointing directly at your Bedrock runtime URL.
That said, we don't yet have a dedicated built-in Bedrock preset (with native SigV4 auth, region selection, etc.) — if that's something you'd find valuable and are interested in contributing, we'd welcome a PR adding Bedrock as a first-class provider in internal/llm/providers.go. Happy to help scope it out in an issue if you'd like to discuss the approach first.
Activity
stay-foolish-forever commentedon Jun 5, 2026
@sh4ka Thanks for opening this issue!
AWS Bedrock support is a valuable feature request.
As a temporary workaround, you can try accessing Claude models on AWS Bedrock via the OpenAI-compatible bedrock-mantle endpoint. Since open-code-review already supports the OpenAI Chat Completions API, you may be able to configure it to point to Bedrock's endpoint (see AWS Doc for more details):
However, if your enterprise environment restricts the use of OpenAI-compatible endpoints and requires the native AWS SDK / Bedrock Converse API (e.g. for IAM role-based auth), please subscribe to PR #52 — it's a work-in-progress feature specification for adding multi-provider support, which aims to include native AWS Bedrock integration as a supported provider.
We'll keep this issue updated as the multi-provider support feature progresses. Thanks for your patience!
richin13 commentedon Jun 10, 2026
@stay-foolish-forever I tried that but I keep getting this error:
No matter what
llm.urlI use,/v1/messagesalways get includedlizhengfeng101 commentedon Jun 11, 2026
Thank you for your contribution! We are working on supporting the ability to preset multiple providers, and will roll it out as soon as possible. Once available, you will be able to extend it based on our provider capabilities.
stay-foolish-forever commentedon Jun 11, 2026
It seems that you're using an openai-compatible model url with anthropic sdk, maybe you can try this:
The extra
llm.use_anthropic falsewill ensure that openai sdk will be used.lizhengfeng101 commentedon Jul 17, 2026
Hi @sh4ka — thanks for raising this. Good news: AWS Bedrock is now usable with OCR through a couple of paths:
LiteLLM AI Gateway — We recently added a built-in LiteLLM preset that includes
bedrock/anthropic.claude-sonnet-4-6-v1as a model option. If you run LiteLLM as a proxy in front of Bedrock, OCR works out of the box.Custom provider — Since Bedrock now offers an OpenAI-compatible chat completions endpoint, you can configure a custom provider pointing directly at your Bedrock runtime URL.
That said, we don't yet have a dedicated built-in Bedrock preset (with native SigV4 auth, region selection, etc.) — if that's something you'd find valuable and are interested in contributing, we'd welcome a PR adding Bedrock as a first-class provider in
internal/llm/providers.go. Happy to help scope it out in an issue if you'd like to discuss the approach first.Thanks again for the suggestion!