fix(ai): mock Radius in model generation tests

This commit is contained in:
Armin Ronacher 2026-09-19 19:41:20 +02:00
parent eba619879c
commit 7d5eb0ee3b

View file

@ -41,6 +41,7 @@ function generateFireworksModels(
` const url = String(input);\n` +
` if (url === "https://models.dev/api.json") return Response.json(catalog);\n` +
` if (url === "https://openrouter.ai/api/v1/models" || url === "https://ai-gateway.vercel.sh/v1/models") return Response.json({ data: [] });\n` +
` if (url === "https://radius.pi.dev/v1/config") return Response.json({ baseUrl: "https://radius.pi.dev", models: [{ id: "test", name: "Test", reasoning: false, input: ["text"], cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 }, contextWindow: 4096, maxTokens: 4096 }] });\n` +
` throw new Error(\`Unexpected fetch: \${url}\`);\n` +
`};\n`,
);