-
Notifications
You must be signed in to change notification settings - Fork 151
AWS Bedrock provider support #542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
inercia
commented
Oct 17, 2025
- AWS Bedrock provider, supporting multiple model families (Anthropic Claude, Amazon Titan, Meta Llama, and Mistral).
d2e7d92 to
93b0ac6
Compare
780d7fd to
f5a38ac
Compare
| // processClaudeChunk processes Claude model chunks | ||
| func (a *StreamAdapter) processClaudeChunk(chunk []byte) (chat.MessageStreamResponse, error) { | ||
| // Claude chunks follow the Messages API streaming format | ||
| var claudeChunk struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more of a question in general about the code, I see there's a lot of hand-made code for calling different models, doesn't AWS provide an SDK that can help with these? I'm not really a pro in aws and their sdks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. This was based on some previous code of mine, but I have updated the code for using more modern features of the AWS Bedrock SDK.
|
@inercia small update, sorry this is taking this long, I'm trying to get access to Bedrock to try this out. Had a small question, see above. This is a lot of code, can we ping you if we have some issues in the future with this part of the code? :) |
- AWS Bedrock provider, supporting multiple model families (Anthropic Claude, Amazon Titan, Meta Llama, and Mistral). Signed-off-by: Alvaro Saurin <[email protected]>
f5a38ac to
24e64ba
Compare
|
Thanks for reviewing this. Just for the record, I have been testing this with the following code: #!/bin/bash
# get the AWS Bedrock creds
set -a
source .env.bedrock
export OPENAI_API_KEY="empty"
export ANTHROPIC_API_KEY="empty"
echo "************************************************"
./bin/cagent run --model="amazon-bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0" \
--debug --tui=false --yolo \
./examples/haiku.yaml \
"Write a haiku about the weather"
echo "************************************************"
./bin/cagent run --model="amazon-bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0" \
--debug --tui=false --yolo \
./examples/script_shell.yaml \
"Show me all the GitHub repositories for GitHub user 'inercia'"
echo "************************************************"
./bin/cagent run --model="amazon-bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0" \
--debug --tui=false --yolo \
./examples/pythoninst.yaml \
"Create a Python program for calculating the Fibonacci sequence. Find the optimal algorithm for the task. Check the code works by running it"
|