diegosouzapw/OmniRoute · error · Error
[Services] Missing ServiceProviderPlugin registration for…
Error message
[Services] Missing ServiceProviderPlugin registration for '9router'
What it means
Module-load invariant failure in bootstrap.ts: getServiceProviderPlugin('9router') returned null at import time, meaning the provider-plugin registry no longer registers the 9router plugin. The code throws immediately rather than silently losing 9router's port/health/lifecycle configuration (regression guard for #7333 Phase 1).
Solutions
- Restore the 9router plugin registration in src/lib/services/providerPlugins/registry.ts.
- Check for a broken/partial build or stale module graph that omits the plugin module.
- Verify no recent change renamed or removed the '9router' plugin id in the registry.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/lib/services/bootstrap.ts:28 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/0faca01a260259f7.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/services/bootstrap.ts:28
import { resolveSpawnArgs as muxSpawnArgs, MUX_DEFAULT_PORT } from "./installers/mux";
import {
resolveSpawnArgs as bifrostSpawnArgs,
BIFROST_DEFAULT_PORT,
} from "./installers/bifrost";
import { resolveSpawnArgs as darioSpawnArgs, DARIO_DEFAULT_PORT } from "./installers/dario";
import { getOrCreateApiKey } from "./apiKey";
import { scheduleServiceModelSync, stopServiceModelSync } from "./modelSync";
import type { ServiceStatus } from "./types";
import { getServiceProviderPlugin } from "./providerPlugins/registry";
// 9router's port/health/lifecycle config is sourced from the plugin registry (#7333
// Phase 1) rather than an inline literal — the plugin object below must resolve to the
// exact same values the pre-migration literal expressed here.
const NINEROUTER_PLUGIN = getServiceProviderPlugin("9router");
if (!NINEROUTER_PLUGIN) {
// Must never silently vanish from bootstrap — a missing plugin here means the
// registry (src/lib/services/providerPlugins/registry.ts) regressed.
throw new Error("[Services] Missing ServiceProviderPlugin registration for '9router'");
}
const NINEROUTER_PORT = parseInt(
process.env[NINEROUTER_PLUGIN.port.envVar] ?? String(NINEROUTER_PLUGIN.port.default),
10
);
const CLIPROXY_PORT = parseInt(process.env.CLIPROXYAPI_PORT ?? String(CLIPROXY_DEFAULT_PORT), 10);
const MUX_PORT = parseInt(process.env.MUX_SERVICE_PORT ?? String(MUX_DEFAULT_PORT), 10);
const BIFROST_PORT = parseInt(process.env.BIFROST_PORT ?? String(BIFROST_DEFAULT_PORT), 10);
const DARIO_PORT = parseInt(process.env.DARIO_PORT ?? String(DARIO_DEFAULT_PORT), 10);
type ServiceEntry = {
tool: string;
port: number;
healthPath: string;
healthIntervalMs: number;
stopTimeoutMs: number;
logsBufferBytes: number;
needsApiKey: boolean;View on GitHub (pinned to a179ffed5b)