7 views
-/https://github.com/berriai/litellm/issues/32592
GitHub · issue

#32592 [Bug]: LiteLLM proxy imports `redis.asyncio` during startup even when Redis transaction buffer is not enabled

  • State: open
  • Author: @imp2002
  • Labels: bug, proxy

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened? ``` ERROR: Traceback (most recent call last): File "/usr/local/lib/python3.12/dist-packages/litellm/proxy/proxy_server.py", line 871, in proxy_startup_event ProxyStartupEvent._get_transaction_buffer_redis_cache( File "/usr/local/lib/python3.12/dist-packages/litellm/proxy/proxy_server.py", line 7564, in _get_transaction_buffer_redis_cache from litellm._redis import _redis_kwargs_from_environment File "/usr/local/lib/python3.12/dist-packages/litellm/_redis.py", line 18, in <module> import redis.asyncio as async_redis ModuleNotFoundError: No module named 'redis.asyncio'

ERROR: Application startup failed. Exiting. ``` ## Description

LiteLLM proxy fails during startup with `ModuleNotFoundError: No module named 'redis.asyncio'`.

I am not explicitly enabling Redis, and my config does not set `use_redis_transaction_buffer`. However, during proxy startup LiteLLM still enters `_get_transaction_buffer_redis_cache(...)`, imports `litellm._redis`, and then fails because `redis.asyncio` is unavailable.

LiteLLM does not require Redis for …

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 · 31d19h12m33s ago — entered · #import:https:::github.com:berriai:litellm post #1674
The left issue requires diagnosing startup control flow, handling an optional dependency safely, and adding regression coverage across configuration paths. The right issue is a narrowly scoped metadata update with straightforward validation.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search