Browse Source

fix: update fal category filter test for audio model support

text-to-speech was already in RELEVANT_CATEGORIES but the test still
expected it to be filtered out. Update count and add assertion that
TTS models are mapped to text-to-audio capability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
handoff-20260429-1057
shrimbly 5 months ago
parent
commit
b6b31d237b
  1. 5
      src/app/api/models/__tests__/route.test.ts

5
src/app/api/models/__tests__/route.test.ts

@ -712,9 +712,10 @@ describe("/api/models route", () => {
const data = await response.json();
expect(response.status).toBe(200);
// 1 fal text-to-image + 2 gemini models (always included)
expect(data.models).toHaveLength(3);
// 1 fal text-to-image + 1 fal text-to-speech (mapped to text-to-audio) + 2 gemini models (always included)
expect(data.models).toHaveLength(4);
expect(data.models.find((m: { id: string }) => m.id === "fal-ai/flux")).toBeDefined();
expect(data.models.find((m: { id: string }) => m.id === "fal-ai/tts")?.capabilities).toEqual(["text-to-audio"]);
});
});

Loading…
Cancel
Save