Eval-Driven Routing

Eval-Driven Routing A workflow diagram generated by Archify. 01 / Task 02 / Local Path EX / Routing Policy 04 / Remote Consult Attempt local Evidence decide Spend + prove Quality floor Billable path Task Class · coding / debug · Task › Attempt local Task Class coding / debug Local Pi · attempt · Local Path › Attempt local · prefer Local Pi attempt prefer Verify · local proof · Local Path › Spend + prove Verify local proof Stay Local · floor unmet · Routing Policy › Attempt local Stay Local floor unmet Wilson Floor · eval evidence · Routing Policy › Quality floor › Evidence decide · P(ok) Wilson Floor eval evidence P(ok) Settle Ledger · honest spend · Routing Policy › Spend + prove Settle Ledger honest spend Expected Cost · cost / P(ok) · Remote Consult › Evidence decide Expected Cost cost / P(ok) Budget Reserve · hard cap · Remote Consult › Billable path › Evidence decide Budget Reserve hard cap LiteLLM · localhost · Remote Consult › Billable path › Spend + prove LiteLLM localhost Expert · OpenRouter · Remote Consult › Billable path › Spend + prove Expert OpenRouter eligible response success escalate? continue below floor Legend Agent logic Policy Tool action Context / trace Cloud service External system

Local first

  • • Local Pi attempts the task before any billable consult
  • • Verification is a local proof, not an LLM claim

Expected cost

  • • Wilson floor uses eval evidence for the task class
  • • Route on cost / P(success), not cheapest request alone

Budget honesty

  • • Reserve before LiteLLM; settle after response
  • • Connection refused never fabricates spend