Skip to content

Support for AWS Bedrock #50

Closed
Closed

Description

@sh4ka

Problem Statement

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.

Proposed Solution

Allow the usage of aws bedrock as the llm agent.

Alternatives Considered

No response

Affected Area

Review Agent / LLM interaction

Additional Context

No response

Activity

  1. added
    enhancement
    on Jun 5, 2026
  2. added theissue type on Jun 5, 2026
  3. stay-foolish-forever commented on Jun 5, 2026

    @stay-foolish-forever
    Contributor

    @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!

  4. richin13 commented on Jun 10, 2026

    @richin13

    @stay-foolish-forever I tried that but I keep getting this error:

    $ 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

  5. lizhengfeng101 commented on Jun 11, 2026

    @lizhengfeng101
    Contributor

    @stay-foolish-forever I tried that but I keep getting this error:

    $ 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.

  6. stay-foolish-forever commented on Jun 11, 2026

    @stay-foolish-forever
    Contributor

    @stay-foolish-forever I tried that but I keep getting this error:

    $ 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.

  7. lizhengfeng101 commented on Jul 17, 2026

    @lizhengfeng101
    Contributor

    Hi @sh4ka — thanks for raising this. Good news: AWS Bedrock is now usable with OCR through a couple of paths:

    1. 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.

    2. 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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions