v0.3.0
Release v0.3.0
Date: 2026-09-04
Summary
Any OpenAI-compatible endpoint as a provider, cache invalidation and key versioning shipped ahead of v1.0, plus safer routing defaults and community infrastructure.
Highlights
openai_compatibleprovider — one parameterizedbase_urlcovers OpenRouter, vLLM, llama.cpp server, LiteLLM proxy and any self-hosted inference speaking the OpenAI Chat Completions protocol.api_keyis optional for keyless local servers.- Cache invalidation —
LLMRouter.invalidate_cache(model=...)(andinvalidate(model=...)on every backend) drops cached entries per model or entirely, returning the number of removed entries. Available on memory, Redis and Qdrant backends. - Key versioning — new
CacheConfig.key_version: bump it when deploying a new system prompt and stale entries become invisible immediately, aging out via TTL — no flush needed. exact_matchmode — newCacheConfig.exact_match=Truereturns cache hits only for byte-identical queries (semantic search disabled) for correctness-sensitive workloads.- Safer
CHEAPEST_FIRST— models with unknown pricing are now treated as infinitely expensive instead of free, so self-hosted models no longer win routing by default. - OpenAI provider fixes — no more
Authorization: Bearer Noneheader whenapi_keyis unset;base_urltrailing slashes are normalized. - Community infrastructure — CONTRIBUTING.md, bug report / feature request issue templates, PR template, GitHub Discussions enabled.
- Repo hygiene — committed
llm_cache_router.egg-info/build artifact and.cursor/scratchpad removed;uv.lockexcluded from sdist. - README — new «Cache Invalidation, Versioning & Exact Match» section with threshold false-positive guidance, OpenAI-compatible provider docs, roadmap reordered (OpenTelemetry before Django helpers).
Upgrade notes
CHEAPEST_FIRSTbehavior change: if you relied on an unpriced model (e.g. self-hosted viaopenai_compatible) being selected as cheapest, pin its pricing viaPricingManager(pricing_override={...})— unknown pricing now loses to any known-priced option.provider_usedlabel: OpenAI-family responses now use the configured provider name (previously hardcoded to"openai"). Same value for standard setups.- Test suite grew from 40 to 82 tests; no public API removals.
Install
pip install llm-cache-router==0.3.0