fix: load modelparams >= 0.0.58 catalogs and bump to 0.0.72
Refs #3103
Why
The backend reads the vendored modelparams catalog (dist/generated/data.js) with a regex. Since modelparams 0.0.58 that file defines the array as const GENERATED_CATALOG = [...] and re-exports it as CATALOG. The old regex captured the identifier instead of the array, so JSON.parse threw while ProviderParamSpecService was constructed and the backend could not boot on any newer version. That is also why the Dependabot group bump (#3108) cannot be merged as it stands.
With the loader fixed, the bump to 0.0.72 gives the offline and cold-boot seed (also used with MODELPARAMS_API_DISABLED) the parameter specs for gpt-6-luna, gpt-6-astra, gpt-6-sol, gpt-6.1-sol and claude-fable-5-1, including their Bedrock ids. Online installs already get these from the hourly refresh.
What changes
Two commits. The loader goes first and passes on its own with 0.0.57; the bump comes second.
provider-param-spec.service.ts: one regex change. It matches the array literal itself, in both the old and the new layout, and is anchored on the array and its closing];on column 0 (the file is generated withJSON.stringify(..., 4)). The error message for an unknown shape is unchanged. Production code: 1 line plus 3 of comments.modelparams^0.0.57to^0.0.72in the backendpackage.json, and themodelparamsentry inpackage-lock.json. Nothing else in the lockfile changes (8 lines). I edited those lines by hand and checked them withnpm ci, becausenpm installrewrites about 360 unrelated lines of this lockfile (devOptional/devflips and thepackages/manifestversion), which is already the case onmain.- Two specs: one runs the loader against both layouts and an unknown shape with the file content mocked; one reads the real installed package and pins a few ids on purpose, as a canary for future bumps.
- A changeset (
manifest, patch).
What does not change
No runtime behaviour for installs already on a working catalog, no API or database changes, no other dependency.
How it was done
The specs were written first. Against the old loader with 0.0.72 installed they fail with Unexpected token 'G', "GENERATED_CATALOG" is not valid JSON. The regex was run against the real files of 0.0.57, 0.0.58, 0.0.67 and 0.0.72 (382, 382, 481 and 490 entries) and a few hostile synthetic layouts.
Testing
npm ci --ignore-scriptson a clean copy with Node 24: the lockfile is unchanged andmodelparams@0.0.72is hoisted at the root.- Backend unit suite: 519 suites, 9741 tests, all passing.
tsc,eslint(0 errors),prettierand the changeset check are clean. - Boot smoke test with
MODELPARAMS_API_DISABLED=true: 489 entries;gpt-6-lunaandclaude-fable-5-1resolve, also through their Bedrock ids. shared(489) andcli(325) pass. Failures that this PR does not touch: onefrontendtest (Account.test.tsxexpects the text "August 15, 2026", a date that has passed) and the e2e tests ST-07 and ST-08, which also fail on an unmodifiedmain.
Caveats
- This PR should land before #3108, which also bumps
modelparamsto 0.0.72 but lacks the loader. After merge, Dependabot can rebase #3108 and itsmodelparamschange becomes a no-op. #3108's CI currently fails earlier, innpm ci(Missing: zod@4.6.7 from lock file); that is independent of this PR and not addressed here. - Offline seed: the 0.0.72 catalog has
minimax/MiniMax-*with its original capitalization and no lowercaseminimax-*entries for theminimaxprovider, so a lowercase lookup can fall through to another provider's entry. Online installs are served by the live refresh. Not addressed here. gpt-6.1-terradoes not exist inmodelparams0.0.72 (there isgpt-5.6-terra). That needs a fix upstream, so this PR does not resolve that item of #3103, hence "Refs".- The regex assumes the generator keeps writing
];on column 0. If it changes, the backend fails at boot and in CI instead of loading a wrong catalog in almost every case.
Summary by cubic
Fixes the backend catalog loader that failed on modelparams 0.0.58 and newer, and bumps modelparams to 0.0.72 so GPT-6 (luna, astra, sol), GPT-6.1 sol, and Claude Fable 5.1 parameter specs are available offline and on cold boot.
- The loader now matches the array literal in both the old
CATALOGand newGENERATED_CATALOGlayouts instead of the identifier, which previously madeJSON.parsethrow and prevented boot on newer versions. - Adds loader tests for both layouts and an unknown shape, plus a canary spec that pins model ids from the real installed package to catch future drops.
- Adds a patch changeset and updates only the
modelparamsentry in the lockfile.
Note: gpt-6.1-terra is not in 0.0.72 and needs an upstream fix, so that item of #3103 stays open. This PR should land before #3108 so Dependabot can rebase it as a no-op.