Skip to content

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

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

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

Conversation

@rekram1-node

Copy link
Copy Markdown
Contributor

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.

@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant