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
rfails acceptance and incurs one fallback call costingh. - 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?”