mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-18 10:19:01 +00:00
refactor: comment out oauth error raising logic for now
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user