docs(proxy): add docstring to _get_loop_type documenting LITELLM_DISABLE_UVLOOP

This commit is contained in:
gvisco 2026-06-02 20:13:26 +02:00
parent 4959351848
commit e2d640bf68

View file

@ -479,6 +479,12 @@ class ProxyInitializationHelpers:
@staticmethod
def _get_loop_type():
"""Return the uvicorn event-loop type for the current platform.
Returns ``None`` on Windows (uvicorn default), ``"asyncio"`` when
``LITELLM_DISABLE_UVLOOP`` is set to ``1``, ``true``, or ``yes``, and
``"uvloop"`` otherwise.
"""
if sys.platform in ("win32", "cygwin", "cli"):
return None
if os.environ.get("LITELLM_DISABLE_UVLOOP", "").strip().lower() in (