diff --git a/litellm/proxy/proxy_cli.py b/litellm/proxy/proxy_cli.py index 2bc1c8f8e98..6b781f74f0b 100644 --- a/litellm/proxy/proxy_cli.py +++ b/litellm/proxy/proxy_cli.py @@ -307,7 +307,12 @@ class ProxyInitializationHelpers: """Helper function to determine the event loop type based on platform""" if sys.platform in ("win32", "cygwin", "cli"): return None # Let uvicorn choose the default loop on Windows - return "uvloop" + try: + import uvloop # noqa: F401 + + return "uvloop" + except ImportError: + return None # Fall back to default asyncio loop (e.g. Python 3.14 where uvloop is unavailable) @click.command()