Is aws bedrock hosted models supported? I have bee...
# questions
b
Is aws bedrock hosted models supported? I have been using my aws bedrock for claude code and I was trying if I can do the same for openhands export LLM_MODEL=anthropic/apac.anthropic.claude-sonnet-4-20250514-v1:0 export LLM_BASE_URL=https://bedrock-runtime.ap-southeast-2.amazonaws.com export LLM_API_KEY=mykey
Copy code
[12/23/25 23:08:09] ERROR    litellm.APIConnectionError: 'content'                                                                      retry_mixin.py:124
                             Traceback (most recent call last):
also tried export LLM_MODEL=bedrock/apac.anthropic.claude-sonnet-4-20250514-v1:0
Copy code
[12/23/25 23:10:27] ERROR    litellm.APIConnectionError: No module named 'boto3'                                                        retry_mixin.py:124
                             Traceback (most recent call last):
after a few digging, installing boto3 and setting the bedrock api key worked. šŸŽ‰ merry Christmas
Copy code
uv pip install boto3

export AWS_BEARER_TOKEN_BEDROCK=your_bedrock_api_key
šŸ™Œ 1
w
Glad you figured it out! Sorry for the delayed response
c
Hey @bright-eve-38596, are you using the SDK or GUI? If it is the SDK, maybe we should include
boto3
as an include dependency if it is not too large
w
IIRC we may have decided not to include every LLM dependency because you have to draw a line somewhere, and there are a dozen or so different LLM providers that need their own lib Open to reconsidering that though
b
@chilly-france-44439, I was using SDK,
Then for the CLI, here is my findings to use AWS Bedrock.
Copy code
# Install Openhands with boto3
uv tool install openhands --with boto3 

# Then use LLM (Advanced), set the model, base url of bedrock and the bedrock api key.

/settings >  LLM (Advanced)
model: bedrock/apac.anthropic.claude-sonnet-4-20250514-v1:0
custom url: <https://bedrock-runtime>.<region>.amazonaws.com
api key: bedrock api key
Now, what I am trying to figure out is how to set them via env variable as I want to test it out in the CICD pipeline, mainly github workflows. I guess, openhands cli only support settings from json and not fetching from env var?
Hi @wooden-umbrella-84098, no worries. And I agree as for the library, e.g.
boto3
is considered very large. Just a documentation on how to possibly set their own lib will do.
c
@nutritious-balloon-65098 please checkout OpenHands/docs repo, follow existing pattern there https://docs.openhands.dev/sdk/faq , and add a section about how we can use AWS Bedrock for the SDK.
n
I'm on it! Xingyao Wang can track my progress here.
c
I guess, openhands cli only support settings from json and not fetching from env var?
and cc @quick-window-91705 for bedrock šŸ‘€
n
Summary I've added a new FAQ section about using AWS Bedrock with the OpenHands SDK to
sdk/faq.mdx
, following the existing pattern on the page. Changes Made Checklist: • āœ… Added new FAQ section "How do I use AWS Bedrock with the SDK?" • āœ… Followed existing FAQ pattern (bold answer + Accordion with details) • āœ… Included boto3 installation instructions (pip, uv, CLI tool) • āœ… Documented both authentication options (API key and AWS credentials) • āœ… Added model configuration examples with
bedrock/
prefix • āœ… Included cross-region inference profile examples (US and APAC) • āœ… Added CLI configuration instructions • āœ… Linked to LiteLLM Bedrock documentation for additional details Pull Request Created draft PR: https://github.com/OpenHands/docs/pull/216 The documentation addresses the community feedback from the Slack conversation, explaining: 1. The need to install
boto3
separately 2. How to set
AWS_BEARER_TOKEN_BEDROCK
for API key authentication 3. The correct model naming format with
bedrock/
prefix 4. Cross-region inference profile usage Would you like me to make any changes to the content or mark the PR as ready for review? <sub>View full conversation</sub>
c
@nutritious-balloon-65098 please remove the CLI Configuration from the SDK FAQ
n
I'm on it! Xingyao Wang can continue tracking my progress here.
Summary I've added a new AWS Bedrock FAQ section to the SDK documentation at
sdk/faq.mdx
, following the existing pattern. Checklist • āœ… Added AWS Bedrock FAQ section following the existing pattern (H2 heading, bold answer, Accordion with details) • āœ… Included boto3 installation instructions (pip, uv, and CLI tool) • āœ… Documented both authentication options (API key via
AWS_BEARER_TOKEN_BEDROCK
and AWS credentials) • āœ… Showed model configuration with
bedrock/
prefix • āœ… Included cross-region inference profile examples (US and APAC) • āœ… Removed CLI configuration section as requested • āœ… Added link to LiteLLM Bedrock documentation for additional details Changes The final diff adds 72 lines to
sdk/faq.mdx
with a new FAQ section covering: 1. boto3 installation - Required dependency for Bedrock 2. Authentication - Two options (API key or AWS credentials) 3. Model configuration - Using
bedrock/
prefix with examples Pull Request The changes have been pushed and a draft PR is open: https://github.com/OpenHands/docs/pull/216 Would you like me to mark the PR as ready for review or make any other changes? <sub>View full conversation</sub>
m
Hi, For the local GUI setup, did we find a fix for Bedrock and boto3 issue?