Skip to main content

codetether_agent/tui/app/smart_switch/
models.rs

1//! Fallback model lists per provider.
2
3/// Returns the ordered list of preferred fallback models for a given provider.
4pub fn smart_switch_preferred_models(provider_name: &str) -> &'static [&'static str] {
5    match provider_name {
6        "minimax" => &["MiniMax-M2.5", "MiniMax-M2.1", "MiniMax-M2"],
7        "minimax-credits" => &["MiniMax-M2.5-highspeed", "MiniMax-M2.1-highspeed"],
8        "zai" | "zai-api" => &["glm-5", "glm-4.7", "glm-4.7-flash"],
9        "openai-codex" => &["gpt-5-mini", "gpt-5", "gpt-5.1-codex"],
10        "openrouter" => &["z-ai/glm-5:free", "z-ai/glm-5", "moonshotai/kimi-k2:free"],
11        "github-copilot" | "github-copilot-enterprise" => &["gpt-5-mini", "gpt-4.1", "gpt-4o"],
12        "openai" => &["gpt-4o-mini", "gpt-4.1"],
13        "anthropic" => &["claude-sonnet-4-20250514", "claude-3-5-sonnet-20241022"],
14        "google" => &["gemini-2.5-flash", "gemini-2.5-pro"],
15        "gemini-web" => &["gemini-web-pro"],
16        _ => &[],
17    }
18}