MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / synthetic_variant_names

Function synthetic_variant_names

crates/opencode-server/src/routes.rs:2219–2238  ·  view source on GitHub ↗
(provider_id: &str, model: &ModelsDevInfo)

Source from the content-addressed store, hash-verified

2217}
2218
2219fn 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
2240fn max_tokens_for_variant(default_max_tokens: u64, variant: Option<&str>) -> u64 {
2241 match variant.map(|v| v.trim().to_ascii_lowercase()) {

Callers 1

Calls 2

newFunction · 0.85
containsMethod · 0.80

Tested by

no test coverage detected