From b06ebb886c9819c16d8116dbfd6ff9d6267fb174 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Tue, 16 Jan 2024 19:53:43 -0800 Subject: [PATCH] (ci/cd) undo change from PR 1464 --- litellm/proxy/proxy_server.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 1d0245c51ce..b383317b3b6 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -1331,11 +1331,7 @@ async def startup_event(): verbose_proxy_logger.debug(f"custom_db_client connecting - {custom_db_client}") await custom_db_client.connect() - if prisma_client is not None: - if master_key is None: - raise ValueError( - "Using Proxy Auth, but Master Key not set, please set `LITELLM_MASTER_KEY` in your environment or `master_key` in your config.yaml" - ) + if prisma_client is not None and master_key is not None: # add master key to db await generate_key_helper_fn( duration=None, models=[], aliases={}, config={}, spend=0, token=master_key @@ -1343,11 +1339,7 @@ async def startup_event(): verbose_proxy_logger.debug( f"custom_db_client client - Inserting master key {custom_db_client}. Master_key: {master_key}" ) - if custom_db_client is not None: - if master_key is None: - raise ValueError( - "Using Proxy Auth, but Master Key not set, please set `LITELLM_MASTER_KEY` in your environment or `master_key` in your config.yaml" - ) + if custom_db_client is not None and master_key is not None: # add master key to db await generate_key_helper_fn( duration=None, models=[], aliases={}, config={}, spend=0, token=master_key