Add a model, provider binding, price or per-model behavior quirk as typed catalog data in `internal/router/catalog`. Use when adding or changing a model, or when code needs to behave differently for some models or providers.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Add Model Or Quirk?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/weave-os-add-model-or-quirk)
---
name: add-model-or-quirk
description: Add a model, provider binding, price or per-model behavior quirk as typed catalog data in `internal/router/catalog`. Use when adding or changing a model, or when code needs to behave differently for some models or providers.
---
# Add a model or quirk
`internal/router/catalog` is the single source of truth for per-model data. Code reads typed catalog fields; it never branches on a model or provider name string.
## Steps
1. Read [internal/router/catalog/CLAUDE.md](../../../internal/router/catalog/CLAUDE.md) and find the existing fields:
```bash
rg -n 'type (Model|ProviderBinding) struct' -A40 internal/router/catalog --type go
```
2. **New model:** add its catalog entry (tier, provider bindings, pricing, caps) following neighboring entries.
3. **New quirk:** if no field expresses it, add a typed field (a bool, enum or small struct named for the behavior, e.g. "rejects X", not for the model) on the model or the provider binding, whichever the quirk depends on. Set it in data for every affected entry.
4. Change the code that needs the behavior to read the field through the catalog lookup it already has. Remove any name match it replaces.
5. Add a catalog test asserting the field's value for the affected entries, and a behavior test in the consuming package driven by the field rather than a model name.
6. Regenerate derived artifacts: `make generate-statusline` when model or pricing data changed.
## Never
`strings.HasPrefix(model, …)`, `strings.Contains(model, …)`, `strings.EqualFold` on model/provider names, or name maps outside `internal/router/catalog`.
## Escalate
Ask the catalog CODEOWNER (`.github/CODEOWNERS`) before changing pricing for an existing model or removing a model that may be pinned in live sessions.
## Verify
```bash
go test ./internal/router/catalog/...
git diff origin/main -- internal ':!internal/router/catalog' | rg '^\+.*strings\.(HasPrefix|Contains|EqualFold)\(.*(model|provider)' # expect no output
make arch-ratchet # when the target exists
make check-changed
```