Mintplex-Labs/anything-llm · error
Condition logic must be one of: ${VALID_CONDITION_LOGIC.join
Error message
Condition logic must be one of: ${VALID_CONDITION_LOGIC.join(", ")} What it means
Validation error propagated from ModelRouterRule.create: the condition logic field (how multiple conditions combine) is not one of VALID_CONDITION_LOGIC, so rule evaluation semantics would be undefined and the rule is rejected.
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
- Use one of the listed condition logic values (e.g. all/any).
- Check VALID_CONDITION_LOGIC in the endpoint source.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at server/endpoints/modelRouter.js:126 when the library encounters an invalid state.
Common situations: Rule creation with an unrecognized condition logic operator.
AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18).
Data as JSON: /api/errors/a64910c872cc353b.
Report an issue: GitHub.