litellm/tests/test_litellm/router_strategy
Tin Chi Lo fa444265e0
Some checks failed
LiteLLM Rust / rustfmt, clippy, test (push) Has been cancelled
feat(cache_warming): warm only the models a session has been served on
Warming resolved its target set from configuration, so every active session was
replayed against a representative of every tier on every interval whether or not it
had ever been routed there. Most sessions never leave their starting tier, so that
spent N replays per interval to keep caches warm that nobody would read, and for a
pooled tier it warmed the wrong member entirely.

The set is now per session and comes from what the session actually did. Capture
records each served model into a per-session Redis set inside the same atomic script
that writes the record, sharing the session's hash tag, so the touched set cannot
disagree with the record it belongs to and expires with it. The refresher replays
exactly that set.

This is the intended shape of the feature: keep a session's own caches alive so
returning to a tier it has already used is a read, rather than pre-warming tiers on
speculation. The first switch to a new tier is a normal cache write, and every visit
after it is warm. warm_models changes meaning accordingly, from a pre-warm list to
an allowlist that narrows what a session may be warmed on, and resolve_warm_models
now returns every model across the tier pools since it bounds eligibility rather
than naming the targets.

Tests that expected a replay on a tier the seeded session had never visited now
declare a session that has been to both, which is the case the feature serves.
2026-07-30 11:03:48 -07:00
..
adaptive_router fix(router): tag-aware pre-routing strategy selection for shared model_name (#33691) 2026-07-17 09:26:07 -07:00
complexity_router feat(cache_warming): warm only the models a session has been served on 2026-07-30 11:03:48 -07:00
test_auto_router.py Litellm krrish staging 04 20 2026 (#26138) 2026-04-20 16:22:12 -07:00
test_base_routing_strategy.py [Fix] Fix test failures and Docker build from pinned dependency upgrade 2026-04-01 09:43:33 -07:00
test_budget_limiter_hotpath.py fix(router): enforce deployment budgets for dynamically added models (#29273) 2026-05-29 19:43:14 -07:00
test_complexity_router.py feat(cache_warming): warm only the models a session has been served on 2026-07-30 11:03:48 -07:00
test_lar1_routing.py chore: litellm oss staging (#31185) 2026-06-26 09:17:44 -07:00
test_lowest_latency.py test(router_strategy): cover chat-path normalization branches in both handlers 2026-07-23 08:36:48 +10:00
test_quality_router.py Litellm krrish staging 04 20 2026 (#26138) 2026-04-20 16:22:12 -07:00
test_router_routing_groups.py fix(router): honor per-request routing_strategy from key/team router_settings (#33429) 2026-07-16 13:36:03 -07:00
test_router_routing_plugins.py feat(router): resolve auto-router routing plugins from proxy YAML config (#33251) 2026-07-14 21:27:14 -07:00
test_router_tag_regex_routing.py Litellm ishaan march30 (#24887) (#25151) 2026-04-04 14:44:07 -07:00
test_router_tag_routing.py fix(router): apply team/key enable_tag_filtering to tag routing (#33436) 2026-07-16 14:41:24 -07:00