mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-26 17:12:27 +03:00
* remove: drop sunset MiMoCode provider from model catalog * remove: drop sunset MiMoCode provider from model catalog (shared.ts) Remove unused imports, types, and comments from shared.ts. * remove: MiMoCode provider (Xiaomi sunset) — executor, registry, no-auth config, icon, tests * refactor(providers): finish MiMoCode removal — sweep remaining no-auth references Drop the leftover mimocode entries from the no-auth provider controls, the translate-path snapshot, the eslint suppressions, and the #3061 auth-loop test. Re-point the fingerprint-pin (#6696) and proxy-noauth (#6272) tests at opencode, which exercises the same fingerprint path, so the removal does not break runtime behavior. Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> * docs(providers): reconcile provider/executor counts after MiMoCode sunset The base's parallel doc-count sync (#10433) pinned 340 providers / 101 executors. With mimocode removed, live code has 339 providers and 100 executors; refresh the user-facing counts (package.json description, llm.txt, README/AGENTS, i18n llm.txt, provider reference, diagrams) so the check-docs-counts STRICT gate stays green. Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com> * test(providers): fix orphaned mimocode references after MiMoCode sunset The sunset removed mimocode/mcode from the free-onboarding candidates and from FINGERPRINT_PROVIDERS, but two tests still referenced them: - free-provider-onboarding-setup: the mimocode->theoldllm substitution introduced duplicate 'opencode' rows (impossible given the request-set dedupe) and the wrong display name; align expectations with the actual {opencode, theoldllm} dedupe behavior and 'The Old LLM (Free)' name. - combo-system-prompt-templates-5501: resolveTargetFingerprint tested with provider 'mcode', which is no longer a fingerprint provider; point it at the remaining fingerprint provider 'opencode'. Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com> --------- Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com> Co-authored-by: Tushar49 <Tushar49@users.noreply.github.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> Co-authored-by: adevwithpurpose <adevwithpurpose@users.noreply.github.com> Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>
20 lines
1.0 KiB
TypeScript
20 lines
1.0 KiB
TypeScript
import { test } from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import { getUnsupportedParams } from "../../open-sse/config/providerRegistry.ts";
|
|
|
|
// Regression guard for `TypeError: entry.models is not iterable`.
|
|
//
|
|
// A registry entry can legitimately have no static model catalogue — e.g. a
|
|
// proxy provider whose `models` is `undefined`. The byModelId map builder
|
|
// already tolerates this (`if (entry.models && entry.models.length > 0)`),
|
|
// but `getUnsupportedParams` had two unguarded accesses:
|
|
// - `ensureUnsupportedParamsPopulated()` iterated `entry.models` for EVERY entry,
|
|
// - the per-provider lookup did `entry?.models.find(...)`.
|
|
// Either one threw on the first call once a model-less entry existed, which made
|
|
// `handleChatCore` report "All models failed" for unrelated requests.
|
|
|
|
test("getUnsupportedParams does not throw when a registry entry has no models", () => {
|
|
// This call triggers ensureUnsupportedParamsPopulated() which walks ALL entries.
|
|
assert.doesNotThrow(() => getUnsupportedParams("openai", "gpt-4o"));
|
|
});
|