tiershift
Policy-driven router that sends each LLM request to the cheapest capable model tier, escalating when Jev finds a reason.
Overview
tiershift is a model-routing library and proxy for TypeScript and Python. Every request starts on a fast, cheap tier and moves up only when Jev reports evidence such as multi-step reasoning, hard difficulty, high stakes or safety concerns. Policy is written in plain YAML, and each route prints the reason behind it; tiershift explain shows every signal behind the last decision.
It is for teams paying flagship prices on prompts that do not need them. The README reports a 120-prompt benchmark where the default policy matched the flagship's blind-judged quality at about 40 percent lower cost, with routing at a median of 180 ms and $0.04 per 1,000 routes. It is honest that the benchmark covers single-turn prompts only. You can use it as a library, or run tiershift serve as an OpenAI-style proxy and set model to "auto" with no code change.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Score | Does this request need multi-step reasoning? | — |
| Score | How high are the stakes of this request? | — |
| Choice | How difficult is this request?(inferred) | — |
How it works
- A request arrives via the library or the local proxy.
- Jev scores signals such as reasoning need, difficulty, stakes and safety.
- YAML policy rules map signals to a minimum tier (fast, mid, flagship).
- The chosen model is called; on failure it falls back one tier up.
Strengths
- The README reports flagship-level quality at about 40 percent lower cost on its benchmark.
- Routing adds a median 180 ms and about $0.04 per 1,000 prompts, per the README.
- No training data needed; policy is plain YAML.
- Each decision prints its reason for auditing.
Caveats
- Benchmark covers single-turn prompts, not long agentic tasks.
- Depends on the hosted Jev API for routing decisions.
Getting started
npm install tiershift or pip install tiershift; or run `tiershift serve` and set model to "auto".At a glance
- Type
- Project
- Status
- beta
- Language
- TypeScript, Python
- Runtime
- Node, Python, local HTTP proxy
- Has code
- yes
- Has tests
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
Policy-driven model routing framework routing every LLM call to the cheapest capable tier in ~180 ms via TypeSafe Jev.
logicrw/awesome-jev-projectsPolicy-bounded model routing for TypeScript and Python.
cobanov/awesome-jevShift every LLM call to the cheapest model that can handle it. Routing decided by TypeSafe Jev in ~180 ms. No training data. Policy in plain YAML. TypeScript and Python.
hellogumbo/awesome-jevSends each LLM request to the cheapest model tier that can handle it and escalates on evidence.
MrJev/awesome-jev
Frequently asked questions
What does tiershift decide?
Which model tier each LLM request should go to, based on Jev's read of reasoning need, difficulty, stakes and safety.
Do I need to change my code?
Not necessarily; the proxy mode lets any OpenAI-compatible client set model to "auto".
What does routing cost?
The README reports about $0.04 per 1,000 routes and a median of 180 ms.
Related projects
LangGraph decorator that lets Jev take routing decisions it is confident about and falls back to your existing LLM router otherwise.
LibrarybetaPythonAlibaba's AgentScope 2.0 agent framework, which added a JevClassifierModel for binary, choice and score decisions via the TypeSafe SDK.
ProjectproductionPythonLocal-first routing engine for long-running agent tasks that uses a Jev decider to pick a model group per turn.
PluginproductionRust, TypeScriptOpen-source AI gateway for 100+ LLMs that can use Jev to classify requests for complexity routing and to compact tool results.
ProxyproductionPythonOpen-source workspace for running and reviewing AI coding agents across devices, with an optional Jev-based automatic model router.
ProjectproductionTypeScript- jev-router★ 593
Per-turn model routing for Claude Code and Codex: wraps the real CLI and lets Jev send simple turns to fast models and hard ones to strong.
ProxybetaJavaScript