Skip to content

Routing policies

Router quality depends less on YAML and more on your rules: privacy, difficulty, cost, latency, and verifiability.

Classify before calling

TerminalCode
task_policy:
  summarization:
    preferred: local-fast
    max_cost_usd: 0.01
  legal_or_private:
    preferred: local-private
    cloud_allowed: false
  final_editorial_review:
    preferred: frontier-review
    requires_trace: true
  code_patch:
    preferred: coding-agent
    requires_tests: true

Routing signals

  • Data sensitivity: public, internal, personal, or secret.
  • Expected difficulty: simple, medium, strong reasoning, or multimodal.
  • Latency tolerance: interactive, batch, or overnight review.
  • Need for citations, traceability, or human review.

Start with few rules. A router with ten clear policies usually works better than one with a hundred exceptions nobody understands.