{"record":{"id":"206e1ef0acb8babe","repo":"ruvnet/ruflo","slug":"llm-router-arch-base-url-not-set-routing-will-fai","errorCode":null,"errorMessage":"LLM_ROUTER_ARCH_BASE_URL not set; routing will fail over to fallback.","messagePattern":"LLM_ROUTER_ARCH_BASE_URL not set; routing will fail over to fallback\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ruflo/src/ruvocal/src/lib/server/router/arch.ts","lineNumber":148,"sourceCode":"\t\tconst obj = JSON.parse(text.replace(/'/g, '\"'));\n\t\tif (typeof obj?.route === \"string\" && obj.route.trim()) return obj.route.trim();\n\t} catch {}\n\treturn;\n}\n\nexport async function archSelectRoute(\n\tmessages: EndpointMessage[],\n\ttraceId: string | undefined,\n\tlocals: App.Locals | undefined\n): Promise<RouteSelection> {\n\tconst routes = await getRoutes();\n\tconst prompt = toRouterPrompt(messages, routes);\n\n\tconst baseURL = (config.LLM_ROUTER_ARCH_BASE_URL || \"\").replace(/\\/$/, \"\");\n\tconst archModel = config.LLM_ROUTER_ARCH_MODEL || \"router/omni\";\n\n\tif (!baseURL) {\n\t\tlogger.warn(\"LLM_ROUTER_ARCH_BASE_URL not set; routing will fail over to fallback.\");\n\t\treturn { routeName: \"arch_router_failure\" };\n\t}\n\n\tconst headers: HeadersInit = {\n\t\tAuthorization: `Bearer ${getApiToken(locals)}`,\n\t\t\"Content-Type\": \"application/json\",\n\t\t// Bill to organization if configured (HuggingChat only)\n\t\t...(config.isHuggingChat && locals?.billingOrganization\n\t\t\t? { \"X-HF-Bill-To\": locals.billingOrganization }\n\t\t\t: {}),\n\t};\n\tconst body = {\n\t\tmodel: archModel,\n\t\tmessages: [{ role: \"user\", content: prompt }],\n\t\ttemperature: 0,\n\t\tmax_tokens: 16,\n\t\tstream: false,\n\t};","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/ruflo/src/ruvocal/src/lib/server/router/arch.ts#L130-L166","documentation":"Log warning in archSelectRoute: LLM_ROUTER_ARCH_BASE_URL is unset, so no arch router endpoint exists to query; every selection will immediately fail over to the fallback route/model.","triggerScenarios":"Thrown at ruflo/src/ruvocal/src/lib/server/router/arch.ts:148 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set LLM_ROUTER_ARCH_BASE_URL to the Arch router base URL, or accept that routing always uses the fallback endpoint."],"exampleFix":null,"handlingStrategy":"validation","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-14T00:17:10.932Z"}