Skip to content

Conversation

@inercia
Copy link

@inercia inercia commented Oct 17, 2025

  • AWS Bedrock provider, supporting multiple model families (Anthropic Claude, Amazon Titan, Meta Llama, and Mistral).

@inercia inercia requested a review from a team as a code owner October 17, 2025 10:58
@inercia inercia force-pushed the inercia/aws-bedrock-provider branch from d2e7d92 to 93b0ac6 Compare October 17, 2025 11:51
@inercia inercia requested a review from rumpl October 17, 2025 11:52
@inercia inercia force-pushed the inercia/aws-bedrock-provider branch 2 times, most recently from 780d7fd to f5a38ac Compare October 20, 2025 08:19
// 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 {
Copy link
Member

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

Copy link
Author

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.

@rumpl
Copy link
Member

rumpl commented Oct 20, 2025

@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]>
@inercia inercia force-pushed the inercia/aws-bedrock-provider branch from f5a38ac to 24e64ba Compare October 21, 2025 09:42
@inercia
Copy link
Author

inercia commented Oct 21, 2025

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"

@krissetto krissetto added kind/enhancement New feature or request and removed enhancement labels Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants