Routing Rules

Direct AI requests to specific models and providers using CEL-based routing rules.

Routing rules let you redirect requests based on conditions — model requested, metadata, query parameters, budget state, and more. Rules can target a different provider/model and define fallback chains.

Access

Open Finops Config → Routing Rules.

How routing works

Routing rules evaluation flow

When a request arrives, the gateway evaluates rules in priority order. The first matching rule can change the target provider and model. If the primary target fails, configured fallbacks are tried.

Create a routing rule

  1. Click + Create.
  2. Set Name and optional Description.
  3. Enable Enabled to activate the rule.
  4. Write a CEL Expression — the condition that must be true for this rule to match (e.g. always true for a catch-all demo rule).
  5. Choose Provider and Model targets — leave blank to keep the incoming request's provider/model.
  6. Set Fallbacks — comma-separated fallback model identifiers if the primary target is unavailable.
  7. Scope the rule:
    • Organization — applies to all keys under that org subtree
    • Scope Organization — runtime routing scope (mutually exclusive with virtual key scope in most cases)
    • Virtual Key Id — applies only to one key
  8. Set Priority — lower numbers evaluate first.
  9. Click Submit.

Verify routing

Open the Simulator, send a prompt, and look for the Routed banner when the used model differs from what you selected. Hover the rule name to see the CEL expression, target, and fallbacks.

  • Simulator — live routing verification
  • DashboardSaved via Routing KPI reflects routing savings