Files
OmniRoute/tests/unit/static-model-operation-endpoints.test.ts
Dizzle 6e8fc94732 fix(cli): stop pre-filling the secrets the server owns (#11436)
Retargetado para release/v3.8.51 (release/v3.8.50 está congelada — freeze issue #11439). Resolvido um conflito de merge não-relacionado em src/shared/utils/wsPath.ts (originado de um refactor já mergeado nessa branch depois do fork deste PR; o diff real deste PR — scripts/dev/sync-env.mjs + tests/unit/sync-env.test.ts — ficou intacto) e revalidado: typecheck:core limpo, 13/13 testes focados passando.

Segue o precedente correto do #1622 (STORAGE_ENCRYPTION_KEY) para os dois secrets restantes que a postinstall preenchia por engano, defeituando o mecanismo de ensureSecrets(). Obrigado pela contribuição!
2026-08-24 20:04:11 -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")));
});