From 37fdb486d4e4a0278e38190e5f62ec0fc6b46abc Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Wed, 8 Oct 2025 19:06:19 -0700 Subject: [PATCH] refactor: comment out oauth error raising logic for now --- .../mcp_server/auth/user_api_key_auth_mcp.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/litellm/proxy/_experimental/mcp_server/auth/user_api_key_auth_mcp.py b/litellm/proxy/_experimental/mcp_server/auth/user_api_key_auth_mcp.py index 714f2c8746..20a632f167 100644 --- a/litellm/proxy/_experimental/mcp_server/auth/user_api_key_auth_mcp.py +++ b/litellm/proxy/_experimental/mcp_server/auth/user_api_key_auth_mcp.py @@ -114,16 +114,16 @@ class MCPRequestHandler: request.body = mock_body # type: ignore if ".well-known" in str(request.url): # public routes validated_user_api_key_auth = UserAPIKeyAuth() - elif litellm_api_key == "": - from fastapi import HTTPException + # elif litellm_api_key == "": + # from fastapi import HTTPException - raise HTTPException( - status_code=401, - detail="LiteLLM API key is missing. Please add it or use OAuth authentication.", - headers={ - "WWW-Authenticate": f'Bearer resource_metadata=f"{request.base_url}/.well-known/oauth-protected-resource"', - }, - ) + # raise HTTPException( + # status_code=401, + # detail="LiteLLM API key is missing. Please add it or use OAuth authentication.", + # headers={ + # "WWW-Authenticate": f'Bearer resource_metadata=f"{request.base_url}/.well-known/oauth-protected-resource"', + # }, + # ) else: validated_user_api_key_auth = await user_api_key_auth( api_key=litellm_api_key, request=request