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]

fix(mcp): single WARNING per failed discovery and document registration_url carry-forward

Tin Chi Lo55a9f1917c8d
diff --git a/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py b/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py
index ba8102bda2d..e6e265abb61 100644
--- a/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py
+++ b/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py
@@ -193,7 +193,11 @@ def _carry_forward_resolved_oauth_endpoints(new_server: MCPServer, previous_serv
during re-discovery downgrades a working server (``authorization_url`` set) to a broken one
(``None``, /authorize 400s) with no configuration change. Mirrors the ``short_prefix``
carry-forward. Skipped when the server's ``url`` or ``auth_type`` changed, since the previous
- endpoints may then belong to a different upstream.
+ endpoints may then belong to a different upstream. ``registration_url`` IS carried here even
+ though ``_persist_discovered_oauth_endpoints`` refuses to write it to the row: carrying only
+ restores the same in-memory value the previous build already ran with, while persisting it
+ would flip ``_dcr_bridge_relays_client_registration`` (which keys off the stored column) for
+ dcr_bridge servers that never had one configured.
"""
if previous_server is None:
return
@@ -3099,7 +3103,7 @@ class MCPServerManager:
return metadata
except Exception as exc: # pragma: no cover - network/transient issues
- verbose_logger.warning("MCP OAuth discovery failed for %s: %s", server_url, exc)
+ verbose_logger.debug("MCP OAuth discovery failed for %s: %s", server_url, exc)
return None
def _parse_www_authenticate_header(self, header_value: Optional[str]) -> tuple[Optional[str], Optional[list[str]]]: