fix(providers): extend MiMo Token Plan model test deadline (#16213)

Thanks @lorenzozanee — MiMo Token Plan dashboard model tests now use a 60-second minimum deadline in `src/lib/api/modelTestRunner.ts`, covered by `tests/unit/model-test-runner.test.ts`. The changelog fragment was prefixed with a markdown bullet on `18db4d23` before this squash.

Fixes #16057


Boarded on release/v3.8.52 at 146459b116. Focused tests: 76 passed, 0 failed. Changelog integrity passed. File-size shows only the inherited executeTargetAttempt.ts overage (1288 > frozen 1284).

⚠️ base-red inherited: #15306
This commit is contained in:
lorenzozane
2026-10-13 19:34:27 +08:00
committed by GitHub
parent d2669ea14b
commit c188c8e682
3 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1 @@
- **fix(providers):** give MiMo Token Plan model tests a 60-second minimum timeout ([#16213](https://github.com/diegosouzapw/OmniRoute/pull/16213)) — thanks @lorenzozanee

View File

@@ -32,6 +32,8 @@ const DOLA_PRO_TEST_TIMEOUT_MS = 90_000;
const DOUBAO_WEB_PROVIDER_ID = "doubao-web";
const ZAI_WEB_PROVIDER_ID = "zai-web";
const ZAI_WEB_TEST_TIMEOUT_MS = 60_000;
const XIAOMI_MIMO_TOKEN_PLAN_PROVIDER_ID = "xiaomi-mimo-token-plan";
const XIAOMI_MIMO_TOKEN_PLAN_TEST_TIMEOUT_MS = 60_000;
const SLOW_WEB_TEST_MODELS = new Set(["dola-pro"]);
const STREAMING_CHAT_TEST_MAX_TOKENS = 64;
// Responses calls the same budget `max_output_tokens`; `max_tokens` is silently
@@ -134,6 +136,10 @@ export function resolveModelTestTimeoutMs(
return Math.max(requestedTimeoutMs, ZAI_WEB_TEST_TIMEOUT_MS);
}
if (normalizedProviderId === XIAOMI_MIMO_TOKEN_PLAN_PROVIDER_ID) {
return Math.max(requestedTimeoutMs, XIAOMI_MIMO_TOKEN_PLAN_TEST_TIMEOUT_MS);
}
return requestedTimeoutMs;
}

View File

@@ -325,6 +325,18 @@ test("resolveModelTestTimeoutMs gives zai-web checks up to 60 seconds", () => {
assert.equal(resolveModelTestTimeoutMs("zai-web", "zai-web/glm-5.3-flash", 90_000), 90_000);
});
test("resolveModelTestTimeoutMs applies a 60-second minimum to Xiaomi MiMo Token Plan checks", () => {
assert.equal(
resolveModelTestTimeoutMs("xiaomi-mimo-token-plan", "mimo-v2.6-flash", 30_000),
60_000
);
assert.equal(resolveModelTestTimeoutMs("xiaomi-mimo", "mimo-v2.6-flash", 30_000), 30_000);
assert.equal(
resolveModelTestTimeoutMs("xiaomi-mimo-token-plan", "mimo-v2.6-flash", 90_000),
90_000
);
});
test("runSingleModelTest skips web-session providers before sending a chat probe", async () => {
const result = await runSingleModelTest({
providerId: "deepseek-web",