Help us shape the future of Go! Take the 2026 Go Developer Survey

gen

command
v1.151.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Command gen refreshes the models.dev catalog snapshot embedded in the docker-agent binary.

It fetches https://models.dev/api.json, re-marshals it through the trimmed modelsdev.Database type (dropping fields docker-agent never reads) and writes the result to pkg/modelsdev/snapshot.json together with a generated snapshot_date.txt recording when the snapshot was taken.

Run it via `go generate ./pkg/modelsdev/...` or the `task update-models` target. The fetch is best-effort: when models.dev is unreachable the existing snapshot is left untouched so offline builds keep working.

Jump to

Keyboard shortcuts

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