ruvnet/ruflo · error

LLM_ROUTER_ARCH_BASE_URL not set; routing will fail over to

Error message

LLM_ROUTER_ARCH_BASE_URL not set; routing will fail over to fallback.

What it means

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.

Source

Thrown at ruflo/src/ruvocal/src/lib/server/router/arch.ts:148

		const obj = JSON.parse(text.replace(/'/g, '"'));
		if (typeof obj?.route === "string" && obj.route.trim()) return obj.route.trim();
	} catch {}
	return;
}

export async function archSelectRoute(
	messages: EndpointMessage[],
	traceId: string | undefined,
	locals: App.Locals | undefined
): Promise<RouteSelection> {
	const routes = await getRoutes();
	const prompt = toRouterPrompt(messages, routes);

	const baseURL = (config.LLM_ROUTER_ARCH_BASE_URL || "").replace(/\/$/, "");
	const archModel = config.LLM_ROUTER_ARCH_MODEL || "router/omni";

	if (!baseURL) {
		logger.warn("LLM_ROUTER_ARCH_BASE_URL not set; routing will fail over to fallback.");
		return { routeName: "arch_router_failure" };
	}

	const headers: HeadersInit = {
		Authorization: `Bearer ${getApiToken(locals)}`,
		"Content-Type": "application/json",
		// Bill to organization if configured (HuggingChat only)
		...(config.isHuggingChat && locals?.billingOrganization
			? { "X-HF-Bill-To": locals.billingOrganization }
			: {}),
	};
	const body = {
		model: archModel,
		messages: [{ role: "user", content: prompt }],
		temperature: 0,
		max_tokens: 16,
		stream: false,
	};

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Set LLM_ROUTER_ARCH_BASE_URL to the Arch router base URL, or accept that routing always uses the fallback endpoint.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at ruflo/src/ruvocal/src/lib/server/router/arch.ts:148 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/206e1ef0acb8babe. Report an issue: GitHub.