Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions tests/unit/image-model-not-in-chat-catalog-6457.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ test("#6457 image/diffusion model discovered via live sync is NOT listed as a ch
}
});

test("registered image model with explicit chat endpoints keeps both catalog entries", async () => {
test("Codex Responses and image entries keep distinct public IDs for the same upstream model", async () => {
const connection = await seedProviderConnection("codex");

await modelsDb.replaceSyncedAvailableModelsForConnection("codex", connection.id, [
Expand Down Expand Up @@ -130,7 +130,11 @@ test("registered image model with explicit chat endpoints keeps both catalog ent
"explicit responses support must keep the synced chat entry"
);
assert.ok(
entries.some((model) => model.type === "image"),
"the registered image entry must remain available under the same model id"
entries.every((model) => model.type !== "image"),
"an image entry must not shadow the Responses model ID"
);
assert.ok(
body.data.some((model) => model.id === "codex/gpt-5.6-sol-image" && model.type === "image"),
"the image surface must remain available under its distinct catalog ID"
);
});
13 changes: 9 additions & 4 deletions tests/unit/model-token-limit-catalog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ async function getModel(target = TARGET) {
const response = await catalog.getUnifiedModelsResponse(
new Request("http://localhost/api/v1/models")
);
assert.equal(response.status, 200, "model catalog must be available before projecting limits");
const body = (await response.json()) as { data: Array<Record<string, unknown>> };
return body.data.find((model) => model.id === target);
}
Expand Down Expand Up @@ -134,16 +135,20 @@ test("v1 model catalog projects a synced Codex context to both public aliases",
}

const canonical = await getModel("codex/gpt-5.6-sol");
assert.equal(canonical?.type, "image");
assert.deepEqual(canonical?.output_modalities, ["image"]);
assert.ok(Array.isArray(canonical?.supported_sizes));
assert.equal(canonical?.type, undefined, "the canonical chat ID must not be shadowed by image");
const image = await getModel("codex/gpt-5.6-sol-image");
assert.equal(image?.type, "image");
assert.deepEqual(image?.output_modalities, ["image"]);
assert.ok(Array.isArray(image?.supported_sizes));
assert.equal(image?.context_length, undefined, "chat overrides must not leak to the image ID");

assert.equal(contextOverrides.removeModelContextOverride("codex", "gpt-5.6-sol"), true);
assert.equal(
(await getModel("codex/gpt-5.6-sol"))?.context_length,
(await getModel("codex/gpt-5.6-sol-image"))?.context_length,
undefined,
"the specialty row must not inherit the synced chat context after override removal"
);
assert.equal((await getModel("codex/gpt-5.6-sol"))?.context_length, 872000);
assert.equal((await getModel("cx/gpt-5.6-sol"))?.context_length, 272000);
});

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/specialty-model-catalog-routes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ test("image catalog GET uses the unified active-credential model list", async ()

assert.deepEqual(
ids.filter((id) => id.startsWith("codex/")),
["codex/gpt-5.6-sol", "codex/gpt-5.6-terra", "codex/gpt-5.6-luna"]
["codex/gpt-5.6-sol-image", "codex/gpt-5.6-terra-image", "codex/gpt-5.6-luna-image"]
);
assert.ok(!ids.includes("openai/gpt-image-2"));
});
Expand Down
Loading