{"record":{"id":"01d40755ca90cb65","repo":"ruvnet/ruflo","slug":"mcp-routing-preflight-failed","errorCode":null,"errorMessage":"[mcp] routing preflight failed","messagePattern":"\\[mcp\\] routing preflight failed","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/routerResolution.ts","lineNumber":103,"sourceCode":"\t\t\tconst { candidates } = resolveRouteModels(routeName, routes, fallbackModel);\n\t\t\tconst primaryCandidateId = candidates[0];\n\t\t\tif (!primaryCandidateId || primaryCandidateId === fallbackModel) {\n\t\t\t\trunMcp = false;\n\t\t\t} else {\n\t\t\t\tconst found = allModels?.find(\n\t\t\t\t\t(candidate) =>\n\t\t\t\t\t\tcandidate.id === primaryCandidateId || candidate.name === primaryCandidateId\n\t\t\t\t);\n\t\t\t\tif (found) {\n\t\t\t\t\ttargetModel = found;\n\t\t\t\t\tcandidateModelId = primaryCandidateId;\n\t\t\t\t} else {\n\t\t\t\t\trunMcp = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} catch (error) {\n\t\tlogger.warn({ err: String(error) }, \"[mcp] routing preflight failed\");\n\t\trunMcp = false;\n\t}\n\n\treturn { runMcp, targetModel, candidateModelId, resolvedRoute };\n}\n","sourceCodeStart":85,"sourceCodeEnd":109,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/routerResolution.ts#L85-L109","documentation":"Log warning in resolveRouterTarget: resolving the router route/candidate model threw (route resolution or model lookup failure), so MCP routing preflight aborts and the request is handled without the MCP flow.","triggerScenarios":"Thrown at ruflo/src/ruvocal/src/lib/server/textGeneration/mcp/routerResolution.ts:103 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check that the configured router model and endpoint are valid and reachable; preflight failure falls back to non-MCP routing, so fix the router configuration to restore MCP routing."],"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"}