Skip to content

Commit a2da6f6

Browse files
authored
chore(models): change fallback model, align with all clients (#2624)
1 parent 575cb21 commit a2da6f6

File tree

1 file changed

+14
-28
lines changed
  • crates/chat-cli/src/cli/chat/cli

1 file changed

+14
-28
lines changed

crates/chat-cli/src/cli/chat/cli/model.rs

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ pub async fn get_available_models(os: &Os) -> Result<(Vec<ModelInfo>, ModelInfo)
170170
Err(e) => {
171171
tracing::error!("Failed to fetch models from API: {}, using fallback list", e);
172172

173-
let models = get_fallback_models(region);
173+
let models = get_fallback_models();
174174
let default_model = models[0].clone();
175175

176176
Ok((models, default_model))
@@ -188,33 +188,19 @@ fn default_context_window() -> usize {
188188
200_000
189189
}
190190

191-
fn get_fallback_models(region: &str) -> Vec<ModelInfo> {
192-
match region {
193-
"eu-central-1" => vec![
194-
ModelInfo {
195-
model_name: Some("claude-sonnet-4".to_string()),
196-
model_id: "claude-sonnet-4".to_string(),
197-
context_window_tokens: 200_000,
198-
},
199-
ModelInfo {
200-
model_name: Some("claude-3.5-sonnet-v1".to_string()),
201-
model_id: "claude-3.5-sonnet-v1".to_string(),
202-
context_window_tokens: 200_000,
203-
},
204-
],
205-
_ => vec![
206-
ModelInfo {
207-
model_name: Some("claude-sonnet-4".to_string()),
208-
model_id: "claude-sonnet-4".to_string(),
209-
context_window_tokens: 200_000,
210-
},
211-
ModelInfo {
212-
model_name: Some("claude-3.7-sonnet".to_string()),
213-
model_id: "claude-3.7-sonnet".to_string(),
214-
context_window_tokens: 200_000,
215-
},
216-
],
217-
}
191+
fn get_fallback_models() -> Vec<ModelInfo> {
192+
vec![
193+
ModelInfo {
194+
model_name: Some("claude-sonnet-4".to_string()),
195+
model_id: "claude-sonnet-4".to_string(),
196+
context_window_tokens: 200_000,
197+
},
198+
ModelInfo {
199+
model_name: Some("claude-3.7-sonnet".to_string()),
200+
model_id: "claude-3.7-sonnet".to_string(),
201+
context_window_tokens: 200_000,
202+
},
203+
]
218204
}
219205

220206
pub fn normalize_model_name(name: &str) -> &str {

0 commit comments

Comments
 (0)