checkrd

Redundant rate limit

Two rate-limit rules target the same scope, making the less-restrictive one unreachable.

Redundant rate limit

When two rate-limit rules have the same scope (endpoint, global, or a body_field path), only the more restrictive limit can ever take effect. The engine applies the most-restrictive rate limit across all matching rules, so the looser limit never enforces — it is redundant.

Example

yaml
rules:
  - name: rl-strict
    limit:
      calls_per_minute: 30
      per: endpoint
  - name: rl-lenient # redundant: rl-strict is always more restrictive
    limit:
      calls_per_minute: 120
      per: endpoint

Fix

Remove the less-restrictive rate-limit rule. If you intended different limits for different endpoints or body fields, differentiate the scopes:

yaml
rules:
  - name: rl-openai
    limit:
      calls_per_minute: 30
      per: endpoint

Or, if per-model limits are needed, use body_field with different field paths:

yaml
rules:
  - name: rl-per-model
    limit:
      calls_per_minute: 60
      per: body_field
      field: "$.model"