From 311957b615dcfe68a38b88a224278e4d57664b11 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Thu, 1 Feb 2024 14:54:57 -0800 Subject: [PATCH] (test) proxy_custom_auth --- litellm/tests/test_configs/custom_auth.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/tests/test_configs/custom_auth.py b/litellm/tests/test_configs/custom_auth.py index 1b6bec43b5e..2939aa9f95f 100644 --- a/litellm/tests/test_configs/custom_auth.py +++ b/litellm/tests/test_configs/custom_auth.py @@ -8,8 +8,10 @@ load_dotenv() async def user_api_key_auth(request: Request, api_key: str) -> UserAPIKeyAuth: try: + from litellm.proxy.proxy_server import MISSING_BEARER + print(f"api_key: {api_key}") - if api_key == "": + if api_key == MISSING_BEARER: raise Exception( f"CustomAuth - Malformed API Key passed in. Ensure Key has `Bearer` prefix" )