Make Codex and Claude Code subscriptions go further: a local model router that gives routine agent work to economical models and keeps your strongest model for the hard parts.
Rust ai-agentsai-gatewayclaude-codecodexcoding-agentcost-optimizationdeepseekllm-gatewayllm-routerlocal-firstmodel-routingrusttask-routingtauri
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 330" role="img"><title>A perfect cache would add only about 3 points of savings</title><rect width="1000" height="330" rx="20" fill="#eef2fa"/><g font-family="system-ui,sans-serif" fill="#192439"><text x="32" y="46" font-size="24" font-weight="700">A perfect cache would add only about 3 points of savings</text><text x="32" y="76" font-size="15" fill="#536079">Astra × Qwen experiment, pair 3 (the accepted pair where caching matters more), USD per task</text><text x="368.0" y="131.0" font-size="14" font-weight="400" text-anchor="end" fill="#192439">All Astra (recorded)</text><rect x="380" y="114" width="451.0" height="26" rx="4" fill="#5564bd"/><text x="839.0" y="132.0" font-size="14" font-weight="700" text-anchor="start" fill="#192439">$2.067</text><text x="368.0" y="183.0" font-size="14" font-weight="400" text-anchor="end" fill="#192439">HiRoute mixed (recorded, no Qwen cache hits)</text><rect x="380" y="166" width="38.8" height="26" rx="4" fill="#078677"/><text x="426.8" y="184.0" font-size="14" font-weight="700" text-anchor="start" fill="#192439">$0.178</text><text x="502.8" y="184.0" font-size="15" font-weight="700" text-anchor="start" fill="#056356">91% saved</text><text x="368.0" y="235.0" font-size="14" font-weight="400" text-anchor="end" fill="#192439">HiRoute mixed, if every input hit the cache</text><rect x="380" y="218" width="27.0" height="26" rx="4" fill="#5fb8a9"/><text x="415.0" y="236.0" font-size="14" font-weight="700" text-anchor="start" fill="#192439">$0.124</text><text x="502.8" y="236.0" font-size="15" font-weight="700" text-anchor="start" fill="#056356">94% saved</text><text x="32.0" y="296.0" font-size="13" font-weight="400" text-anchor="start" fill="#536079">Caching only discounts input. Even fully cached, $0.117 of the remaining $0.124 is output.</text></g></svg>