Router

Routing guide

Eligible providers are ranked, then executed in score order with timeouts, fallbacks, and a durable circuit breaker. Bing, Parallel, and Perplexity Sonar are dark: they are excluded from default auto-route unless listed in providers.only or providers.order.

Scoring

Cost and latency are inverted. Freshness, reliability, and quality are 0–1 catalog signals. A sort override collapses the profile (price, latency, throughput, quality, or freshness). providers.order pins try-order ahead of remaining scored candidates.

Engines

EngineCostLatencyFreshReliabilityQuality
auto0.220.20.180.20.2
cheap0.550.10.10.150.1
fresh0.10.150.50.10.15
fast0.080.50.10.20.12
reliable0.080.120.10.50.2

Circuits and rate limits

Three failures in 30 seconds open a 15-second circuit, stored in Redis when configured so Vercel isolates share state. Per-key rate limits emit standard 429 headers. Demo key: 20 rpm / 200 rpd.