cataloggen

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package cataloggen normalizes the models.dev api.json shape into pi models.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(sources Sources) (map[string]map[string]ai.Model, error)

Generate converts the aggregated source listings. Radius is deliberately absent.

func Render

func Render(sources Sources) ([]byte, error)

Render converts the aggregated source listings into the checked-in Go source.

Types

type Sources

type Sources struct {
	ModelsDev  []byte // models.dev api.json snapshot
	NvidiaNIM  []byte // NVIDIA NIM /v1/models listing
	OpenRouter []byte // OpenRouter /api/v1/models listing
	Vercel     []byte // Vercel AI Gateway /v1/models listing
	// GeneratedAt stamps the rendered catalog so stale store overlays lose to
	// a newer bundled catalog (upstream remote-catalog-provider.ts).
	GeneratedAt time.Time
}

Sources aggregates the generator inputs. ModelsDev is required. NvidiaNIM, OpenRouter, and Vercel are the raw listings from the live provider APIs; when absent, NVIDIA falls back to the curated snapshot below and the OpenRouter and Vercel catalogs are omitted entirely (the bundled catalog keeps serving them).

Jump to

Keyboard shortcuts

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