Skip to content

Commit 0894de1

Browse files
authored
fix(ai): build from the committed model catalog instead of refetching it (PrimeIntellect-ai#2038)
`npm run build` in packages/ai ran `generate-models` on every build, fetching the live model catalog and rewriting `src/models.generated.ts` in place. When an upstream source drops a model that the repo still references (currently claude-sonnet-4.5, 28 references), every CI run fails `Build and check` and `Test (ai)` regardless of the PR's content, and release builds (build-binaries.yml) ship a catalog nobody reviewed. Build now compiles the committed catalog only. Refreshing the catalog stays an explicit, reviewed step: `npm run generate-models`. The generated file is the script's only output and is committed, so clean checkouts build and test without network access to the catalog sources. Linear: RES-1269
1 parent bf8894a commit 0894de1

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Changed the build to compile from the committed model catalog instead of refetching it; run `npm run generate-models` explicitly to refresh `models.generated.ts`.

‎packages/ai/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"scripts": {
6666
"clean": "shx rm -rf dist",
6767
"generate-models": "npx tsx scripts/generate-models.ts",
68-
"build": "npm run generate-models && tsgo -p tsconfig.build.json",
68+
"build": "tsgo -p tsconfig.build.json",
6969
"dev": "tsgo -p tsconfig.build.json --watch --preserveWatchOutput",
7070
"dev:tsc": "tsgo -p tsconfig.build.json --watch --preserveWatchOutput",
7171
"test": "vitest --run",

0 commit comments

Comments
 (0)