bedrock: Use Claude 3.0 Haiku where Haiku 3.5 is not available (#33214)

Closes: https://github.com/zed-industries/zed/issues/33183

@kuzaxak Can you confirm this works for you?

Release Notes:

- bedrock: Use Anthropic Haiku 3.0 in AWS regions where Haiku 3.5 is
unavailable
This commit is contained in:
Peter Tripp 2025-06-22 15:15:20 -04:00 committed by GitHub
parent 1047d8adec
commit 595f61f0d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 19 deletions

View file

@ -108,8 +108,12 @@ pub enum Model {
}
impl Model {
pub fn default_fast() -> Self {
Self::Claude3_5Haiku
pub fn default_fast(region: &str) -> Self {
if region.starts_with("us-") {
Self::Claude3_5Haiku
} else {
Self::Claude3Haiku
}
}
pub fn from_id(id: &str) -> anyhow::Result<Self> {