Files
OmniRoute/tests/unit/static-model-operation-endpoints.test.ts
Diego Rodrigues de Sa e Souza b4ec7807ab Release v3.8.50
Release v3.8.50 — see CHANGELOG.md for the full entry.
2026-08-26 14:25:01 -03:00

21 lines
876 B
TypeScript

import assert from "node:assert/strict";
import test from "node:test";
import { getStaticModelsForProvider } from "../../src/lib/providers/staticModels.ts";
test("speech-only static models advertise the speech operation", () => {
const models = getStaticModelsForProvider("elevenlabs") || [];
assert.ok(models.length > 0);
assert.ok(models.every((model) => model.supportedEndpoints?.includes("audio-speech")));
assert.ok(models.every((model) => !model.supportedEndpoints?.includes("audio")));
});
test("transcription-only static models advertise the transcription operation", () => {
const models = getStaticModelsForProvider("gladia") || [];
assert.ok(models.length > 0);
assert.ok(models.every((model) => model.supportedEndpoints?.includes("audio-transcriptions")));
assert.ok(models.every((model) => !model.supportedEndpoints?.includes("audio")));
});