ruvnet/ruflo · error

[router] failed to load models for tools lookup

Error message

[router] failed to load models for tools lookup

What it means

Log warning in findToolsCandidateModel: getModels() threw while trying to pick a tools-capable model, so the tools lookup returns undefined and routing falls back to Arch selection.

Source

Thrown at ruflo/src/ruvocal/src/lib/server/router/endpoint.ts:222

				logger.error(
					{
						route: ROUTER_MULTIMODAL_ROUTE,
						model: multimodalCandidate,
						err: message,
						...(statusCode && { status: statusCode }),
					},
					"[router] multimodal fallback failed"
				);
				throw statusCode ? new HTTPError(message, statusCode) : new Error(message);
			}
		}

		async function findToolsCandidateModel(): Promise<ProcessedModel | undefined> {
			try {
				const all = await getModels();
				return pickToolsCapableModel(all);
			} catch (e) {
				logger.warn({ err: String(e) }, "[router] failed to load models for tools lookup");
				return undefined;
			}
		}

		if (routerToolsEnabled && hasToolsActive) {
			const toolsModel = await findToolsCandidateModel();
			const toolsCandidate = toolsModel?.id ?? toolsModel?.name;
			if (!toolsCandidate) {
				// No tool-capable model found — continue with normal routing instead of hard failing
			} else {
				try {
					logger.info(
						{ route: ROUTER_TOOLS_ROUTE, model: toolsCandidate },
						"[router] tools active; bypassing Arch selection"
					);
					const ep = await createCandidateEndpoint(toolsCandidate);
					const gen = await ep({ ...params });
					return metadataThenStream(gen, toolsCandidate, ROUTER_TOOLS_ROUTE);

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Check the router's upstream model catalog is reachable and loaded; retry after the model list loads successfully.
  2. Inspect router logs for the underlying selection error and fix the failing candidate/endpoint.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at ruflo/src/ruvocal/src/lib/server/router/endpoint.ts:222 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/39a160c3c5ebe921. Report an issue: GitHub.