genmodels

command
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 13 Imported by: 0

README

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.

Documentation

Overview

Command genmodels builds llm's checked-in model catalog from the same public catalogs used by pi-ai. The generated catalog intentionally includes only protocols implemented by this Go package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL