Skip to content

Issue when using Amazon Bedrock #175

Closed

Description

@cgrevisse

Hi team,

I'm not sure whether my configuration for Bedrock is correct, which I believe is not fully covered in the documentation/examples.

In <kb>/.openkb/config.yaml, I currently have:

language: en
model: bedrock/eu.anthropic.claude-sonnet-4-6
aws_access_key_id: os.environ/AWS_ACCESS_KEY_ID
aws_secret_access_key: os.environ/AWS_SECRET_ACCESS_KEY
aws_region_name: os.environ/AWS_REGION_NAME
pageindex_threshold: 20

In <kb>/.env, I have:

AWS_ACCESS_KEY_ID=[REDACTED]
AWS_SECRET_ACCESS_KEY=[REDACTED]
AWS_REGION_NAME=eu-central-1
LLM_API_KEY=bedrock-api-key-[REDACTED]

When executing query or chat, I get the following error:

[ERROR] litellm.BadRequestError: BedrockException - {"message":"The model returned the following errors: tool_choice.type: Field required"}

I found an open issue at BerriAI/litellm#27184.

  1. Is my configuration correct? For instance, I'm not sure whether LLM_API_KEY is necessary here, or whether it's enough with the access key/secret access key pair.
  2. Is the error I'm getting indeed a LiteLLM issue, or something that can be fixed in OpenKB?

Activity

  1. KylinMountain commented on Jul 8, 2026

    @KylinMountain
    Collaborator

    Really appreciate the feedback! I don't currently have Bedrock API access, so I'll need to do some investigation to pinpoint and fix the issue. When I have a fix ready, would you be open to testing it on your end?

    And as always — if you spot any bugs or think of features you'd like to see, just shout!

  2. added
    bug
    good first issue
    on Jul 8, 2026
  3. cgrevisse commented on Jul 8, 2026

    @cgrevisse
    Author

    @KylinMountain Thanks for your quick response! I'd be more than happy to test and debug this together!

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

    buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions