Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

refactor: comment out oauth error raising logic for now

Krrish Dholakia37fdb486d4e4
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 714f2c87465..20a632f1674 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
-
- 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"',
- },
- )
+ # 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"',
+ # },
+ # )
else:
validated_user_api_key_auth = await user_api_key_auth(
api_key=litellm_api_key, request=request