Skip to content

ypollak2/llm-router

v6.3.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

Summary

AI summary

Token-Savior response compression enables up to 75% reduction in LLM output tokens via a 4‑stage pipeline.

Full changelog

Three-Layer Token Compression Pipeline

v6.3.0 completes Phase 2 and Phase 3: RTK input compression, Token-Savior response compression, and unified dashboard integration.

What's New

Layer 1: RTK Command Output Compression ✅

  • Already implemented in Phase 1
  • 60–90% reduction on shell command outputs (git, pytest, cargo, docker, npm, etc.)
  • Smart filters remove noise, duplicates, and verbose output
  • Integrated into auto-route hook

Layer 2: Model Routing ✅

  • Existing intelligent model selection
  • 70–90% cost reduction via complexity-aware routing
  • Budget pressure handling + fallback chains

Layer 3: Token-Savior Response Compression ✨ NEW

  • 4-stage compression pipeline for LLM responses
    1. Filler Removal (5–10%) — Removes 'I think', 'basically', 'actually', redundant articles
    2. Example Consolidation (15–20%) — Keeps first example, tags rest as [Additional examples omitted]
    3. Boilerplate Collapse (20–30%) — Converts prose scaffolding to bullet points
    4. Semantic Extraction (10–20%) — TF-IDF scoring to preserve key information
  • Total: 60–75% reduction without losing critical details
  • Optional: Off by default, enable via LLM_ROUTER_COMPRESS_RESPONSE=true
  • Graceful: Never blocks or crashes—falls back to original on any error
  • Non-blocking: Asynchronous telemetry logging, zero latency impact

Dashboard Integration ✅

llm_gain now shows all three compression layers:

  • Layer 1: Commands processed, tokens compressed, savings percentage
  • Layer 3: Responses compressed, tokens saved, efficiency metrics
  • Combined display showing total savings across all layers
  • Per-layer breakdown for analysis

Performance

Combined Efficiency: 97x cost reduction vs Opus baseline

  • Layer 1: 80–90% input tokens saved
  • Layer 2: 70–90% model cost reduced
  • Layer 3: 60–75% output tokens saved
  • Theoretical maximum: 99% | Practical: 97x

Configuration

# Enable Token-Savior response compression
export LLM_ROUTER_COMPRESS_RESPONSE=true

# Optional: set target compression ratio (0.0–1.0, default 0.6)
export LLM_ROUTER_COMPRESS_TARGET=0.6

Files Changed

  • src/llm_router/compression/response_compressor.py — New: 4-stage compression pipeline
  • src/llm_router/tools/text.py — Integration point in response formatting
  • src/llm_router/cost.py — Compression telemetry tracking
  • src/llm_router/commands/gain.py — Dashboard display
  • README.md — New documentation for compression features
  • CHANGELOG.md — Detailed v6.3.0 entry
  • ✅ Version bumps (pyproject.toml, plugin.json, marketplace.json)

Testing

  • ✅ 33 comprehensive compression tests (all passing)
  • ✅ 9 integration tests for Phase 3 dashboard (all passing)
  • ✅ 1033 total tests passing
  • ✅ All ruff linting checks pass
  • ✅ Backward compatible—compression off by default

Quality Assurance

  • Non-blocking architecture—compression errors never interrupt user flow
  • Asynchronous telemetry—zero latency impact on responses
  • Graceful degradation—malformed input never crashes the compression pipeline
  • Optional by design—users can disable if needed
  • Fully measurable—all compression metrics persisted to SQLite

Installation

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

Documentation

  • README.md — New "New in v6.3" section with feature overview
  • CHANGELOG.md — Comprehensive technical breakdown
  • Project instructions (CLAUDE.md) — Compression architecture & configuration

Thanks

Built with the three-layer compression vision from INTEGRATION_PLAN.md. This release completes Phase 2 and Phase 3 of the token optimization roadmap.

Next: v6.2 "Quality" — Quality Guard, benchmarks, and degradation alerts (planned for July 2026)

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]