Mintplex-Labs/anything-llm · error
Description is required for LLM rules. Describe when this ru
Error message
Description is required for LLM rules. Describe when this rule should match.
What it means
Validation error propagated from ModelRouterRule.create: an LLM-type rule was submitted without a description; since LLM rules rely on a natural-language description of when they should match, it is mandatory and creation is refused.
Source
Thrown at server/endpoints/modelRouter.js:126
}
}
);
app.post(
"/model-routers/:id/rules/new",
[validatedRequest, flexUserRoleValid([ROLES.admin])],
async (request, response) => {
try {
const { id } = request.params;
const user = await userFromSession(request, response);
const data = reqBody(request);
const routerId = Number(id);
const { rule, error } = await ModelRouterRule.create(
routerId,
data,
user?.id || null
);
if (error) return response.status(400).json({ rule, error });
await Telemetry.sendTelemetry("model_router_rule_created");
ModelRouterService.invalidateRouter(routerId);
return response.status(200).json({ rule });
} catch (e) {
console.error(e);
response.sendStatus(500);
}
}
);
app.put(
"/model-routers/:id/rules/reorder",
[validatedRequest, flexUserRoleValid([ROLES.admin])],
async (request, response) => {
try {
const { id } = request.params;
const { ruleUpdates } = reqBody(request);View on GitHub (pinned to 3aec848f28)
Solutions
- Add a description explaining when this LLM rule should match.
- Make the description specific so the router LLM can classify correctly.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/endpoints/modelRouter.js:126 when the library encounters an invalid state.
Common situations: Creating an LLM-type routing rule without the required description.
AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18).
Data as JSON: /api/errors/56fa6e77c3a7ff71.
Report an issue: GitHub.