Documentation
¶
Overview ¶
Command gen-models has two jobs. With -src it reads upstream pi's generated catalog (models.generated.ts or .js and the provider data its shards import) and emits ai/models_generated.go and its companions:
go run ./cmd/gen-models \ -src .upstream/current/packages/ai/src/models.generated.ts \ -out ai/models_generated.go
Without -src it ports packages/ai/catalog/generate.ts: it fetches models.dev (v2), OpenRouter, Vercel AI Gateway, NVIDIA NIM and Radius, builds every provider's catalog (internal/modelgen/providers) and writes the provider data files (-data-output) and the public catalog JSON (-json-output), byte for byte as Pi's generator writes them.
Click to show internal directories.
Click to hide internal directories.