litellm/tests/unit/redis
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
..
stores feat(redis): serve the dynamic rate limiter's active teams from a native store (#52995) 2026-11-20 10:58:19 +09:00
__init__.py feat(redis): extend the native Redis foundation for the store families (#50169) 2026-11-06 12:30:07 +09:00