Repository navigation
fix: load modelparams >= 0.0.58 catalogs and bump to 0.0.72 - #3109
Merged
guillaumegay13 merged 2 commits intoNov 4, 2026
Merged
Conversation
added 2 commits
November 3, 2026 11:55
Since modelparams 0.0.58 the generated data 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 the service was constructed and the backend could not boot on any newer version. Match the array literal itself, in either layout.
The vendored seed, used on cold boot, on offline installs and with MODELPARAMS_API_DISABLED, had no parameter specs for gpt-6-*, gpt-6.1-sol or claude-fable-5-1. This needs the loader from the previous commit, since 0.0.72 ships the new catalog file layout. The lockfile changes only the modelparams entry.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3109 +/- ##
=======================================
Coverage 96.20% 96.20%
=======================================
Files 673 673
Lines 39749 39749
Branches 11095 11144 +49
=======================================
+ Hits 38240 38241 +1
Misses 521 521
+ Partials 988 987 -1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #3103
Why
The backend reads the vendored
modelparamscatalog (dist/generated/data.js) with a regex. Sincemodelparams0.0.58 that file defines the array asconst GENERATED_CATALOG = [...]and re-exports it asCATALOG. The old regex captured the identifier instead of the array, soJSON.parsethrew whileProviderParamSpecServicewas 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 forgpt-6-luna,gpt-6-astra,gpt-6-sol,gpt-6.1-solandclaude-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.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.tsc,eslint(0 errors),prettierand the changeset check are clean.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
modelparamsto 0.0.72 but lacks the loader. After merge, Dependabot can rebase chore(deps): bump the patch-and-minor group across 1 directory with 27 updates #3108 and itsmodelparamschange becomes a no-op. chore(deps): bump the patch-and-minor group across 1 directory with 27 updates #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.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 Claude Fable 5.1 missing from model catalog, Fable 5 fails on Bedrock, and GPT-6 Terra has no routing parameters and error default Astra toll_choice #3103, hence "Refs".];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
modelparams0.0.58 and newer, and bumpsmodelparamsto 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.CATALOGand newGENERATED_CATALOGlayouts instead of the identifier, which previously madeJSON.parsethrow and prevented boot on newer versions.modelparamsentry in the lockfile.Note:
gpt-6.1-terrais 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.Written for commit 6b09189. Summary will update on new commits.