Skip to content

Commit 6c48b9c

Browse files
committed
Merge remote-tracking branch 'origin/release/v3.8.50' into feat/i-have-adhd-output-style
2 parents cd82bea + 0bd2be0 commit 6c48b9c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tests/unit/models-catalog-route.test.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1398,8 +1398,15 @@ test("v1 models catalog skips duplicate built-ins and custom models from inactiv
13981398
const duplicateBuiltins = body.data.filter((item) => item.id === "openai/gpt-4o-2024-11-20");
13991399

14001400
assert.equal(response.status, 200);
1401+
// Still exactly one entry: the custom row overlays the built-in, it does not duplicate it.
14011402
assert.equal(duplicateBuiltins.length, 1);
1402-
assert.equal(duplicateBuiltins[0].custom === true, false);
1403+
// #10248 changed the contract: a custom row for an id that already exists is the
1404+
// operator-owned overlay for that model (catalog.ts:1330) — its explicitly stored
1405+
// fields win over the discovered metadata, and the merged entry is flagged `custom`.
1406+
// Before #10248 the duplicate was skipped outright, so this asserted `false`.
1407+
assert.equal(duplicateBuiltins[0].custom, true);
1408+
// The overlay must keep the catalog identity rather than becoming a detached entry.
1409+
assert.equal(duplicateBuiltins[0].id, "openai/gpt-4o-2024-11-20");
14031410
assert.equal(
14041411
body.data.some((item) => item.id === "cl/inactive-only" || item.id === "cline/inactive-only"),
14051412
false

0 commit comments

Comments
 (0)