Extending: Custom Models
Custom model entries let you define aliases, document context windows, and tag cost tiers
without changing the orchestrator. The model registry is optional; if a model is absent, the
orchestrator passes the raw model string through to the Coder AI Gateway.
Why Add Model Entries
- Stable aliases - Switch model versions in one place (e.g.,
claude-sonnet→claude-sonnet-4-20250514) - Context window hints - Inform the planner about token limits
- Cost tracking - Tag cost tiers (
low/medium/high) for budgeting dashboards
json
{
"models": [
{
"id": "claude-sonnet-4-20250514",
"provider": "anthropic",
"aliases": ["claude-sonnet", "sonnet"],
"context_window": 200000,
"cost_tier": "high"
},
{
"id": "gpt-4.1",
"provider": "openai",
"aliases": ["gpt-4-1"],
"context_window": 1000000,
"cost_tier": "high"
},
{
"id": "gpt-4o-mini",
"provider": "openai",
"aliases": [],
"context_window": 128000,
"cost_tier": "low"
}
]
}| Field | Type | Description |
|---|---|---|
id | string | Canonical model identifier used in agents.{"{role}"}.model. |
provider | string | Provider slug that hosts this model. |
aliases | array | Alternative names that resolve to this model. |
context_window | int | Approximate context window in tokens. Used by planner to estimate fit. |
cost_tier | string | low, medium, or high. Used for cost warnings. |
Configure in Coder Dashboard
Models must be configured in the Coder dashboard (AI Settings → Coder Agents → Models)
before they can be used. The registry.json model entries only provide
metadata; the actual provider credentials live in Coder.
Provider slugs
The
agents.{role}.provider value must match a provider slug configured
in the Coder AI Gateway. Common slugs: anthropic, openai,
google, fireworks, groq.