cmd/generatorfetches upstream model metadata from OpenRouter.- The generator merges upstream data with local YAML overrides in
models/. - The merged registry is emitted into
models_gen.go. cmd/translatorincrementally fills missingdescription_cnvalues insidemodels/.- After translation, rerun the generator so the new Chinese descriptions are embedded in
models_gen.go.
The repository uses go-task as the main developer entry point.
task fmt
task lint
task test
task build
task generator
task translator
task releasecheck
task syncPass additional flags to the Go CLIs after --:
task generator -- -fetch-only
task generator -- -models-dir ./models -output-go ./models_gen.go
task translator -- -provider OpenAI -limit 50
task translator -- -dry-run -id-prefix qwen/- Default upstream source: OpenRouter.
- Default behavior: fetch upstream data, update
models/, then regeneratemodels_gen.go. - Local YAML fields override upstream values when explicitly set.
- If upstream fetch fails, the generator can fall back to
data/models.json.
- Default behavior: translate only files with
descriptionpresent and missingdescription_cn. - Selection can be narrowed by
-provider,-id-prefix, and-limit. -dry-runshows which files would be translated without calling the LLM API.- Limited batches select the newest discovered untranslated models first.
The scheduled GitHub Action no longer uses the retired GitHub Models inference endpoint. Configure any OpenAI-compatible provider with an encrypted repository secret and optional repository variables:
gh secret set LLM_API_KEY
gh variable set LLM_BASE_URL --body https://api.openai.com/v1
gh variable set LLM_MODEL --body gpt-4o-miniWhen LLM_API_KEY is absent, AI model-card extraction and translation are skipped with an explicit workflow warning. The remaining deterministic sync pipeline continues to run.
models_gen.go: generated, do not edit manually.data/models.json: cached upstream payload, useful for debugging or offline fallback.
cmd/releasecheckcompares the latest git tag with the currentmodels_gen.go.- It triggers a release for model additions/removals and significant metadata changes.
- It treats
context_lengthandmax_outputcorrections as release-worthy model facts. - This is the source of truth used by GitHub Actions to decide whether a new tag should be published.
Run this before sending a change:
task ci