How should a routing policy account for cheap outputs that require expensive regeneration?

A cheap model call is not necessarily a cheap completed task. If its output fails validation and a second model regenerates the answer, the accepted result carries the cost of both attempts.

The September 1 routing tutorial makes that distinction explicitly: compare cost per accepted output, and count retries and rejected generations. Its price examples are dated assumptions, not evidence that a particular route will meet your quality target. The useful takeaway is an accounting rule, not a model ranking.

Give the denominator a quality contract

For a fixed task cohort, I would use:

API cost per accepted output =
    cost of all attempts for the cohort / accepted task outputs

“All attempts” includes rejected responses, retries, fallbacks, and requests that exhaust the route list without producing an accepted result. Count an accepted task once, not each successful HTTP response. If no task is accepted, report zero acceptances and total spend; the ratio is undefined.

Keep the acceptance rule fixed across policies. A JSON schema check can establish structural validity, but not necessarily whether an extracted value or answer is correct. Report human-review rate alongside the ratio. If review labor is measured, show an explicitly labeled total-cost measure as well; do not silently treat it as free or invent a labor rate.

A break-even rule for cheap-first routing

Here is a simplified derivation, not a benchmark. Suppose:

  • Every task first incurs a fixed cheap-call cost c.
  • A fraction r fails acceptance and incurs one fallback call costing h.
  • Every fallback is accepted, and there are no other retries.
  • Going directly to the fallback tier also always produces an accepted result under the same quality rule.

Then cheap-first costs c + r*h per accepted output, versus h for the direct route. For h > 0, cheap-first wins on API spend only when:

r < 1 - c/h

The cheap attempt must earn its place by avoiding enough fallback calls to pay for itself. A low token rate alone cannot establish that.

This threshold stops being sufficient when fallback can fail, token lengths vary by route, or additional retries occur. Nor does it price the extra wait for a rejected generation. Use actual cohort totals and end-to-end latency rather than promoting this simplified inequality into a production guarantee.

Make rejected attempts visible

There is an important implementation gap in the tutorial’s compact router: it records acceptance for each attempt, but returns token usage only for the accepted response. That is useful for tracing the route, not enough for the accounting above.

For an evaluation, extend the attempt record with:

  • task ID, task type, policy version, model, and acceptance-rule version;
  • attempt usage and the applicable dated rate, including rejected generations;
  • rejection or retry reason, fallback destination, and final task outcome;
  • total task latency, plus whether human review was required.

Reconcile unknown usage or charges after timeouts; missing usage is not evidence of zero cost. Keep identifiers and operational metadata without logging unnecessary customer content.

Run competing policies on the same labeled requests, split results by task type, and compare accepted-output cost with task pass rate, p50/p95 latency, error rate, fallback rate, and human-review rate. Keep escalation bounded: exhausting the approved route list should produce an explicit failure, not an invisible regeneration loop.

The decision is not simply “which model has the lowest rate?” It is “which policy meets this task’s quality and latency constraints at the lowest measured cost per accepted result?”

For an open-model candidate in this router, I would make the evaluated configuration part of the route identity. A model-family name alone is too loose a label for a cost-per-accepted-output comparison.

My proposed evaluation record would include the exact checkpoint or revision, tokenizer and prompt template, inference runtime and version, precision or quantization setting, generation limits, and the hardware used for a locally served candidate. For a hosted route, record the configuration the provider actually exposes and mark the rest unknown. Do not fill those gaps with assumptions about an equivalent local deployment.

Then separate two questions:

  • Can this configuration pass the task contract? Evaluate it on the same held-out requests and acceptance rubric, retaining failures by task type. If changing quantization is the intervention, keep the checkpoint and evaluation harness fixed and record any other necessary changes.
  • Does the resulting routing policy save resources? Feed those observed acceptance outcomes into the full cheap-first policy evaluation, including its fallback attempts. A standalone candidate’s pass rate is not itself the policy’s cost per accepted output.

For a local candidate, I would also keep attributed serving cost separate from API charges and state the accounting assumptions, including the measurement window and treatment of idle capacity. Otherwise a local route can appear free simply because it has no per-request invoice.

This is an evaluation protocol, not evidence that a particular open model or quantization level matches a hosted route. The useful comparison is between recorded configurations under one task contract, with unknowns left visible.