Claude Code model router

HiRoute

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.

Install

From source
git clone https://github.com/higress-group/HiRoute.git

From the README

简体中文

  Pay for your strongest model only where the work needs it.
  Economical models handle routine turns; your primary model takes the complex work
  and steps in when an economical model falls short.
  Keep using Codex, Claude Code and other Agents with your subscriptions, APIs and local models.

  Download ·
  Quickstart ·
  Cost results ·
  Experiments ·
  Documentation ·
  Contributing

Real-world cost savings

In a real research and architecture-review task, Qwen 3.8 Flash did the research and GPT-6 Astra
made the critical decision. At the same acceptance standard, the task cost about 90% less
than running everything on Astra.

API-equivalent estimates. Full case study

Switching models keeps the savings

HiRoute changes models only at clear boundaries: a new user message, or context compaction and
rebuild. Tool calls within a turn stay on the same model. A switch misses the cache once, then
later calls hit it again, so cache loss does not eat into the savings.
Switching Models Loses Cache, Not the Savings

Familiar Agents, more model choices

Keep working in Codex, Claude Code, Qoder, Pi, OpenCode, Hermes or DeepSeek Harness.
HiRoute runs locally and brings supported subscriptions, API connections and local models
into one place. For example, combine an economical API model with your Codex subscription,
or use a smaller and a stronger model from the same supported source.

One task, the right model for each stage

Each new message gets a fresh decision. A decision model answers three independent questions
anchored on the task's timeline, and HiRoute combines the answers with your plan:

- Previous: how did the last step go? A competence score, also used for model performance
  reports and trust suggestions.
- Current: how hard is this step? A simple…
Read the full README on GitHub

Details

Language
Rust
License
Apache-2.0
Last updated
3 November 2026
Topics
ai-agentsai-gatewayclaude-codecodexcoding-agentcost-optimizationdeepseekllm-gatewayllm-routerlocal-firstmodel-routingrust

FAQ

What is HiRoute?

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. It is a model router for Claude Code, from higress-group/HiRoute on GitHub.

How do I install HiRoute?

Clone higress-group/HiRoute from GitHub and follow the setup steps in its README.

Is HiRoute popular?

higress-group/HiRoute has 381 GitHub stars and 41 forks. It was last updated on 3 November 2026.

More model routers & proxies

Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.