This release includes 1 breaking change for platform teams planning a safe upgrade.
✓ No known CVEs patched in this version
Topics
+7 more
ReleasePort's take
Light signalThe release introduces several bugfixes and enhancements to usage tracking, adds new documentation and sponsorship features, and expands the test suite.
Why it matters: Bugfixes ensure accurate savings logging across routing calls and UI displays; deprecation of orphan `llm_usage.db` clarifies data storage. README updates improve discoverability; +24 tests raise overall code confidence to 1977 passing checks.
Summary
AI summaryUpdates Migration, Tests, and README across a mixed release.
Changes in this release
| Type | Severity | Summary | CVE |
|---|---|---|---|
| Feature | Low |
README now hoists install CTA above the fold with tagline and collapsible Table of Contents covering 17 sections. README now hoists install CTA above the fold with tagline and collapsible Table of Contents covering 17 sections. Source: llm_adapter@2026-05-31 Confidence: high |
— |
| Feature | Low |
`.github/FUNDING.yml` added to display GitHub sponsor button for `ypollak2`. `.github/FUNDING.yml` added to display GitHub sponsor button for `ypollak2`. Source: llm_adapter@2026-05-31 Confidence: high |
— |
| Deprecation | Low |
Orphan `~/.llm-router/llm_usage.db` file is deprecated and can be safely deleted. Orphan `~/.llm-router/llm_usage.db` file is deprecated and can be safely deleted. Source: llm_adapter@2026-05-31 Confidence: high |
— |
| Bugfix | Medium |
`cc-usage-track.py` redirects writes from orphan `llm_usage.db` to canonical `usage.db`. `cc-usage-track.py` redirects writes from orphan `llm_usage.db` to canonical `usage.db`. Source: llm_adapter@2026-05-31 Confidence: high |
— |
| Bugfix | Medium |
Claude Code statusline shows live savings instead of always displaying `$0.00`. Claude Code statusline shows live savings instead of always displaying `$0.00`. Source: llm_adapter@2026-05-31 Confidence: high |
— |
| Bugfix | Medium |
DIRECT routing savings now persist live via new llm_router.hooks.savings_logger module. DIRECT routing savings now persist live via new llm_router.hooks.savings_logger module. Source: llm_adapter@2026-05-31 Confidence: low |
— |
| Bugfix | Medium |
`usage` table now records baseline_model, potential_cost_usd, and saved_usd columns on each routed call. `usage` table now records baseline_model, potential_cost_usd, and saved_usd columns on each routed call. Source: llm_adapter@2026-05-31 Confidence: low |
— |
| Refactor | Low |
+24 new tests added across multiple test modules; full suite passes 1977 tests. +24 new tests added across multiple test modules; full suite passes 1977 tests. Source: llm_adapter@2026-05-31 Confidence: high |
— |
Full changelog
Fixed
- DIRECT routing savings now persist live —
auto-route.pywas answering prompts viadirect_executor(Ollama / Gemini / OpenAI) without writing any record.session-end.py's_sync_import_savings_log()had nothing to flush, so any session that relied entirely on DIRECT routing showed$0.00 savedin the dashboard. Newllm_router.hooks.savings_loggermodule appends one JSONL record per successful DIRECT execution;auto-route.pycalls it fire-and-forget afterDIRECT SUCCESS. usagetable now recordsbaseline_model/potential_cost_usd/saved_usd— these columns existed since v9.2.2 butlog_usage's INSERT never populated them. Every routed call appeared to save nothing. The savings math (_claude_cost,_get_baseline_for_task) was already incost.py— this release wires it into the write path with the cache-aware 4-component formula.cc-usage-track.pyredirected from orphanllm_usage.dbto canonicalusage.db— this hook was the only remaining writer of a stub DB that nothing else read. Every Agent subagent call landed in the orphan, invisible to the dashboard. Now writes to the full schema with baseline + savings columns populated. Baseline picker: Explore / general-purpose → Haiku, everything else → Sonnet.- Claude Code statusline shows live savings instead of
$0.00—statusline-command.shonly read theusagetable with a hardcoded Opus baseline, so sessions driven by DIRECT routing showed nothing (DIRECT writes land insavings_log.jsonland don't reachusageuntil session END). Now prefers the newsaved_usdcolumn when populated, falls back to the legacy Opus math for upgrader rows, and adds today's un-flushedsavings_log.jsonlrecords to the live total.
Added
- README: install CTA hoisted above the fold (
pip install llm-routingblock + "Works with Claude Code, Codex, Gemini CLI — no API keys required on Claude Pro/Max" tagline), collapsible Table of Contents covering 17 sections, Star History chart, Activity section embedding the Repobeats weekly contribution heatmap, GitHub Discussions badge in the header and footer. .github/FUNDING.ymlso the GitHub sponsor button shows on the repo page (sponsor:ypollak2).
Migration
-
Users with an existing
~/.llm-router/llm_usage.dbfile can safely delete it manually — nothing reads or writes to it anymore:rm ~/.llm-router/llm_usage.db -
Historical
usagetable rows keeppotential_cost_usd = saved_usd = 0.0(no retroactive backfill). Only INSERTs after upgrading benefit from the new accurate baseline math.
Tests
- +24 tests across
tests/test_savings_logger.py,tests/test_cost.py,tests/test_cc_usage_track.py,tests/test_statusline_savings.py. - Full suite: 1977 passed, 0 failed.
Breaking Changes
- Removal of orphan `llm_usage.db` file; users should delete `~/.llm-router/llm_usage.db` manually.
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
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.
Related context
Related tools
Beta — feedback welcome: [email protected]