From a0578a29f180c21067e3ff498d8290e6fcbcaee8 Mon Sep 17 00:00:00 2001 From: Ryan Crabbe Date: Wed, 25 Feb 2026 17:45:13 -0800 Subject: [PATCH] fix: dup assignment, os.environ setting --- litellm/proxy/proxy_cli.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/litellm/proxy/proxy_cli.py b/litellm/proxy/proxy_cli.py index 480f00c3562..f5163114983 100644 --- a/litellm/proxy/proxy_cli.py +++ b/litellm/proxy/proxy_cli.py @@ -344,20 +344,16 @@ class ProxyInitializationHelpers: ) auto_created = not multiproc_dir - if not multiproc_dir: multiproc_dir = os.path.join( tempfile.gettempdir(), "litellm_prometheus_multiproc" ) - multiproc_dir = os.path.join( - tempfile.gettempdir(), "litellm_prometheus_multiproc" - ) + os.environ["PROMETHEUS_MULTIPROC_DIR"] = multiproc_dir + os.makedirs(multiproc_dir, exist_ok=True) wipe_directory(multiproc_dir) - action = "Auto-created" if auto_created else "Use existing" - print( # noqa - f"LiteLLM {action}: Auto-created PROMETHEUS_MULTIPROC_DIR={multiproc_dir}" - ) + action = "Auto-created" if auto_created else "Using existing" + print(f"LiteLLM: {action} PROMETHEUS_MULTIPROC_DIR={multiproc_dir}") # noqa @click.command()