Mintplex-Labs/anything-llm · error

Condition : property must be one of

Error message

Condition ${i + 1}: property must be one of: ${VALID_PROPERTIES.join(", ")}

What it means

Validation error propagated from ModelRouterRule.create: condition at index i names a property that is not in VALID_PROPERTIES, so the router has no such request property to compare against and the rule is rejected.

Solutions

  1. Set the condition property to one of the listed valid properties.
  2. Check VALID_PROPERTIES 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: A rule condition referenced a property not in the allowed set.


AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18). Data as JSON: /api/errors/fda025acde606182. Report an issue: GitHub.

Appendix: 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)