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>缓存全命中,也只多省约 3 个百分点</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">缓存全命中,也只多省约 3 个百分点</text><text x="32" y="76" font-size="15" fill="#536079">Astra × Qwen 实验第 3 组(两组达标运行中缓存影响较大的一组),美元/单</text><text x="368.0" y="131.0" font-size="14" font-weight="400" text-anchor="end" fill="#192439">全用 Astra(实际记录)</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 混合(实际记录,Qwen 零缓存命中)</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%</text><text x="368.0" y="235.0" font-size="14" font-weight="400" text-anchor="end" fill="#192439">HiRoute 混合(假设输入全部命中缓存)</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%</text><text x="32.0" y="296.0" font-size="13" font-weight="400" text-anchor="start" fill="#536079">缓存只给输入打折。即使输入全部命中,混合路由剩下的 $0.124 里仍有 $0.117 是输出费用。</text></g></svg>