mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-27 11:02:33 +01:00
ced6b5e2cd
## Summary The Amazon Bedrock provider had a hard-coded model list, so every new model needed a Zed release. It now asks Bedrock which models the account can reach (`ListInferenceProfiles` and `ListFoundationModels`) and offers every streamed text model that has an inference profile. Limits and capabilities come from the public [models.dev](https://models.dev) catalog. Without the two `List` permissions, or with a custom endpoint, Zed offers the models that models.dev lists for the Region. Settings changes (Region, endpoint, authentication method, profile) now apply without a restart. Supersedes #65418 and #67212. Also fixes #59986. Behavior changes: - Models are offered under their foundation model id, so saved Bedrock model selections must be made again. - Built-in Mantle models and models without an inference profile are no longer listed. They can be added as custom models. - The default model is the newest active Claude Sonnet that the account lists, and the newest active Claude Haiku for the fast default. - A signed-out provider no longer sends requests. The first commit upgrades the AWS SDK crates. ## Testing - `cargo test -p bedrock`, `cargo test -p language_models`, and `./script/clippy -p bedrock -p language_models`. - Thinking request shapes checked against a real account in `us-east-1` with `aws bedrock-runtime converse`. - To try it: sign in to Amazon Bedrock with credentials that have the two `List` permissions, then open the model picker. ## Self-review - [x] I've reviewed my diff for quality, security, reliability, and performance. - [x] UI changes follow the [checklist](https://zed.dev/docs/development/ui-checklist). - [x] Tests cover the new or changed behavior. ## Suggested AGENTS.md additions - An async `#[gpui::test]` discards a returned `Result`, so a test that returns `Err` passes. Await a fallible inner future and check its result instead. Release Notes: - Added automatic discovery of Amazon Bedrock models through inference profiles. --------- Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>