From d5ce02a670c85c2fdb7c051759a2d290ea280b68 Mon Sep 17 00:00:00 2001 From: ayaangazali Date: Sat, 29 Aug 2026 15:47:33 -0700 Subject: [PATCH] fix(proxy): bind --debug to LITELLM_DEBUG instead of the generic DEBUG DEBUG is one of the most reused environment variable names there is, so an unrelated value left in a shell turned on proxy debug logging, which can put request and response payloads into logs. Measured with click's CliRunner before and after: DEBUG=1 before debug=True after debug=False DEBUG=true before debug=True after debug=False DEBUG=release before startup error, after debug=False DEBUG=0 before debug=False after debug=False Anyone setting DEBUG on purpose now sets LITELLM_DEBUG. --detailed_debug still reads DETAILED_DEBUG, which is specific enough not to collide. --- litellm/proxy/proxy_cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/proxy_cli.py b/litellm/proxy/proxy_cli.py index 8ac63ba25c9..4a74307a695 100644 --- a/litellm/proxy/proxy_cli.py +++ b/litellm/proxy/proxy_cli.py @@ -698,7 +698,7 @@ class ProxyInitializationHelpers: is_flag=True, type=bool, help="To debug the input", - envvar="DEBUG", + envvar="LITELLM_DEBUG", ) @click.option( "--detailed_debug",