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]

style(mcp): drop impossible-scenario handling around the challenge header read

Tin Chi Loc6d65670c497
diff --git a/litellm/proxy/_experimental/mcp_server/faults/list_outcomes.py b/litellm/proxy/_experimental/mcp_server/faults/list_outcomes.py
index ad360610d10..96ff9443126 100644
--- a/litellm/proxy/_experimental/mcp_server/faults/list_outcomes.py
+++ b/litellm/proxy/_experimental/mcp_server/faults/list_outcomes.py
@@ -94,11 +94,7 @@ def upstream_auth_challenge(exc: BaseException) -> tuple[int, str | None] | None
response = _find_upstream_response(exc)
if response is None or response.status_code not in (401, 403):
return None
- try:
- challenge = response.headers.get("www-authenticate")
- except Exception:
- challenge = None
- return response.status_code, challenge
+ return response.status_code, response.headers.get("www-authenticate")
def raise_classified_list_failure(