From ab90b547d8074b2ca9974f5ca6dbf9aed73f86f7 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 28 Dec 2023 13:07:44 +0530 Subject: [PATCH] (fix) proxy - raise error when user missing litellm[proxy] --- litellm/proxy/proxy_cli.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/proxy_cli.py b/litellm/proxy/proxy_cli.py index 4b977fa78..35c57b51b 100644 --- a/litellm/proxy/proxy_cli.py +++ b/litellm/proxy/proxy_cli.py @@ -205,7 +205,12 @@ def run_server( try: from .proxy_server import app, save_worker_config, usage_telemetry except ImportError as e: - from proxy_server import app, save_worker_config, usage_telemetry + if "litellm[proxy]" in str(e): + # user is missing a proxy dependency, ask them to pip install litellm[proxy] + raise e + else: + # this is just a local/relative import error, user git cloned litellm + from proxy_server import app, save_worker_config, usage_telemetry feature_telemetry = usage_telemetry if logs is not None: if logs == 0: # default to 1