Skip to main content

normalize_model_name

Function normalize_model_name 

Source
pub fn normalize_model_name(model: &str) -> String
Expand description

Normalize model names from full Claude model IDs to short names. Examples: “claude-sonnet-4-20250514” -> “sonnet”, “claude-opus-4-5” -> “opus”

This is used to ensure consistent model names across the system, whether they come from environment variables, config files, or are parsed from spec frontmatter.