litellm/tests/unit/redis/stores
yujonglee be7859a9c0
feat(redis): serve the dynamic rate limiter's active teams from a native store (#52995)
* feat(redis): serve the dynamic rate limiter's active teams from a native store

The registry of callers active on a model, which dynamic_rate_limiter_v3 splits a priority
class's share among, ran its own Lua through redis-py. It now goes through a redis-store
family like the limiter's counters, so the Rust gateway can use the same registry.

The store sends the script main sends, byte for byte, and keeps the memory fallback. A Redis
failure from the store is treated as the registry being unavailable, as a redis-py error was

* test(redis): cover a store outage with in-process doubles, not a refused socket

The unit suite runs without network access, so the two outage tests no longer bind a port and
dial it. A failing handle and a failing registry raise what the Rust store raises instead. The
real refused connection stays covered by the redis-store test against real Redis.

The store's error class is imported where it is checked, since the type gate cannot resolve the
extension module from source and counted an unrelated unknown type with the import at the top
2026-11-20 10:58:19 +09:00
..
__init__.py
auth_cache_double.py fix(proxy): keep a customer budget reset from being undone by a stale hierarchy cache entry (#51694) 2026-11-13 14:21:20 -08:00
fake_rate_limits.py fix(dynamic_rate_limiter_v3): read a model's saturation from Redis so every worker agrees on it (#51519) 2026-11-12 19:15:21 -08:00
router_session_pins_memory.py feat(redis): serve the router's session pins from a native store (#50870) 2026-11-13 03:22:28 +00:00
router_usage_double.py refactor(redis): delete the Python RedisBatch now that every request op is native (#51383) 2026-11-13 03:22:28 +00:00
spend_counters_double.py fix(proxy): show committed spend in the remaining budget gauges (#49199) 2026-11-09 20:05:37 +00:00
test_active_teams.py feat(redis): serve the dynamic rate limiter's active teams from a native store (#52995) 2026-11-20 10:58:19 +09:00
test_auth_cache.py refactor(redis): delete the Python RedisBatch now that every request op is native (#51383) 2026-11-13 03:22:28 +00:00
test_connection.py fix(redis): share one native circuit breaker between RedisCache and the Rust stores (#50473) 2026-11-07 17:50:06 +09:00
test_deployment_health.py feat(redis): serve the health checks' deployment states from a native store (#50357) 2026-11-13 03:22:28 +00:00
test_rate_limits.py refactor(redis): delete the Python RedisBatch now that every request op is native (#51383) 2026-11-13 03:22:28 +00:00
test_router_cooldowns.py refactor(redis): delete the Python RedisBatch now that every request op is native (#51383) 2026-11-13 03:22:28 +00:00
test_router_session_pins.py feat(redis): serve the router's session pins from a native store (#50870) 2026-11-13 03:22:28 +00:00
test_router_usage.py refactor(redis): delete the Python RedisBatch now that every request op is native (#51383) 2026-11-13 03:22:28 +00:00
test_spend_counters.py fix(proxy): enforce settled customer budgets across workers (#51568) 2026-11-13 07:33:24 -08:00