Skip to content

chore(ci): refresh v2 models.dev snapshot on a schedule - #50030

Merged
rekram1-node merged 1 commit into
devfrom
models-snapshot-cron-dev
Sep 19, 2026
Merged

rekram1-node merged 1 commit into
devfrom
models-snapshot-cron-dev

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Same workflow as #50010, opened against dev because schedule: triggers only fire from the repository's default branch.

Every 30 minutes (or on manual dispatch) this checks out v2, runs packages/core/script/update-models-snapshot.ts, and if packages/core/src/models-dev/snapshot.txt changed, commits it straight to v2 as the OpenCode bot — the same setup-git-committer + pull --rebase + push HEAD:v2 pattern nix-hashes.yml uses. Nothing on dev is read or written except this workflow file itself.

Context: that snapshot is v2's boot-time catalog floor on a cold cache. It went unrefreshed from 2026-08-11 until #50009, so every v2 release in between shipped a catalog ~1,500 models behind live.

Notes:

  • Uses oven-sh/setup-bun directly instead of the repo's setup-bun composite: the script is dependency-free (fetch + Bun.write), so the monorepo bun install would be wasted every half hour.
  • The script refuses to write when the response has fewer than 100 providers, so a models.dev error page never gets committed.
  • Each bot commit is a push to v2, which triggers v2's publish.yml (dev channel), same as nix-hashes commits do today. models.dev changes a few times a day, so expect a few extra dev publishes. Appending [skip ci] to the commit message is a one-line change if that's unwanted.
  • chore(ci): refresh bundled models.dev snapshot on a schedule #50010 carries the identical file on v2. Merging both is harmless — only the default branch's copy schedules, so there's no double run — and it means the cron keeps working unchanged when v2 becomes the default.

@rekram1-node
rekram1-node merged commit 83abc64 into dev Sep 19, 2026
10 checks passed
@rekram1-node
rekram1-node deleted the models-snapshot-cron-dev branch September 19, 2026 21:46
rldona pushed a commit to rldona/FlupCode that referenced this pull request Sep 24, 2026
Jovan1666 pushed a commit to Jovan1666/opencode that referenced this pull request Oct 4, 2026
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