{"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":"exception","errorClass":null,"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/fa13ee4ad60ac2090b1480656eb233521790d640/ruflo/src/ruvocal/src/lib/server/router/endpoint.ts#L171-L207","documentation":"Thrown by the LLM router endpoint (endpoint.ts) when a request contains image input, router multimodal bypass is enabled (LLM_ROUTER_ENABLE_MULTIMODAL=true), but getConfiguredMultimodalModelId() cannot resolve a multimodal model from LLM_ROUTER_MULTIMODAL_MODEL. Instead of silently sending the image to a text-only model, the router refuses the request.","triggerScenarios":"User attaches an image while LLM_ROUTER_ENABLE_MULTIMODAL is true, and either LLM_ROUTER_MULTIMODAL_MODEL is unset/blank, or its value matches no model id/name in the registry, or the matched model is not actually flagged multimodal. Also fires when getModels() itself failed earlier (logged as a warn) so the lookup had no list to search.","commonSituations":"Enabling the multimodal shortcut flag without setting the companion model variable; renaming a model upstream so the configured id no longer exists; copying an env template where LLM_ROUTER_MULTIMODAL_MODEL is a placeholder like <model-id>.","solutions":["Set LLM_ROUTER_MULTIMODAL_MODEL to the exact id of a multimodal model present in GET ${OPENAI_BASE_URL}/models (one with multimodal: true).","If you do not want multimodal routing, set LLM_ROUTER_ENABLE_MULTIMODAL=false so images are rejected earlier with a clearer UX.","Check the [router] 'failed to load models for multimodal lookup' warn — if present, fix the underlying model-registry failure first.","Restart the server after changing env vars so config reloads."],"exampleFix":"# .env.local (before)\nLLM_ROUTER_ENABLE_MULTIMODAL=true\n# LLM_ROUTER_MULTIMODAL_MODEL unset\n\n# .env.local (after)\nLLM_ROUTER_ENABLE_MULTIMODAL=true\nLLM_ROUTER_MULTIMODAL_MODEL=qwen/qwen2.5-vl-72b-instruct","handlingStrategy":"validation","validationCode":"// before enabling the shortcut, verify a multimodal model resolves\nimport { getModels } from \"$lib/server/models\";\n\nconst all = await getModels();\nconst mm = all.find((m) => m.id === process.env.LLM_ROUTER_MULTIMODAL_MODEL && m.multimodal);\nif (process.env.LLM_ROUTER_ENABLE_MULTIMODAL === \"true\" && !mm) {\n\tthrow new Error(\"LLM_ROUTER_MULTIMODAL_MODEL must name a multimodal model\");\n}","typeGuard":"function isMultimodalModel(m: { multimodal?: boolean }): m is { multimodal: true } {\n\treturn m.multimodal === true;\n}","tryCatchPattern":"try {\n\tawait routeWithRouter(params);\n} catch (err) {\n\tif (String(err).includes(\"LLM_ROUTER_MULTIMODAL_MODEL\")) {\n\t\treturn new Response(\"Image input is not supported by this deployment\", { status: 400 });\n\t}\n\tthrow err;\n}","preventionTips":["Validate router env vars as a set at startup: if ENABLE_MULTIMODAL is on, MULTIMODAL_MODEL must resolve.","Fail startup (or log loudly) when a configured model id is absent from the registry.","Re-validate after model refreshes — upstream model renames silently invalidate the configured id."],"tags":["router","multimodal","configuration","validation"],"backgroundTag":"feature-flag-misconfiguration","analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}