chore: build releases from a pinned models.dev snapshot
The release build fetches live models.dev, so v0.1.21-cdp-user-agent.1 bundles a newer catalog that marks gemini-3.5-flash deprecated, so a fresh cloud worker, which reads the bundled catalog until its first models.dev refresh or when that refresh fails, drops that configured model.
This change builds each release from packages/opencode/script/models-dev-snapshot.json.gz, through the existing MODELS_DEV_API_JSON input of generate.ts, for both the full and the serve-only builds, and that step fails when the checkout is not the release tag.
The snapshot is the catalog of v0.1.21-stream-retry.1, extracted from its linux-x64 binary (bc64b3e1… inside bcode-linux-x64.tar.gz 8e797f8a…): 324 providers, gemini-3.5-flash without status, minimax-m3 family minimax.
Proof: a local bun script/build.ts --single with this snapshot gives a binary whose embedded catalog text equals the catalog text of v0.1.21-stream-retry.1 byte for byte.
After the merge, the tag v0.1.21-cdp-user-agent.2 gives cloud a bcode with the CDP User-Agent and the old catalog; a later commit refreshes the snapshot on purpose.
🤖 Generated with Claude Code