-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add Bedrock Cloud Model provider #21092
base: main
Are you sure you want to change the base?
Add Bedrock Cloud Model provider #21092
Conversation
…rock errors, while also letting us include it
This still needs to be updated to the new method of managing models, going to spend the next couple of weeks migrating to it. |
Zed maintainers, would appreciate some guidance on how the ZedPro things are setup and if it makes sense to pass the Bedrock models into it. On a cursory reading of the feature, i don't believe it does -- however, i am open to working with the bedrock service team to make it a reality. |
I don't think you need to pass through the bedrock models through the collab service, as Zed would need to run their own bedrock setup. I'd just do the API key / AWS credentials route. |
Unfortunately, our CLA bot is broken, so I have to substitute for it for a while:
|
Will get it done post a legal review of the docs (just want to make sure AWS doesn't have an issue with it) |
@cla-bot check |
use thiserror::Error; | ||
|
||
use aws_sdk_bedrockruntime as bedrock; | ||
pub use aws_sdk_bedrockruntime as bedrock_client; |
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.
I see on https://docs.rs/aws-sdk-bedrockruntime/latest/aws_sdk_bedrockruntime/ that this requires tokio. Does this setup get around that to ensure it uses gpui's executors?
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.
I'll be honest, didn't think about that -- but, I don't believe so.
All the uses of tokio in the Bedrock SDK are opaque, so I don't know if they can be gotten around to use the gpui executors.
Probably to get around i'd have to implement SigV4 + use the raw HTTP client although it defeats the point of the SDK.
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.
In a similar vein I've had to export just the serde types and then construct the API calls inside of Zed. At the very least I wish that Zed's HttpClient
trait was exported so that it would be easier to build libraries that target GPUI.
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.
Do you think this could be possible with: the SDK config builder
Based on the source code it seems to accept an http_client as part of the config constructor.
Will see if i can implement it to accept the GPUI HttpClient.
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.
Rust will only be happy with that if they're the same HttpClient
trait between GPUI/Zed and the SDK config builder.
Closes #16544
Release Notes: