Skip to content

ypollak2/llm-router

v5.6.0 Breaking

This release includes 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

Summary

AI summary

Eliminates deadlock in enforce-route hook by adding a six‑point prevention system.

Full changelog

🔒 Stuck Pattern Prevention System

Version 5.6.0 eliminates the deadlock scenario where Claude gets trapped investigating routing enforcement. This release implements a comprehensive 6-point prevention system in the enforce-route hook.

What's Fixed

The Problem: In v5.5.1, when routing enforcement was triggered:

  • Claude would attempt to investigate (read hooks, grep config)
  • The enforce-route hook would block investigation tools
  • No escape path existed → session deadlock

The Solution: 6-point prevention system prevents this entirely:

  1. Early file-op detection — Marks session as 'coding' on first Read/Glob/Grep/LS, allowing investigation without violations
  2. Violation counter — After 2 violations, auto-downgrades enforcement to soft mode (escape path)
  3. Auto-pivot mechanism — Automatically switches from hard to soft enforcement to prevent infinite loops
  4. Loop detection — Detects 3+ same-tool calls in 120s and warns explicitly
  5. State visibility — Enforcement messages show routing window countdown
  6. Mandatory escalation — Clear messaging (🔴 Violation 2+, ⏰ ROUTING WINDOW CLOSING)

Migration

pip install --upgrade claude-code-llm-router
llm-router install  # Redeploy updated enforce-route hook

Technical Details

  • Hook progression: v9 (baseline) → v10 (HIGH priority fixes) → v11 (MEDIUM) → v12 (LOW)
  • No breaking changes; all existing routing behavior preserved
  • Backwards compatible: existing .env and config files work unchanged
  • All 940+ tests passing with new prevention system
  • Zero false positives: investigation instinct is explicitly allowed

What's New

Enforce-Route Hook v12 includes:

  • _violation_counter_path() — Persistent violation tracking
  • _detect_investigation_loop() — Pattern detection in tool history
  • Early file-operation detection (line ~310)
  • Auto-pivot logic (line ~330)
  • Enhanced error messages with escalation warnings

See CHANGELOG.md for detailed feature list.


This release makes llm-router production-safe. Nobody will get stuck. Multiple escape mechanisms ensure smooth recovery from any routing scenario.

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]