mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-19 05:12:16 +03:00
Fix/combo multimodal capability 13847 (#13863)
* fix(capabilities): align combo multimodal vision hints * test(capabilities): cover combo multimodal consistency * chore(changelog): note combo multimodal capability fix
This commit is contained in:
committed by
GitHub
parent
bdc79ef883
commit
b6e7bc12ea
1
changelog.d/fixes/13847-combo-multimodal-capability.md
Normal file
1
changelog.d/fixes/13847-combo-multimodal-capability.md
Normal file
@@ -0,0 +1 @@
|
||||
- **fix(combos):** Keep vision capability consistent for MiMo V2.5 and Step 3.7 Flash provider/free variants so `/v1/combos` no longer under-reports multimodal combos whose members are already advertised as vision-capable by `/v1/models` ([#13847](https://github.com/diegosouzapw/OmniRoute/issues/13847)).
|
||||
@@ -34,6 +34,14 @@ export const VISION_MODEL_ID_FRAGMENTS = [
|
||||
"minicpm-v",
|
||||
"moondream",
|
||||
"mimo-vl",
|
||||
// #13847: MiMo V2.5 is multimodal across the provider aliases that expose it
|
||||
// (including `*-free` variants). Keep the known text-only Pro siblings out in
|
||||
// isVisionModelId() below so this shared heuristic stays safe for routing,
|
||||
// `/v1/models`, combo projection and lite compression alike.
|
||||
"mimo-v2.5",
|
||||
// #13847: Step 3.7 Flash is exposed through provider-qualified `:free` routes
|
||||
// as well as direct registry entries. The capability must survive that suffix.
|
||||
"step-3.7-flash",
|
||||
"kimi-vl",
|
||||
"glm-4v",
|
||||
"glm-4.5v",
|
||||
@@ -74,5 +82,13 @@ export const VISION_MODEL_ID_FRAGMENTS = [
|
||||
export function isVisionModelId(modelId: string | null | undefined): boolean {
|
||||
if (!modelId) return false;
|
||||
const normalized = String(modelId).toLowerCase();
|
||||
|
||||
// Xiaomi documents the Pro chat variants as text-only even though the base
|
||||
// MiMo V2.5 model is multimodal. Keep these exclusions beside the shared
|
||||
// heuristic so every consumer gets the same verdict instead of relying on a
|
||||
// resolver-specific exception.
|
||||
if (/(?:^|\/)mimo-v2\.5-pro(?:$|[:/])/i.test(normalized)) return false;
|
||||
if (/(?:^|\/)mimo-v2-pro(?:$|[:/])/i.test(normalized)) return false;
|
||||
|
||||
return VISION_MODEL_ID_FRAGMENTS.some((fragment) => normalized.includes(fragment));
|
||||
}
|
||||
|
||||
51
tests/unit/combo-multimodal-capability-13847.test.ts
Normal file
51
tests/unit/combo-multimodal-capability-13847.test.ts
Normal file
@@ -0,0 +1,51 @@
|
||||
import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
|
||||
import { getResolvedModelCapabilities } from "../../src/lib/modelCapabilities.ts";
|
||||
import { computeComboCapabilities } from "../../src/app/api/v1/combos/projectCombo.ts";
|
||||
|
||||
const REPORTED_VISION_MEMBERS = [
|
||||
"opencode-go/mimo-v2.5",
|
||||
"kilo-gateway/stepfun/step-3.7-flash:free",
|
||||
"opencode-zen/mimo-v2.5-free",
|
||||
"opencode/mimo-v2.5-free",
|
||||
"command-code/xiaomi/mimo-v2.5",
|
||||
] as const;
|
||||
|
||||
test("#13847 reported combo members resolve as vision-capable", () => {
|
||||
for (const model of REPORTED_VISION_MEMBERS) {
|
||||
assert.equal(
|
||||
getResolvedModelCapabilities(model).supportsVision,
|
||||
true,
|
||||
`${model} should retain its vision capability through provider/free-route qualification`
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
test("#13847 known MiMo Pro text-only siblings stay excluded", () => {
|
||||
for (const model of [
|
||||
"mimo-v2.5-pro",
|
||||
"command-code/xiaomi/mimo-v2.5-pro",
|
||||
"mimo-v2-pro",
|
||||
]) {
|
||||
assert.notEqual(
|
||||
getResolvedModelCapabilities(model).supportsVision,
|
||||
true,
|
||||
`${model} must not inherit the MiMo V2.5 multimodal heuristic`
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
test("#13847 combo projection agrees with vision-capable members", () => {
|
||||
const combo = {
|
||||
name: "default-observer",
|
||||
strategy: "priority",
|
||||
models: REPORTED_VISION_MEMBERS.map((model) => ({ kind: "model", model })),
|
||||
};
|
||||
|
||||
assert.deepEqual(computeComboCapabilities(combo), {
|
||||
multimodal: true,
|
||||
reasoning: true,
|
||||
caching: false,
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user