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" width="1120" height="660" viewBox="0 0 1120 660" role="img" aria-labelledby="title desc">
<title id="title">One decision. Clear responsibilities.</title>
<desc id="desc">HiRoute supplies current input, retained history and frozen criteria. A decision model returns a task-category choice, degree probabilities and optional prior-stage competence. HiRoute applies thresholds, selects and executes a model group, and records competence against the actual previous stage.</desc>
<defs>
<marker id="arrow" markerWidth="8" markerHeight="8" refX="6" refY="4" orient="auto"><path d="M0 0L7 4L0 8" fill="none" stroke="#9ba9ee" stroke-width="1.5"/></marker>
<linearGradient id="hub" x2="1" y2="1"><stop stop-color="#303764"/><stop offset="1" stop-color="#222943"/></linearGradient>
</defs>
<rect width="1120" height="660" rx="24" fill="#101727"/>
<g font-family="Inter,Arial,'PingFang SC','Microsoft YaHei',sans-serif">
<text x="40" y="55" font-size="28" fill="#fff" font-weight="600">One decision. Clear responsibilities.</text>
<text x="40" y="88" font-size="17" fill="#b4bfd6">Judge the current task. Assess the previous stage. HiRoute selects and executes.</text>
<text x="40" y="146" font-size="18" fill="#a8b8ed">HiRoute supplies</text>
<text x="758" y="146" font-size="18" fill="#a8b8ed">HiRoute applies & records</text>
<rect x="40" y="170" width="310" height="94" rx="15" fill="#182135" stroke="#33415d"/>
<text x="60" y="204" font-size="21" fill="#fff" font-weight="600">Current user turn</text>
<text x="60" y="237" font-size="16" fill="#b4bfd6">A new question or feedback</text>
<rect x="40" y="282" width="310" height="94" rx="15" fill="#182135" stroke="#33415d"/>
<text x="60" y="316" font-size="21" fill="#fff" font-weight="600">Retained execution history</text>
<text x="60" y="349" font-size="16" fill="#b4bfd6">Accepted output · Tool activity</text>
<rect x="40" y="394" width="310" height="94" rx="15" fill="#182135" stroke="#33415d"/>
<text x="60" y="428" font-size="21" fill="#fff" font-weight="600">Frozen plan conditions</text>
<text x="60" y="461" font-size="16" fill="#b4bfd6">Categories · Degree · Scoring rubric</text>
<path d="M350 217H375V329M350 441H375V329M350 329H394" fill="none" stroke="#9ba9ee" stroke-width="2" marker-end="url(#arrow)"/>
<rect x="400" y="204" width="310" height="250" rx="15" fill="url(#hub)" stroke="#7582cb"/>
<text x="422" y="244" font-size="28" fill="#c0c9ff" font-weight="600">Decision model</text>
<text x="422" y="273" font-size="16" fill="#b4bfd6">Built-in connection</text>
<text x="422" y="296" font-size="16" fill="#b4bfd6">or optional custom extension</text>
<text x="422" y="332" font-size="16" fill="#e9ecfb">Task category · when configured</text>
<text x="422" y="362" font-size="16" fill="#e9ecfb">Degree probabilities · dual groups</text>
<text x="422" y="392" font-size="16" fill="#e9ecfb">Prior-stage competence · optional</text>
<text x="422" y="429" font-size="17" fill="#c0c9ff">One decision request</text>
<path d="M710 329H736V250H752M736 329V425H752" fill="none" stroke="#9ba9ee" stroke-width="2" marker-end="url(#arrow)"/>
<rect x="758" y="170" width="322" height="166" rx="15" fill="#222d4d" stroke="#7487d5"/>
<text x="778" y="207" font-size="20" fill="#d0d9ff" font-weight="600">Select & execute models</text>
<text x="778" y="239" font-size="16" fill="#b4bfd6">Difficulty routing: regular / primary</text>
<text x="778" y="265" font-size="16" fill="#b4bfd6">Custom: category → regular / primary</text>
<text x="778" y="292" font-size="15" fill="#b4bfd6">Apply thresholds and an applicable score</text>
<text x="778" y="316" font-size="15" fill="#b4bfd6">Ordered candidates · Bounded failover</text>
<rect x="758" y="364" width="322" height="124" rx="15" fill="#2b2544" stroke="#8c78b6"/>
<text x="778" y="399" font-size="19" fill="#e0cef8" font-weight="600">Prior-stage competence</text>
<text x="778" y="429" font-size="16" fill="#c4b5d9">Bound to the stage that actually ran</text>
<text x="778" y="453" font-size="15" fill="#c4b5d9">Category · Group · Model · Rubric</text>
<text x="778" y="477" font-size="14" fill="#c4b5d9">Missing or partial evidence stays unrated</text>
<path d="M1080 253H1096V524H24V329H34" fill="none" stroke="#697aab" stroke-width="2" stroke-dasharray="6 6" marker-end="url(#arrow)"/>
<text x="265" y="557" font-size="18" fill="#b4bfd6">Execution adds evidence for the next decision</text>
<text x="40" y="617" font-size="17" fill="#9aa8c6">New user turn: decide again. Same-turn tool continuation: inherit the frozen decision.</text>
</g>
</svg>