diff --git a/changelog.d/fixes/10990-v0-vercel-web-static-catalog.md b/changelog.d/fixes/10990-v0-vercel-web-static-catalog.md new file mode 100644 index 0000000000..9d56721208 --- /dev/null +++ b/changelog.d/fixes/10990-v0-vercel-web-static-catalog.md @@ -0,0 +1 @@ +- **Static model catalog for v0-vercel-web:** seed a static catalog for the v0-vercel-web web-cookie provider (v0-1.0-md, v0-1.5-lg, v0-1.5-md) so its dashboard "Available Models" / "Import from /models" UI serves a usable list instead of falling through to the route's 400 "does not support models listing" ([#10990](https://github.com/diegosouzapw/OmniRoute/issues/10990)). \ No newline at end of file diff --git a/src/lib/providers/staticModels.ts b/src/lib/providers/staticModels.ts index 06f4041776..a62c90b110 100644 --- a/src/lib/providers/staticModels.ts +++ b/src/lib/providers/staticModels.ts @@ -99,6 +99,15 @@ const STATIC_MODEL_PROVIDERS: Record Array<{ id: string; name: str { id: "google_scholar", name: "Google Scholar" }, { id: "duckduckgo", name: "DuckDuckGo" }, ], + "v0-vercel-web": () => [ + // v0-vercel-web web-cookie codegen provider — no upstream /v1/models endpoint, + // no registry `models` and no discovery config, so seed the current v0 lineup + // as a static catalog mirroring the v0-vercel API provider (shared.ts) so the + // model-import UI serves a list instead of the tail 400 (#10990). + { id: "v0-1.0-md", name: "V0 1.0 MD" }, + { id: "v0-1.5-lg", name: "V0 1.5 LG" }, + { id: "v0-1.5-md", name: "V0 1.5 MD" }, + ], "venice-web": () => [ // Venice.ai web-cookie provider — no upstream /v1/models endpoint, so seed the // current lineup as a static catalog (#6269). Venice rotates its catalog; keep diff --git a/tests/unit/repro-10990-v0-vercel-web-static-models.test.ts b/tests/unit/repro-10990-v0-vercel-web-static-models.test.ts new file mode 100644 index 0000000000..e8de722b90 --- /dev/null +++ b/tests/unit/repro-10990-v0-vercel-web-static-models.test.ts @@ -0,0 +1,25 @@ +/** + * #10990 — v0-vercel-web (a web-cookie codegen provider) shipped a web-cookie + * executor but no registry `models`, no discovery config, and no static-catalog + * entry, so its "Import from /models" fell through to the models route's tail 400 + * ("Provider v0-vercel-web does not support models listing"). Adding a + * `v0-vercel-web` entry to STATIC_MODEL_PROVIDERS gives the models route a local + * catalog to serve (same class as the #6269 venice-web / #7820 amazon-q fix). + * + * Kept as a standalone unit against the pure `getStaticModelsForProvider` resolver + * rather than extending the frozen `provider-models-route.test.ts` god-file. + */ +import test from "node:test"; +import assert from "node:assert/strict"; + +import { getStaticModelsForProvider } from "../../src/lib/providers/staticModels.ts"; + +test("#10990 v0-vercel-web resolves a non-empty static local catalog", () => { + const models = getStaticModelsForProvider("v0-vercel-web"); + assert.ok(models && models.length > 0, "v0-vercel-web should expose a static catalog"); + const ids = models.map((m) => m.id); + assert.ok( + ids.includes("v0-1.5-lg"), + `expected v0-1.5-lg in [${ids.join(", ")}]` + ); +}); \ No newline at end of file