(provider_id: &str, model: &ModelsDevInfo)
| 2217 | } |
| 2218 | |
| 2219 | fn synthetic_variant_names(provider_id: &str, model: &ModelsDevInfo) -> Vec<String> { |
| 2220 | if !model.reasoning { |
| 2221 | return Vec::new(); |
| 2222 | } |
| 2223 | |
| 2224 | let provider = provider_id.to_ascii_lowercase(); |
| 2225 | let model_id = model.id.to_ascii_lowercase(); |
| 2226 | let is_anthropic = provider.contains("anthropic") || model_id.contains("claude"); |
| 2227 | if is_anthropic { |
| 2228 | return vec!["high".to_string(), "max".to_string()]; |
| 2229 | } |
| 2230 | |
| 2231 | let is_google = |
| 2232 | provider.contains("google") || provider.contains("vertex") || model_id.contains("gemini"); |
| 2233 | if is_google { |
| 2234 | return vec!["high".to_string(), "max".to_string()]; |
| 2235 | } |
| 2236 | |
| 2237 | vec!["low".to_string(), "medium".to_string(), "high".to_string()] |
| 2238 | } |
| 2239 | |
| 2240 | fn max_tokens_for_variant(default_max_tokens: u64, variant: Option<&str>) -> u64 { |
| 2241 | match variant.map(|v| v.trim().to_ascii_lowercase()) { |
no test coverage detected