mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-22 07:02:16 +03:00
Compare commits
1 Commits
fix/10986-
...
fix/10990-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7106f75b0f |
1
changelog.d/fixes/10990-v0-vercel-web-static-catalog.md
Normal file
1
changelog.d/fixes/10990-v0-vercel-web-static-catalog.md
Normal file
@@ -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)).
|
||||
@@ -99,6 +99,15 @@ const STATIC_MODEL_PROVIDERS: Record<string, () => 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
|
||||
|
||||
25
tests/unit/repro-10990-v0-vercel-web-static-models.test.ts
Normal file
25
tests/unit/repro-10990-v0-vercel-web-static-models.test.ts
Normal file
@@ -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(", ")}]`
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user