The most common way a shadow test fails is not a technical bug. It is that the team looks at the results, decides the numbers are "probably fine," and ships. Pre-agreeing the gates removes that discussion.
A gate has three parts: the metric, the threshold, and the rule for when the evidence is sufficient.
| Gate | Metric | Pre-agreed threshold | Why it is on the list |
|---|
| Cost | Median cost per request, candidate vs current | Candidate at or below target on matched request classes | The whole point of a threshold change |
| Cost tail | 95th percentile cost per request | No worse than current | Catches a few expensive misroutes |
| Task quality | Pass rate on the automated check for the task | Within a pre-agreed band of current | Stops cheap-but-wrong answers |
| Format validity | Share of responses that parse against the schema | Equal or better | Cheap to measure, fails loudly |
| Escalation rate | Share of requests that needed a retry or fallback | No worse than current | Exposes hidden cost and hidden failure |
Two of these deserve emphasis. First, compare cost per request, not total spend. Total spend moves with traffic volume and will make a good policy look bad during a busy week. Second, quality must be measured by scoring the output, not by trusting the router's own signal. As Braintrust's routing guide puts it, pre-response signals select a model before any output exists, so prompt complexity and pricing can estimate cost but cannot show whether the selected model returned an accurate, relevant and correctly formatted response.
The scale of the risk is not hypothetical. A product team shipped an AI feature tied to a major release and finance found a $44,000 line item increase tied to the feature, well beyond what anyone modeled, because nothing in the stack attributed cost at the level of detail needed to catch it earlier, per this account of AI ROI measurement. Shadow logging at the request level is that level of detail, applied before the change instead of after.
Worked example with numbers
Take a support assistant handling 200,000 requests a month. The current policy costs $0.011 per request on average, so $2,200 a month. The candidate policy sends short, low-risk tickets to a cheaper model and keeps the rest where they are. You mirror 5 percent of traffic, which is 10,000 requests a month, and you pay for each mirrored request at the candidate's rate.
Suppose the candidate comes in at $0.006 per request on the mirrored sample, a saving of $0.005, which projects to $1,000 a month across all traffic. The mirror itself costs about $60 a month at the candidate rate, so the test pays for itself roughly twice over in the first month if the policy is promoted, and costs $60 if it is not.
Now the quality side. The automated check passes 94.0 percent of current-policy responses and 93.2 percent on the candidate, on the same 10,000 requests. With roughly 10,000 paired observations, the standard error on a proportion near 0.93 is about 0.26 percentage points, so a 0.8 point drop is roughly three standard errors and is not noise. That is a real regression, and the decision rule should say what happens next: either narrow the condition so the cheaper route covers fewer request classes, or keep the current policy. Widen the sample only when the gap is smaller than noise, not when it is unfavorable.
Note how the arithmetic is done. Cost difference times volume gives the benefit. The paired quality difference divided by its standard error tells you whether the difference is real. Both numbers come from the same mirrored requests, which is why the pairing matters.