Skip to content
Sign in Create account

OrggrcArbitrageRuleCreate

object

  • condition object required

    Supported keys are lang, role, length, region, and expr. The expr value is parsed as a condition with prompt.tokens, cost.cents_estimate, length, detector.<id>, task, tier, lang, role, region, or needs.reasoning fields; comparisons may be joined by AND or OR and grouped with parentheses. Expressions and model targets are validated when saved. These saved rules are not currently applied to inference requests. An empty condition is allowed only when is_catch_all is true.

    • expr string

      A condition expression; see the supported fields and operators on condition.

      Length: at most 2048 characters
    • lang any
    • length any
    • region any
    • role any
  • enabled boolean
  • fallback_provider string or null

    A provider slug, provider/model pair, or model ID from the current provider catalog. Display names without a matching catalog ID are rejected.

    Length: at most 60 characters. Example: "openai/gpt-5.4-mini"
  • is_catch_all boolean
  • name string required
    Length: 1 to 120 characters. Example: "Primary route"
  • position integer
    Range: 0 to 9999
  • primary_provider string required

    A provider slug, provider/model pair, or model ID from the current provider catalog. Display names without a matching catalog ID are rejected.

    Length: 1 to 60 characters. Example: "anthropic/claude-haiku-4-5"
  • weight integer
    Range: 1 to 100

Example

{
  "condition": {
    "expr": "prompt.tokens > 1000"
  },
  "name": "Large prompt route",
  "primary_provider": "anthropic/claude-haiku-4-5"
}