Build Your Own Router
Score-based routing that picks models against benchmarks you choose, with your own scores or evals
Score-based routing that picks models against benchmarks you choose, with your own scores or evals
Build Your Own Router (BYOR) routes each request to the model with the highest score across a weighted blend of benchmarks you choose. Use it when the right model for your workload depends on evaluation criteria you measure, not on a generic cost or quality tier.
BYOR is configured entirely in the dashboard. There are no BYOR-specific fields you pass in individual POST /responses requests.
At request time, Gateway scores each eligible model with a weighted sum across the benchmarks in your configuration:
Weights you set in the dashboard must sum to 1.0. The model with the highest score wins.
Benchmarks tagged with a capability (for example “code”, “math”, “tool-use”) get a capability boost when Gateway’s prompt classifier detects that capability on the inbound request. The matched benchmark counts for more in the weighted sum, so a request that looks like code routes against your code-quality benchmarks more strongly.
If no model qualifies, Gateway routes to your configured fallback model. If there’s no fallback, the request fails.
You can mix three kinds of benchmarks in a single configuration. They all live in Configuration → Benchmarks in the dashboard.
For eval-based and uploaded benchmarks, Gateway normalizes raw scores to the [0, 1] range before they enter the weighted sum, so a benchmark on a 0-100 scale combines cleanly with one on 0-10.
In the dashboard, Published benchmarks appear under Published benchmarks and the ones you create appear under Your benchmarks.
A score override is a per-cell fix on top of a benchmark. Use one when an upstream score for a single model on a single benchmark is wrong (or out of date) and you want to correct it without re-uploading the whole benchmark.
Overrides work on both Published and custom benchmarks. They’re stored separately and applied at routing time on top of the underlying value, so deleting the override restores the original score. Set or remove overrides from the pencil icon on each benchmark row in the BYOR config editor.
Two steps, both in the dashboard:
Open Configuration → Benchmarks. Published benchmarks appear under Published benchmarks; anything you’ve created appears under Your benchmarks. Click Define benchmark to add a new one, then pick how you want to populate it:
Open Configuration → Routing and create or edit a policy. Pick Build Your Own Router as the strategy type, then either select a saved configuration from the Saved configs dropdown or pick New configuration to build one inline. The editor lets you:
Save the policy and BYOR takes effect on the next request.
Creating, editing, or deleting BYOR configurations requires the Manage Build Your Own Router permission. Reading them requires View Build Your Own Router. Both are included in the Admin and Developer system roles by default. See Roles and permissions for the full matrix.
Yes. A BYOR configuration is a weighted blend across any benchmarks you select, regardless of source. The weights are what control influence, not the source.
Gateway routes to your configured fallback model if one is set and eligible. If no fallback is configured, the request fails.
Intelligent routing uses Gateway’s complexity classifier to pick a model tier per request. BYOR uses your weighted benchmark scores. Intelligent is the right pick when you want sensible defaults out of the box; BYOR is the right pick when you have evaluation criteria specific to your workload.
Yes, use a score override. Overrides are per-(benchmark, model) and stack on top of the underlying score. Delete the override to restore the original.
Only if you turn on Auto-eval on new model in the BYOR configuration. With it on, Gateway runs the configuration’s eval-derived benchmarks against any new model added to your routing pool. Published and uploaded benchmarks are not auto-extended; you’ll need to upload scores for new models or run evals.