mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-10-19 05:20:05 +00:00
Drains base-red waves 5–8 of release/v3.8.51: 35+ tests and the pack-policy, api-typecheck, dashboard-typecheck, docs-all, agent-skills-sync, ESLint and mutation-coverage gates (#13866). Production defects the tests caught: - Caveman: #12825's file-pack prefilter tested anchored rules against the original text, so leader_phrases never ran. - pack-artifact: httpClientAbortGuard.mjs was missing from the staging allowlist and the required set — every published boot died with ERR_MODULE_NOT_FOUND (#14191). - rateLimitManager: maxWaitMs=0 (the #12902 disable sentinel) hit #12715's queue-budget gate as "0 ms left" and 503'd every protected request. - emergencyFallback: #14006 silently switched nvidia -> groq; restored per ENVIRONMENT.md and the NIM snapshot. - ClaudeConnectionFields.tsx vs claudeConnectionFields.ts (#13074) differed only by casing; helpers renamed to claudeConnectionFieldValues.ts. - /v1/responses/input_tokens body validated with Zod (HR#7). Guards realigned to legitimate changes (#12663, #13863, #12565, #13990, #13874, #13350, #13318, #13848 typed and split out of a size-capped file — #14254), i18n catalogs for the 7 keys of #13074/#7f1b4a5e in 65 locales, 22 README mirrors restored to the Cerebras cell, env docs for 5 vars, regenerated omni-version-manager skill. Refs #13866. Closes #14254. Refs #14191. Co-authored-by: Prabhjot Singh <jotgill1522@gmail.com> Co-authored-by: Xmon Dai <xiechimon@qq.com>
50 lines
2.5 KiB
TypeScript
50 lines
2.5 KiB
TypeScript
/**
|
|
* Verify that mimo-v2.5 is safe to use with images across all providers
|
|
* (xiaomi-mimo, command-code, bazaarlink, opencode-go, bare model id).
|
|
*
|
|
* mimo-v2.5 is registered in ModelSpec (`modelSpecs.ts:410-415`) with
|
|
* `supportsVision: true`, so resolveVisionCapability() picks it up from
|
|
* `spec.supportsVision` without needing a registry flag.
|
|
*
|
|
* This test proves that the scenario described in the issue report
|
|
* (image-bearing request → vision-bridge auto-reroute to opencode-zen → 401)
|
|
* never applies to mimo-v2.5 — it has always been correctly identified as
|
|
* vision-capable even before the registry + heuristic fix for other CC models.
|
|
*/
|
|
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
import { getResolvedModelCapabilities } from "../../src/lib/modelCapabilities.ts";
|
|
import { isVisionModelId } from "../../src/shared/constants/visionModels.ts";
|
|
|
|
const MIMO_V25_CASES: [string, string, boolean][] = [
|
|
["xiaomi-mimo/mimo-v2.5", "via xiaomi-mimo", true],
|
|
["command-code/mimo-v2.5", "via command-code", true],
|
|
["bazaarlink/mimo-v2.5", "via bazaarlink", true],
|
|
["opencode-go/mimo-v2.5", "via opencode-go", true],
|
|
["mimo-v2.5", "bare model name", true],
|
|
// Text-only variants must stay false
|
|
["mimo-v2.5-pro", "text-only variant", false],
|
|
["command-code/mimo-v2.5-pro", "text-only via command-code", false],
|
|
];
|
|
|
|
for (const [modelId, desc, expected] of MIMO_V25_CASES) {
|
|
test(`${desc} (${modelId}) → supportsVision=${expected}`, () => {
|
|
const caps = getResolvedModelCapabilities(modelId);
|
|
assert.equal(caps.supportsVision, expected, `${modelId} supportsVision must be ${expected}`);
|
|
});
|
|
}
|
|
|
|
test("mimo-v2.5 heuristic is correct (base is vision, Pro siblings are not)", () => {
|
|
// mimo-vl matches "mimo-vl-a3b" on its own fragment
|
|
assert.equal(isVisionModelId("mimo-vl-a3b"), true, "mimo-vl must be detected as vision");
|
|
// #13863 (#13847): the base model is multimodal and is now in the shared heuristic
|
|
// itself, so provider-qualified and `:free` aliases get the same verdict without
|
|
// depending on a ModelSpec lookup. Xiaomi documents the Pro chat variants as
|
|
// text-only; they must stay excluded beside it.
|
|
assert.equal(isVisionModelId("mimo-v2.5"), true, "mimo-v2.5 is multimodal");
|
|
assert.equal(isVisionModelId("mimo-v2.5-pro"), false, "mimo-v2.5-pro is text-only");
|
|
assert.equal(isVisionModelId("xiaomi-mimo/mimo-v2.5:free"), true);
|
|
// And the resolved capability agrees.
|
|
assert.equal(getResolvedModelCapabilities("mimo-v2.5").supportsVision, true);
|
|
});
|