Files
OmniRoute/tests/unit/sensenova-provider.test.ts
Xiangzhe 48df80e4a5 fix(providers): update SenseNova Token Plan support (#6330)
Reconstructed onto release/v3.8.47 to drop unrelated main-drift (deps/electron/proxy
files belong to #6620, not this PR); the author's constants/registry/snapshot deltas
were re-applied cleanly onto the release tip.

Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-07-10 18:05:46 -03:00

26 lines
878 B
TypeScript

import test from "node:test";
import assert from "node:assert/strict";
import { PROVIDER_MAX_TOKENS } from "../../open-sse/config/constants.ts";
import { getModelsByProviderId } from "../../open-sse/config/providerModels.ts";
test("SenseNova Token Plan catalog exposes only supported chat models with 64K output", () => {
const models = getModelsByProviderId("sensenova");
const ids = new Set(models.map((model) => model.id));
assert.ok(ids.has("sensenova-6.7-flash-lite"));
assert.ok(ids.has("deepseek-v4-flash"));
assert.ok(ids.has("glm-5.2"));
assert.equal(ids.has("sensenova-u1-fast"), false, "U1 Fast is not a chat-completions model");
for (const model of models) {
assert.equal(
model.maxOutputTokens,
65536,
`${model.id} should use Token Plan's 64K output cap`
);
}
assert.equal(PROVIDER_MAX_TOKENS.sensenova, 65536);
});