{"record":{"id":"321276439118be6b","repo":"ruvnet/ruflo","slug":"router-multimodal-is-enabled-but-llm-router-multim","errorCode":null,"errorMessage":"Router multimodal is enabled but LLM_ROUTER_MULTIMODAL_MODEL is not correctly configured. Remove the image or configure a multimodal model via LLM_ROUTER_MULTIMODAL_MODEL.","messagePattern":"Router multimodal is enabled but LLM_ROUTER_MULTIMODAL_MODEL is not correctly configured\\. Remove the image or configure a multimodal model via LLM_ROUTER_MULTIMODAL_MODEL\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"ruflo/src/ruvocal/src/lib/server/router/endpoint.ts","lineNumber":189,"sourceCode":"\t\t\tyield {\n\t\t\t\ttoken: { id: 0, text: \"\", special: true, logprob: 0 },\n\t\t\t\tgenerated_text: null,\n\t\t\t\tdetails: null,\n\t\t\t\trouterMetadata: { route: selectedRoute, model: actualModel },\n\t\t\t};\n\t\t\tfor await (const ev of gen) yield ev;\n\t\t}\n\n\t\tif (routerMultimodalEnabled && hasImageInput) {\n\t\t\tlet multimodalCandidate: string | undefined;\n\t\t\ttry {\n\t\t\t\tconst all = await getModels();\n\t\t\t\tmultimodalCandidate = getConfiguredMultimodalModelId(all);\n\t\t\t} catch (e) {\n\t\t\t\tlogger.warn({ err: String(e) }, \"[router] failed to load models for multimodal lookup\");\n\t\t\t}\n\t\t\tif (!multimodalCandidate) {\n\t\t\t\tthrow new Error(\n\t\t\t\t\t\"Router multimodal is enabled but LLM_ROUTER_MULTIMODAL_MODEL is not correctly configured. Remove the image or configure a multimodal model via LLM_ROUTER_MULTIMODAL_MODEL.\"\n\t\t\t\t);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tlogger.info(\n\t\t\t\t\t{ route: ROUTER_MULTIMODAL_ROUTE, model: multimodalCandidate },\n\t\t\t\t\t\"[router] multimodal input detected; bypassing Arch selection\"\n\t\t\t\t);\n\t\t\t\tconst ep = await createCandidateEndpoint(multimodalCandidate);\n\t\t\t\tconst gen = await ep({ ...params });\n\t\t\t\treturn metadataThenStream(gen, multimodalCandidate, ROUTER_MULTIMODAL_ROUTE);\n\t\t\t} catch (e) {\n\t\t\t\tconst { message, statusCode } = extractUpstreamError(e);\n\t\t\t\tlogger.error(\n\t\t\t\t\t{\n\t\t\t\t\t\troute: ROUTER_MULTIMODAL_ROUTE,\n\t\t\t\t\t\tmodel: multimodalCandidate,","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/ruvnet/ruflo/blob/6b01dc5a687b26b3e218f796de45ec51f8fa9e8c/ruflo/src/ruvocal/src/lib/server/router/endpoint.ts#L171-L207","documentation":"Thrown by the router endpoint (endpoint.ts) when LLM_ROUTER_ENABLE_MULTIMODAL=true, the user submitted a message containing an image file, and getConfiguredMultimodalModelId(models) returned undefined. The router bypasses Arch-based routing for image inputs and routes directly to a configured multimodal model; if none is configured (or the configured id does not match any loaded model), it refuses to proceed rather than silently sending the image to a text-only model.","triggerScenarios":"User uploads an image in a conversation using the router alias model while LLM_ROUTER_ENABLE_MULTIMODAL is true but LLM_ROUTER_MULTIMODAL_MODEL is unset, references a non-existent model id, or points at a model that was not returned by the upstream /models list (so getConfiguredMultimodalModelId cannot match it).","commonSituations":"Operators flipping LLM_ROUTER_ENABLE_MULTIMODAL=true without also setting LLM_ROUTER_MULTIMODAL_MODEL; typo in the model id; the configured multimodal model was renamed/retired upstream; the upstream registry was filtered (MODELS overrides) and excluded the multimodal model; a stale env var from a previous deployment.","solutions":["Set LLM_ROUTER_MULTIMODAL_MODEL to the id of a model that is present in the loaded models list and actually supports image input.","Verify the id matches an entry returned by /models (check the model registry / logs).","If you do not have a multimodal backend, disable LLM_ROUTER_ENABLE_MULTIMODAL or instruct users not to attach images.","Ensure the multimodal model's multimodal flag and multimodalAcceptedMimetypes include image/*."],"exampleFix":"# before\nLLM_ROUTER_ENABLE_MULTIMODAL=true\n# LLM_ROUTER_MULTIMODAL_MODEL unset\n\n# after\nLLM_ROUTER_ENABLE_MULTIMODAL=true\nLLM_ROUTER_MULTIMODAL_MODEL=meta-llama/Llama-4-Scout-17B-16E-Instruct","handlingStrategy":"validation","validationCode":"function isMultimodalConfigured(models: ProcessedModel[]): boolean {\n  const id = (config.LLM_ROUTER_MULTIMODAL_MODEL || \"\").trim();\n  if (!id) return false;\n  const m = models.find((x) => x.id === id || x.name === id);\n  return Boolean(m && m.multimodal);\n}\n\nif (routerMultimodalEnabled && !isMultimodalConfigured(models)) {\n  logger.warn(\"Disable LLM_ROUTER_ENABLE_MULTIMODAL or set a valid LLM_ROUTER_MULTIMODAL_MODEL\");\n}","typeGuard":"function isImageMessage(message: { files?: { mime?: string }[] }): boolean {\n  return Boolean((message.files ?? []).some((f) => typeof f?.mime === \"string\" && f.mime.startsWith(\"image/\")));\n}","tryCatchPattern":"try { const gen = await routerEndpoint(params); }\ncatch (e) {\n  if (e instanceof Error && /LLM_ROUTER_MULTIMODAL_MODEL is not correctly configured/.test(e.message)) {\n    return { error: \"multimodal-not-configured\", retryableAfterConfig: true };\n  }\n  throw e;\n}","preventionTips":["Always set LLM_ROUTER_MULTIMODAL_MODEL when enabling LLM_ROUTER_ENABLE_MULTIMODAL.","Validate the configured id exists in the upstream /models list and supports image input.","Add a startup check that cross-references LLM_ROUTER_MULTIMODAL_MODEL against the loaded model registry.","Update the id when the upstream model is renamed or retired."],"tags":["router","multimodal","config","env","image-input"],"backgroundTag":null,"analyzedSha":"6b01dc5a687b26b3e218f796de45ec51f8fa9e8c","analyzedAt":"2026-08-12T13:20:50.148Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}