Skip to content

Conversation

@dbkegley
Copy link

I decided to take a stab at #58 over the weekend. Creating this as draft for now because there's a bit of cleanup to be done still. Is this something that would be accepted if I spent some time cleaning everything up and adding tests?

I'm no rust developer so please don't assume anything you see in this PR was on purpose.

Implementation Notes

Adds a new awsbedrock api type. The only supported option is default_model.
Uses the rust aws-sdk to load the user's default credentials for their current environment. I considered adding a aws-profile option to the api config to allow overriding the aws credentials being used but decided to omit it for now.

The aws client is async so I had to add a direct dependency on tokio. I don't think this is a huge deal since the reqwest blocking client also uses tokio.

The errors returned from the aws-sdk are difficult to debug so that needs to be improved (maybe with a --debug flag?)

Adds a new ApiClient trait with ReqwestClient and AwsClient implementations.
Adds a new ApiError type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant