Build Your Own Router
Build Your Own Router (BYOR) scores candidate models on a weighted blend of benchmarks you pick and routes each request to the top scorer. Use it when the right model depends on evaluations you trust, such as your own judge-graded prompts, rather than a generic cost or quality curve. BYOR is configured in the dashboard, has no request fields, and is reached through the policy’s model alias.
How it works
- Candidates. Only models scored in at least one of the config’s benchmarks are considered (an unscored model never routes), filtered by your organization’s zero data retention, credential, region, and capability requirements.
- Weighted score. Benchmark scores are normalized to
0to1, and a model’s score is the weighted average across its benchmarks. Each benchmark’s Missing coverage setting handles a missing score: Median (default) ranks it at the median, Exclude removes the model, and Zero scores it0. - Capability boost. Gateway classifies the prompt (code or math, for example). Benchmarks tagged with the matching capability get up to 1.6 times their weight, then weights are renormalized.
- Complexity tilt. On complex prompts, models above the candidate average gain up to 40%; simple prompts favor lower-scoring models; mid-range prompts get no tilt. A custom classifier can replace the built-in complexity scorer.
- Pick. The highest score wins. Ties go to the model with more real (not filled-in) benchmark scores.
If no model qualifies, the config’s fallback model serves the request. With no usable fallback, it fails with 503 byor_no_qualifying_model.
Build your benchmark library
Routing policies → Benchmarks groups benchmarks under Your benchmarks and Published (maintained by Merge, read-only). Select Add benchmark to create your own.
Capability tags are Code, Math, Reasoning, Knowledge, Instruction, Creative, Finance, and General. Untagged benchmarks never get the capability boost.
Create a BYOR policy
- In Routing policies → Policies, create or edit a policy and choose the Build Your Own Router strategy
- Pick a config from Saved configs, or choose New configuration
- Name the config and add weighted benchmarks. Weights must total 100%; Normalize to 100% appears when they don’t
- Optionally choose a Classifier and a Fallback model (optional)
- Save. The config applies from the next request
BYOR isn’t available on customer routing policies.
Score overrides
To correct one model’s score on one benchmark (Published or your own), select the pencil icon on its row in the config editor. The override replaces the score on the normalized 0 to 1 scale without changing the benchmark. Clear the field and save to remove it.
Permissions
Admin and Developer include both Custom routing permissions; Security and Read Only include View Custom routing. See Roles and permissions.