Create an Advanced policy in the Requesty Console. Prefer zero setup? Try a managed policy maintained by Requesty.
How It Works
1
Measure each model
Requesty tracks each model’s recent latency, its success rate and the price its requests were recently charged after prompt caching, across all traffic on the router.
2
Score with your weights
Every model gets a score of
latency^speed × price^price × (1 / success rate)^reliability, where each exponent is a weight you set. Lower is better. A weight of 0 ignores that factor, and a higher weight makes it count more.3
Route best first, then fall back
The request goes to the lowest-scoring model. If it fails, the router tries the next one in the ranking, and so on.
Creating an Advanced Policy
1
Create the Policy
Go to Routing Policies, click Create Policy, and select the Advanced strategy card.
2
Pick a preset or set the weights
Start from a preset, or move the Speed, Price and Reliability sliders (0 to 3) for a custom mix. At least one weight must be above 0.
The editor previews the order your models would be tried in right now, with each model’s latency, success rate and price.
3
Select Models
Add models from the catalog below the form. The order you add them in does not matter, since the policy ranks them on every request.
4
Use the Policy in Your Code
Reference the policy in your model parameter:
Create It with the Management API
POST /v1/manage/policy accepts a best_balance config with the models and the three weights:
Good to Know
How is price measured?
How is price measured?
Each model is ranked at the price its requests were recently charged, so prompt caching is taken into account. Free models are ranked at the price of the cheapest paid model in the policy.
What if a model has no latency data?
What if a model has no latency data?
It is ranked as if it were slow, and it is still tried on a small share of requests so the router can learn how it performs.
Does a conversation stay on one model?
Does a conversation stay on one model?
Yes. Requests that share a
trace_id or session keep going to the model the conversation started on, so prompt caches keep being reused.How does this differ from Latency routing?
How does this differ from Latency routing?
Latency routing only considers speed. Advanced lets you add price and reliability, and choose how much each one counts.