Skip to content

ypollak2/llm-router

v2.0.1 Breaking

This release includes 2 breaking changes for platform teams planning a safe upgrade.

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

rbac

Summary

AI summary

Routing enforcement now defaults to hard, making missed routed turns visible on the next prompt.

Full changelog

Changed

  • Release metadata now matches the shipped hook changes (pyproject.toml, uv.lock)

    The package version is now 2.0.1, so the existing tag-based publish workflow can cut a real release for the Claude Code enforcement changes already merged on main.

  • Routing enforcement now defaults to hard in Claude Code hooks (src/llm_router/hooks/enforce-route.py)

    LLM_ROUTER_ENFORCE now defaults to hard instead of soft. When auto-route.py issues a ⚡ MANDATORY ROUTE directive and Claude tries to jump straight to Bash, Write, Edit, or MultiEdit, the PreToolUse hook blocks that work by default instead of merely logging it.

  • Missed routed turns are now surfaced on the next prompt (src/llm_router/hooks/auto-route.py)

    Claude Code still has no hook that fires immediately before a plain text response, so same-turn self-answering cannot be blocked directly. To make those misses visible, auto-route.py now detects a leftover pending_route_{session_id}.json from the prior turn, logs it as NO_ROUTE in ~/.llm-router/enforcement.log, clears the stale state, and injects a warning into the next ⚡ MANDATORY ROUTE context.

  • Installer and README now document hard-by-default behavior (src/llm_router/tools/setup.py, README.md)

    Post-install messaging now tells users that routed work is blocked by default unless they explicitly set LLM_ROUTER_ENFORCE=soft or off.

  • Demo outputs now default to an ignored folder and repo noise was removed (demo/app_builder_demo.py, demo/saas_builder_demo.py, .gitignore)

    The demo scripts now write reports to demo/output/ by default, and the repo no longer tracks generated demo reports, Finder metadata, or stray root-level screenshots.

Added

  • Hook regression tests for enforcement behavior (tests/test_route_enforcement_hooks.py)

    Covers:

    • hard-default blocking of work tools
    • soft-mode override still logging violations
    • carry-over logging for unrouted previous turns

Breaking Changes

  • LLM_ROUTER_ENFORCE default changed from `soft` to `hard`, blocking unauthorized tool usage by default
  • `pending_route_{session_id}.json` stale state now logged as `NO_ROUTE` and cleared, with a warning injected into the next prompt

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]