gargpratyush/jev-router

Route to the cheapest model in claude code for your task using jev-router

What it solves

Jev Router provides automatic model routing for the Claude Code and OpenAI Codex CLIs. It prevents the need to manually switch models for every task by automatically sending simple requests to faster, cheaper models and complex requests to more powerful, "strong" models, all while maintaining the native interface, authentication, and tool integration of the original CLIs.

How it works

The tool operates as a loopback proxy. When a user launches jev-claude or jev-codex, the proxy intercepts the CLI's requests to the AI provider. For each new user turn, it calls the Jev service to determine the appropriate model tier (Fast, Balanced, Strong, or Long) based on the prompt's complexity and requirements. It then forwards the request to the actual AI provider using the existing authorization headers from the CLI.

Who it’s for

Developers using Claude Code or OpenAI Codex who want to optimize the balance between speed and intelligence (and potentially cost) without leaving their terminal-based AI coding assistants.

Highlights

  • Native Integration: Preserves all original CLI keybindings, tools, permissions, and session handling.
  • Coded Routing Policy: Includes logic to handle explicit user requests (e.g., "use opus"), prevent unnecessary downgrades in large conversations, and ensure fail-open behavior so that Jev failures do not block the CLI.
  • Transparency: Provides a status line in Claude Code and commentary in Codex to show which model was used, along with a /jev-explain skill to detail the factors behind the routing decision.
  • Zero-Config Auth: Uses the existing claude login or codex login sessions, requiring no separate API keys for the AI providers themselves.

Related

  • Project
  • Project
  • Project
  • Project