Files
OmniRoute/tests/unit/opencode-free-tier-catalog-stale-6998.test.ts
Diego Rodrigues de Sa e Souza 39293bda5b fix(providers): refresh OpenCode (oc) free-tier model catalog (#6998) (#7188)
The oc registry entry (opencode.ai/zen/v1) hardcoded 6 free-tier model
IDs (minimax-m3-free, minimax-m2.5-free, ling-2.6-1t-free,
trinity-large-preview-free, nemotron-3-super-free, qwen3.6-plus-free)
that were delisted upstream and now return 401 "Model X is not
supported". Live upstream instead offers 4 different free models
(mimo-v2.5-free, hy3-free, nemotron-3-ultra-free, north-mini-code-free)
that were never added to our static catalog.

Swap the 6 delisted IDs for the 4 currently-live ones, confirmed
against https://opencode.ai/zen/v1/chat/completions on 2026-07-14.

Updates two existing tests (minimax-m3-model-registry,
provider-registry-qwen-vision) that asserted the now-delisted
minimax-m3-free was present in the oc catalog — they now assert its
absence, matching the corrected contract.
2026-07-14 21:21:44 -03:00

41 lines
1.1 KiB
TypeScript

import test from "node:test";
import assert from "node:assert/strict";
const { opencodeProvider } = await import(
"../../open-sse/config/providers/registry/opencode/index.ts"
);
function modelIds(): string[] {
return (opencodeProvider.models ?? []).map((m) => m.id);
}
const DELISTED_FREE_MODELS = [
"minimax-m3-free",
"minimax-m2.5-free",
"ling-2.6-1t-free",
"trinity-large-preview-free",
"nemotron-3-super-free",
"qwen3.6-plus-free",
];
const LIVE_FREE_MODELS_MISSING_FROM_CATALOG = [
"mimo-v2.5-free",
"hy3-free",
"nemotron-3-ultra-free",
"north-mini-code-free",
];
test("issue #6998: oc registry does not advertise delisted free-tier models", () => {
const ids = modelIds();
for (const delisted of DELISTED_FREE_MODELS) {
assert.ok(!ids.includes(delisted), `oc registry still advertises delisted upstream model "${delisted}"`);
}
});
test("issue #6998: oc registry advertises the current live free-tier models", () => {
const ids = modelIds();
for (const live of LIVE_FREE_MODELS_MISSING_FROM_CATALOG) {
assert.ok(ids.includes(live), `oc registry is missing live upstream free-tier model "${live}"`);
}
});