Skip to main content

Module model

Module model 

Source
Expand description

Model selection and detection logic.

Handles model name resolution with the following priority:

  1. CHANT_MODEL env var (explicit override)
  2. ANTHROPIC_MODEL env var (Claude CLI default)
  3. defaults.model in config
  4. Parse from claude --version output (last resort)

All model names are normalized to shorthand (e.g., “claude-sonnet-4-20250514” -> “sonnet”).

Functions§

get_model_name
Get the model name using the following priority:
get_model_name_with_default
Get the model name with an optional default from config. Used by parallel execution where full Config isn’t available.