Skip to content

ypollak2/llm-router

v1.9.0 Feature

This release adds 2 notable features for engineering teams evaluating rollout.

Published 1mo LLM Frameworks
✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

ai-routing anthropic claude claude-code cost-optimization gemini
+7 more
litellm llm llm-router mcp-server model-router ollama openai

Affected surfaces

breaking_upgrade

Summary

AI summary

Added a PreToolUse enforcement hook and session-level agent selection tool.

Full changelog

What's new

Routing enforcement (enforce-route.py)

A new PreToolUse hook that makes ⚡ MANDATORY ROUTE directives actually stick.

When auto-route.py issues a routing directive, it now writes a session-scoped state file. The new enforce-route.py hook fires before every tool call:

  • llm_* tool called → routing honored, state cleared ✅
  • Read / Glob / Grep / LS → context-gathering, always allowed ✅
  • Write / Edit / Bash before routing → enforced:
    • soft (default): log violation to ~/.llm-router/enforcement.log, allow the call
    • hard: block with remediation message
    • off: disable enforcement
export LLM_ROUTER_ENFORCE=hard  # enable hard enforcement

Addresses Issue #2.

llm_select_agent — session-level routing for agent orchestrators

New MCP tool for systems like claw-biz that need to pick an agent CLI before starting a session:

llm_select_agent(prompt="...", profile="balanced")
→ { "primary": "codex", "primary_model": "gpt-4o-mini", ... }

Decision tree:

| Profile + Complexity | Agent | Model |
|---|---|---|
| budget + simple/moderate | codex | gpt-4o-mini |
| budget + complex | codex | gpt-4o |
| balanced + simple | codex | gpt-4o-mini |
| balanced + moderate | claude_code | sonnet |
| balanced + complex | claude_code | opus |
| premium + any | claude_code | opus |
| research (any) | claude_code | sonnet |

Addresses Issue #3.

Issue #1 already fixed

CC-MODE /model slash commands were silently ignored → fixed in v1.8.4. Upgrade resolves it:

pip install --upgrade claude-code-llm-router

Upgrade

pip install --upgrade claude-code-llm-router
llm-router install  # deploys enforce-route.py hook

Full changelog: CHANGELOG.md

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track ypollak2/llm-router

Get notified when new releases ship.

Sign up free

About ypollak2/llm-router

Subscription-aware LLM router for Claude Code. Routes tasks to 20+ providers (OpenAI, Gemini, Groq, Ollama, Codex) based on complexity classification, Claude subscription pressure, and cost. Free tasks stay on Claude subscription; expensive tasks fall back to the cheapest capable model. Includes 30 MCP tools, 6 auto-routing hooks, semantic dedup cache, prompt caching, daily spend cap, and a live web dashboard.

All releases →

Related context

Earlier breaking changes

  • v9.2.0 Changes auto‑route directive from advisory "DO NOT SKIP" to hard constraint with explicit blocked tools list.
  • v9.2.0 Breaks permanent downgrade of enforcement after first Edit/Write; v13 now requires per‑turn routing.

Beta — feedback welcome: [email protected]