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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
refactor: consolidate redirect_uri scheme check into shared handler
Yuneng Jiang99f007f51d99
diff --git a/litellm/proxy/management_endpoints/mcp_management_endpoints.py b/litellm/proxy/management_endpoints/mcp_management_endpoints.pyindex 9cb5ec95ab9..8e54af0f96a 100644--- a/litellm/proxy/management_endpoints/mcp_management_endpoints.py+++ b/litellm/proxy/management_endpoints/mcp_management_endpoints.py@@ -19,7 +19,6 @@ import functoolsimport importlibimport jsonimport os-from urllib.parse import urlparsefrom dataclasses import dataclassfrom datetime import datetime, timedelta, timezonefrom typing import Any, Dict, Iterable, List, Literal, Optional@@ -1379,15 +1378,6 @@ if MCP_AVAILABLE:response_type: Optional[str] = None,scope: Optional[str] = None,):- parsed_redirect = urlparse(redirect_uri)- if parsed_redirect.scheme not in ("http", "https"):- raise HTTPException(- status_code=status.HTTP_400_BAD_REQUEST,- detail={- "error": "invalid_redirect_uri",- "message": "redirect_uri must use http or https scheme",- },- )mcp_server = _get_cached_temporary_mcp_server_or_404(server_id, request=request)# Use the server's stored client_id when the caller doesn't supply oneresolved_client_id = mcp_server.client_id or client_id or ""