{"record":{"id":"f9169c3ecd9e9334","repo":"ruvnet/ruflo","slug":"arch-router-selection-failed","errorCode":null,"errorMessage":"arch router selection failed","messagePattern":"arch router selection failed","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ruflo/src/ruvocal/src/lib/server/router/arch.ts","lineNumber":220,"sourceCode":"\t\t\t\trouteName: \"arch_router_failure\",\n\t\t\t\terror: {\n\t\t\t\t\tmessage: errorMessage,\n\t\t\t\t\tstatusCode: resp.status,\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\t\tconst data: { choices: { message: { content: string } }[] } = await resp.json();\n\t\tconst text = (data?.choices?.[0]?.message?.content ?? \"\").toString().trim();\n\t\tconst raw = parseRouteName(text);\n\n\t\tconst other = config.LLM_ROUTER_OTHER_ROUTE || \"casual_conversation\";\n\t\tconst chosen = raw === \"other\" ? other : raw || \"casual_conversation\";\n\t\tconst exists = routes.some((r) => r.name === chosen);\n\t\treturn { routeName: exists ? chosen : \"casual_conversation\" };\n\t} catch (e) {\n\t\tclearTimeout(to);\n\t\tconst err = e as Error;\n\t\tlogger.warn({ err: String(e), traceId }, \"arch router selection failed\");\n\n\t\t// Return error with context but no status code (network/timeout errors)\n\t\treturn {\n\t\t\trouteName: \"arch_router_failure\",\n\t\t\terror: {\n\t\t\t\tmessage: err.message || String(e),\n\t\t\t},\n\t\t};\n\t}\n}\n","sourceCodeStart":202,"sourceCodeEnd":231,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/ruflo/src/ruvocal/src/lib/server/router/arch.ts#L202-L231","documentation":"Structured log emitted when arch route selection as a whole fails (HTTP error, unparsable model output, or unknown route name); the function returns the arch_router_failure marker route instead of a chosen route, letting callers fall back.","triggerScenarios":"Thrown at ruflo/src/ruvocal/src/lib/server/router/arch.ts:220 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the router's upstream model catalog is reachable and loaded; retry after the model list loads successfully.","Inspect router logs for the underlying selection error and fix the failing candidate/endpoint."],"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"}