Skip to content

ypollak2/llm-router

v4.0.0 Feature

This release adds 3 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

Summary

AI summary

Tool Slim Mode reduces context token usage by selecting a subset of tools at startup.

Full changelog

What's new in v4.0.0

Tool Slim Mode (LLM_ROUTER_SLIM)

Register only 12 or 4 tools at startup instead of all 43 — saves 5,000–8,000 context tokens per session. Gating happens at registration time, so unused tools never appear in Claude's tool list.

export LLM_ROUTER_SLIM=routing   # 12 tools — recommended
export LLM_ROUTER_SLIM=core      # 4 tools — maximum savings

Real-time Session Spend Meter (llm_session_spend)

Tracks API spend in a flat JSON file updated after every call — no Python needed in hook scripts. Anomaly detection fires when spend exceeds LLM_ROUTER_ANOMALY_THRESHOLD ($0.50 default) in under 10 minutes.

Correction Learning (llm_reroute)

Route corrections are stored in SQLite; llm_route explain mode automatically lowers confidence (−15% per correction), closing the feedback loop without manual tuning.

Quickstart Wizard (llm-router quickstart)

5-step interactive setup: detect hosts → configure API keys → install MCP config → test first call → show savings projection.

Cost-threshold Escalation (LLM_ROUTER_ESCALATE_ABOVE)

Block calls estimated above a per-call USD threshold before the model loop starts. Use llm_approve_route to approve/reject pending decisions.

Context Analyzer (llm_fs_analyze_context)

Reads up to 20 key project files, routes summarization to a cheap model, and persists a context summary for offline use.

Doctor Host Checks (llm-router doctor --host)

Check host-specific MCP config, hook installation, and connectivity:

llm-router doctor --host claude
llm-router doctor --host vscode
llm-router doctor --host all

Upgrade

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

VS Code extension (backlogged to v4.1)

The VS Code/Cursor status bar extension was assessed as highest-risk and moved to the v4.1 backlog.

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]