{"record":{"id":"4fab9956a35ff506","repo":"ruvnet/ruflo","slug":"moe-failed-to-initialize-router","errorCode":null,"errorMessage":"[MoE] Failed to initialize router:","messagePattern":"\\[MoE\\] Failed to initialize router:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/neural/src/moe-router.ts","lineNumber":804,"sourceCode":"\n// ============================================================================\n// Singleton Instance\n// ============================================================================\n\nlet moeRouterInstance: MoERouter | null = null;\n\n/**\n * Get singleton MoE router instance\n *\n * @param config - Optional configuration (only used on first call)\n * @returns MoE router instance\n */\nexport function getMoERouter(config?: Partial<MoERouterConfig>): MoERouter {\n  if (!moeRouterInstance) {\n    moeRouterInstance = new MoERouter(config);\n    // Initialize in background (load weights)\n    moeRouterInstance.initialize().catch((err) => {\n      console.warn('[MoE] Failed to initialize router:', err);\n    });\n  }\n  return moeRouterInstance;\n}\n\n/**\n * Reset singleton instance (for testing)\n */\nexport function resetMoERouter(): void {\n  moeRouterInstance = null;\n}\n\n/**\n * Factory function to create new router\n */\nexport function createMoERouter(config?: Partial<MoERouterConfig>): MoERouter {\n  return new MoERouter(config);\n}","sourceCodeStart":786,"sourceCodeEnd":822,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/neural/src/moe-router.ts#L786-L822","documentation":"Log warning from getMoERouter's singleton setup: the background initialization of the MoE router (which loads persisted weights) failed, so the router runs untrained/default while still being returned to callers.","triggerScenarios":"Thrown at v3/@claude-flow/neural/src/moe-router.ts:804 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the MoE router configuration (expert count, dimensions) and the initialization error detail; fix the invalid config value."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}