
Traffic is split across models by the weights you set, while the same conversation can stay on one provider.
How It Works
Assign weights
Requests are routed
Consistency guaranteed
trace_id or user_id always go to the same model.Benefits
A/B Testing
Gradual Rollouts
Cost Optimization
Consistent Experiences
Creating a Load Balancing Policy
Create the Policy
policy/your-policy-name in your requests.
Configure Weights
Use the Policy in Your Code
policy/your-policy-name:Consistency Guarantee
Load balancing uses deterministic hashing to ensure the same user always gets the same model.Maintaining Consistency Across Requests
To keep a user on the same model across multiple requests, pass atrace_id:
Load Balancing Between Policies
You can load balance between entire routing policies, not just individual models. This is powerful for canary deployments, A/B testing different routing strategies, and gradual migration from one policy to another.Example: Policy Rollout
Say you have two fallback policies and want to gradually shift traffic:gradual-rollout with these weights. As you gain confidence, adjust to 50/50, then 0/100.
Use Cases
A/B Testing New Models
A/B Testing New Models
Gradual Model Rollout
Gradual Model Rollout
gpt-5.2 as you validate quality.Cost-Optimized Distribution
Cost-Optimized Distribution
Multi-Provider Redundancy
Multi-Provider Redundancy
Key Selection (BYOK)
For each model in your load balancing policy, you can choose:Monitoring and Analytics
Every policy page includes a Live Performance panel showing real traffic across the models in the policy. Switch between Latency, Success, and Speed over the last 24 hours or 7 days to see how the distribution plays out in practice. For deeper analysis:Open Analytics
Filter by policy
Compare performance
FAQ
How does consistent hashing work?
How does consistent hashing work?
trace_id (or request_id if no trace_id) to deterministically select a model. The same ID always produces the same hash, which maps to the same model.What happens if I change the weights?
What happens if I change the weights?
Can I load balance and have fallback?
Can I load balance and have fallback?
Do all models need to be compatible?
Do all models need to be compatible?
How do I ensure exactly 20% of users see the new model?
How do I ensure exactly 20% of users see the new model?
trace_id (like user ID). With 100+ unique users, the distribution will converge to your configured weights (e.g., 20%). With small sample sizes, expect ±5% variance.