Gateway tests: include synthetic allowlist models in models.list

This commit is contained in:
Vincent Koc
2026-02-24 19:08:09 -05:00
parent f7cf3d0dad
commit 5509bf2c75

View File

@@ -328,7 +328,7 @@ describe("gateway server models + voicewake", () => {
);
});
test("models.list falls back to full catalog when allowlist has no catalog match", async () => {
test("models.list includes synthetic entries for allowlist models absent from catalog", async () => {
await withModelsConfig(
{
agents: {
@@ -345,7 +345,13 @@ describe("gateway server models + voicewake", () => {
const res = await listModels();
expect(res.ok).toBe(true);
expect(res.payload?.models).toEqual(expectedSortedCatalog());
expect(res.payload?.models).toEqual([
{
id: "not-in-catalog",
name: "not-in-catalog",
provider: "openai",
},
]);
},
);
});