genmodels

command
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 13 Imported by: 0

README

Model catalog generator

Run from the repository root:

go generate ./llm

The generated 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 draws on several public catalog layers:

  • 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 public model catalogs. 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