Model catalog generator
Run from the repository root:
go generate ./internal/llm
The generated internal/llm/catalog.generated.json is committed and embedded
by catalog.go, so normal builds and application startup do not need network
or filesystem access.
The generator uses the same catalog layers as pi-ai:
- Models.dev is the primary source. It is an open-source
database created by OpenCode and maintained as provider/model TOML files in
sst/models.dev.
- OpenRouter supplies its live routed
model catalog and pricing.
- Vercel AI Gateway supplies its live
gateway catalog and pricing.
These are catalog aggregators, not authoritative model vendors. Provider API
documentation remains the source of truth when metadata conflicts. Local
normalization and compatibility overrides live in main.go and should stay
small and explicit.
Only models whose protocol is implemented by the Go package are emitted.
Currently those protocols are openai-completions and anthropic-messages.
The generated JSON is grouped by provider at the top level.