Files
OmniRoute/tests/unit/zcode-provider.test.ts
Xiangzhe c018bb41a7 fix(catalog): declare GLM reasoning effort tiers (#10963)
Merged after conflict resolution in modelMetadataRegistry.ts: the tip's effortTiers chain (declared efforts → declared tiers → undefined-if-thinking-declared → codex extension) now carries this PR's GLM guard as the final-fallback override — GLM-family models without a provider-declared contract get the authoritative empty tier list instead of generic OpenAI tiers. GLM/ZCode suites 40/40 on the resolved branch. Closes #10962. Thank you @xz-dev!
2026-08-22 22:54:49 -03:00

28 lines
1021 B
TypeScript

import test from "node:test";
import assert from "node:assert/strict";
import { zcodeProvider } from "../../open-sse/config/providers/registry/zcode/index.ts";
test("ZCode provider registry exposes a local no-auth GLM Coding Plan backend", () => {
assert.equal(zcodeProvider.id, "zcode");
assert.equal(zcodeProvider.alias, "zc");
assert.equal(zcodeProvider.executor, "zcode");
assert.equal(zcodeProvider.format, "openai");
assert.equal(zcodeProvider.baseUrl, "zcode://app-server/stdio");
assert.equal(zcodeProvider.authType, "none");
assert.equal(zcodeProvider.authHeader, "none");
assert.equal(
zcodeProvider.models.some((model) => model.id === "glm-5.2"),
true
);
for (const alias of ["glm-5.3-high", "glm-5.3-low", "glm-5.2-high", "glm-5.2-max"]) {
assert.equal(
zcodeProvider.models.some((model) => model.id === alias),
false,
alias
);
}
for (const model of zcodeProvider.models) {
assert.deepEqual(model.supportedThinkingEfforts, [], model.id);
}
});