Basic configuration
Setstrategy.mode to "loadbalance" and assign a weight to each target. Weights are normalized, so 0.7 and 0.3 work the same as 7 and 3.
Load balancing across API keys
Distribute requests across multiple API keys for the same provider to stay under per-key rate limits:Load balancing across models
You can also distribute traffic across different models on the same provider:Combining load balancing with fallbacks
Nest targets to get both load balancing and automatic failover. Each load-balanced target can itself be a fallback group:Response headers
The gateway reports which target handled the request:Weight selection is probabilistic, not strictly proportional per-request. Over a large number of requests, the distribution will converge to the configured weights.