Credentials. Hi Route stores subscription credentials, API keys and decision model connections, so use keys with the minimum permissions you need and review who else can access the local service.
Who it is forA developer whose Codex or Claude Code subscription runs out early because every step, including simple file reads, uses the strongest model.
The problemAgent sessions spend premium model usage on routine steps such as reading code or gathering facts, which drains the subscription quickly.
The outcomeRoutine turns run on an economical model, difficult turns stay on the primary model, and each session shows which model ran and what it cost.
What you need first
- macOS 15 or later on Apple silicon or Intel, or Linux x86_64 or ARM64 (aarch64) for the headless CLI and daemon
- An existing Codex or Claude Code subscription, a registered API, or a compatible custom API to connect
- A decision model connection (Bailian, OpenRouter Jev, TypeSafe, or a compatible endpoint) for model-based judgment
- An Agent client such as Codex or Claude Code configured to use HiRoute
Steps
- Run
curl -fsSL https://hiroute.ai/install.sh | shto install the current-user CLI and daemon on Linux without sudo. - Run
hiroute service start --output jsonto start the local service, then runhiroute system status --output jsonto confirm it is running. - Connect your Codex or Claude Code subscription, API key, or compatible custom API in Hi Route.
- Open Models, then Decision models, and connect Bailian, OpenRouter Jev, TypeSafe, or a compatible endpoint.
- Create and publish a routing plan using difficulty routing, then connect your Agent client to it.
- Open the sessions view and check the task category, actual model group, and cost for a few turns.
Prompt for your agent
Using the HiRoute repo at https://github.com/higress-group/HiRoute, set up difficulty routing for <target agent client> so routine turns use the regular model group and hard turns use the primary group. Report the published routing plan name and the model group chosen for the last three turns in a session. Verify that the sessions view shows the actual model that ran and its cost.
Caveat. Routing quality depends on the decision model connection you choose, and cache reuse depends on the provider, so savings are not guaranteed.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page