From 4c2f80e4170de72412df91ea0dd7090c6fcb9e2e Mon Sep 17 00:00:00 2001 From: Alexsander Hamir Date: Sat, 14 Feb 2026 12:04:18 -0800 Subject: [PATCH] fix(proxy): add missing return when Pyroscope profiling is disabled Without the return, _init_pyroscope would fall through into the try block and raise ValueError when PYROSCOPE_APP_NAME was not set, even when LITELLM_ENABLE_PYROSCOPE was false. This caused CI failures on Linux where pyroscope-io is installed. --- litellm/proxy/proxy_server.py | 1 + 1 file changed, 1 insertion(+) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index bc2d32f141d..318c64e4a05 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -5831,6 +5831,7 @@ class ProxyStartupEvent: verbose_proxy_logger.debug( "LiteLLM: Pyroscope profiling is disabled (set LITELLM_ENABLE_PYROSCOPE=true to enable)." ) + return try: import pyroscope