From e2d640bf68648df35747fccf1c585d55808dbac7 Mon Sep 17 00:00:00 2001 From: gvisco Date: Tue, 2 Jun 2026 20:13:26 +0200 Subject: [PATCH] docs(proxy): add docstring to _get_loop_type documenting LITELLM_DISABLE_UVLOOP --- litellm/proxy/proxy_cli.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/litellm/proxy/proxy_cli.py b/litellm/proxy/proxy_cli.py index 38e177eaf00..b7afcc0d905 100644 --- a/litellm/proxy/proxy_cli.py +++ b/litellm/proxy/proxy_cli.py @@ -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 (