Skip to content

chore(ci): refresh models.dev snapshot in the release pipeline - #50011

Open
rekram1-node wants to merge 1 commit into
v2from
release-models-snapshot
Open

rekram1-node wants to merge 1 commit into
v2from
release-models-snapshot

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Third piece after #50009 (refresh) and #50010 (cron). Makes publish.yml refresh the bundled models.dev snapshot before building, so every release ships the current catalog even if the last scheduled refresh was a while ago or a bot commit hasn't landed yet.

  • The version job runs bun run update-models-snapshot once and uploads snapshot.txt as a models-dev-snapshot artifact.
  • The three jobs that bundle @opencode/core — build-cli, build-node-app-archive, and publish (which builds the @opencode/core npm package) — download it before setup-bun/build, so all artifacts of one release carry an identical catalog.
  • The refresh step is continue-on-error: true: a models.dev outage ships the committed snapshot rather than blocking the release (the step still shows as failed in the run).

The committed snapshot.txt is untouched by this workflow — nothing is written back to the repo — so from-source, embedded, and nix builds are unaffected; keeping the committed copy fresh is #50010's job.

This mirrors what dev had: the legacy CLI build fetched api.json at build time via packages/opencode/script/generate.ts and injected it as the OPENCODE_MODELS_DEV define. #41838 replaced that with the committed snapshot (so from-source and embedded hosts get a floor at all) but dropped the per-release fetch; this restores it on top.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant