{"record":{"id":"2b965db69da9399d","repo":"ruvnet/ruflo","slug":"router-arch-router-failed-with-transient-error","errorCode":null,"errorMessage":"[router] arch router failed with transient error, attempting fallback","messagePattern":"\\[router\\] arch router failed with transient error, attempting fallback","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ruflo/src/ruvocal/src/lib/server/router/endpoint.ts","lineNumber":276,"sourceCode":"\n\t\tconst routeSelection = await archSelectRoute(sanitizedMessages, undefined, params.locals);\n\n\t\t// If arch router failed with an error, only hard-fail for policy errors (402/401/403)\n\t\t// For transient errors (5xx, timeouts, network), allow fallback to continue\n\t\tif (routeSelection.routeName === ROUTER_FAILURE && routeSelection.error) {\n\t\t\tconst { message, statusCode } = routeSelection.error;\n\n\t\t\tif (isPolicyError(statusCode)) {\n\t\t\t\t// Policy errors should be surfaced to the user immediately (e.g., subscription required)\n\t\t\t\tlogger.error(\n\t\t\t\t\t{ err: message, ...(statusCode && { status: statusCode }) },\n\t\t\t\t\t\"[router] arch router failed with policy error, propagating to client\"\n\t\t\t\t);\n\t\t\t\tthrow statusCode ? new HTTPError(message, statusCode) : new Error(message);\n\t\t\t}\n\n\t\t\t// Transient errors: log and continue to fallback\n\t\t\tlogger.warn(\n\t\t\t\t{ err: message, ...(statusCode && { status: statusCode }) },\n\t\t\t\t\"[router] arch router failed with transient error, attempting fallback\"\n\t\t\t);\n\t\t}\n\n\t\tconst fallbackModel = config.LLM_ROUTER_FALLBACK_MODEL || routerModel.id;\n\t\tconst { candidates } = resolveRouteModels(routeSelection.routeName, routes, fallbackModel);\n\n\t\tlet lastErr: unknown = undefined;\n\t\tfor (const candidate of candidates) {\n\t\t\ttry {\n\t\t\t\tlogger.info(\n\t\t\t\t\t{ route: routeSelection.routeName, model: candidate },\n\t\t\t\t\t\"[router] trying candidate\"\n\t\t\t\t);\n\t\t\t\tconst ep = await createCandidateEndpoint(candidate);\n\t\t\t\tconst gen = await ep({ ...params });\n\t\t\t\treturn metadataThenStream(gen, candidate, routeSelection.routeName);","sourceCodeStart":258,"sourceCodeEnd":294,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/ruflo/src/ruvocal/src/lib/server/router/endpoint.ts#L258-L294","documentation":"Log warning in makeRouterEndpoint: the arch router failed with a transient error (5xx, timeout, network) rather than a policy error (401/402/403); routing continues with the fallback model chain instead of hard-failing.","triggerScenarios":"Thrown at ruflo/src/ruvocal/src/lib/server/router/endpoint.ts:276 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the primary Arch router endpoint is reachable and LLM_ROUTER_ARCH_BASE_URL is correct; the fallback path is expected behavior for transient failures, so repeated occurrences indicate a network or service health problem to fix at the router."],"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"}