-
Notifications
You must be signed in to change notification settings - Fork 617
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
feat: Add Bedrock provider #1008
Conversation
@unexge very nice! running the tests now |
Tokio's runtime panics on single threaded tests.
Added Bedrock to provider and truncate agent tests and fixed a few things to make it pass, now it looks good. You will need to set up some AWS credentials to run those tests in the CI though. Screen.Recording.2025-02-01.at.17.58.07.mov |
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.
thanks for the contribution! doing a little bit of testing on my side now as well
|
||
let message = from_bedrock_message(&message)?; | ||
let provider_usage = ProviderUsage::new(model_name.to_string(), usage); | ||
|
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.
can you add some kind of debug trace here that emits the payload, response, and usage? it helps us debug sessions by writing to the logs. elsewhere we've used the emit_debug_trace function in super::utils but the payload here is a bit different
Ok((message, provider_usage)) | ||
} | ||
} | ||
|
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.
might be better to move these bedrock formatting helpers into providers/formats/bedrock.rs, similar to what we have for openai, google, anthropic
I went ahead and made the above changes I requested in this PR: #1069 |
merged the changes in here: #1069 |
This PR adds Amazon Bedrock provider using
aws-sdk-bedrockruntime
crate and Converse API. It's in draft state yet. I plan to add some unit tests and perform some manual testing. I haven't used the UI app at all so far, and not sure if I need to make any changes there, if so I can do a follow-up PR.