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
test: fix failing tests after conflict resolution
Yuta Saito7f8b1d0708a1
diff --git a/tests/test_litellm/proxy/_experimental/mcp_server/auth/test_user_api_key_auth_mcp.py b/tests/test_litellm/proxy/_experimental/mcp_server/auth/test_user_api_key_auth_mcp.pyindex 2dcca0b34cd..2a5cc7bcb7c 100644--- a/tests/test_litellm/proxy/_experimental/mcp_server/auth/test_user_api_key_auth_mcp.py+++ b/tests/test_litellm/proxy/_experimental/mcp_server/auth/test_user_api_key_auth_mcp.py@@ -171,10 +171,6 @@ class TestMCPRequestHandler:with patch.object(MCPRequestHandler, "_get_allowed_mcp_servers_for_team") as mock_team_servers:-<<<<<<< HEAD--=======->>>>>>> 78d744e15d (fix: remove adding Mcp-Protocol-Version header (#14069))# Configure mocks to return the test datamock_key_servers.return_value = key_serversmock_team_servers.return_value = team_servers@@ -346,17 +342,11 @@ class TestMCPRequestHandler:# Create an async mock for user_api_key_authasync def mock_user_api_key_auth(api_key, request):return UserAPIKeyAuth(-<<<<<<< HEADtoken=("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"if api_keyelse None),-=======- token="e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"- if api_key- else None,->>>>>>> 78d744e15d (fix: remove adding Mcp-Protocol-Version header (#14069))api_key=api_key,user_id="test-user-id" if api_key else None,team_id="test-team-id" if api_key else None,@@ -374,10 +364,6 @@ class TestMCPRequestHandler:mcp_auth_header,mcp_servers,mcp_server_auth_headers,-<<<<<<< HEAD- mcp_protocol_version,-=======->>>>>>> 78d744e15d (fix: remove adding Mcp-Protocol-Version header (#14069))) = await MCPRequestHandler.process_mcp_request(scope)# Assert the results@@ -557,10 +543,6 @@ class TestMCPRequestHandler:mcp_auth_header,mcp_servers_result,mcp_server_auth_headers,-<<<<<<< HEAD- mcp_protocol_version,-=======->>>>>>> 78d744e15d (fix: remove adding Mcp-Protocol-Version header (#14069))) = await MCPRequestHandler.process_mcp_request(scope)assert auth_result == mock_auth_resultassert mcp_auth_header == expected_result["mcp_auth"]@@ -599,10 +581,6 @@ class TestMCPCustomHeaderName:with patch("litellm.proxy.proxy_server.general_settings") as mock_general_settings:-<<<<<<< HEAD--=======->>>>>>> 78d744e15d (fix: remove adding Mcp-Protocol-Version header (#14069))# Configure mocksmock_get_secret.return_value = env_varmock_general_settings.get.return_value = general_setting@@ -706,10 +684,6 @@ class TestMCPCustomHeaderName:"_get_mcp_client_side_auth_header_name",return_value="custom-auth-header",):-<<<<<<< HEAD--=======->>>>>>> 78d744e15d (fix: remove adding Mcp-Protocol-Version header (#14069))# Create ASGI scope with custom headerscope = {"type": "http",@@ -742,10 +716,6 @@ class TestMCPCustomHeaderName:mcp_auth_header,mcp_servers,mcp_server_auth_headers,-<<<<<<< HEAD- mcp_protocol_version,-=======->>>>>>> 78d744e15d (fix: remove adding Mcp-Protocol-Version header (#14069))) = await MCPRequestHandler.process_mcp_request(scope)# Assert the results@@ -965,10 +935,6 @@ class TestMCPAccessGroupsE2E:mcp_auth_header,mcp_servers,mcp_server_auth_headers,-<<<<<<< HEAD- mcp_protocol_version,-=======->>>>>>> 78d744e15d (fix: remove adding Mcp-Protocol-Version header (#14069))) = await MCPRequestHandler.process_mcp_request(scope)# Assert the results@@ -997,10 +963,6 @@ def test_mcp_path_based_server_segregation(monkeypatch):mcp_auth_header,mcp_servers,mcp_server_auth_headers,-<<<<<<< HEAD- mcp_protocol_version,-=======->>>>>>> 78d744e15d (fix: remove adding Mcp-Protocol-Version header (#14069))) = get_auth_context()# Capture the MCP servers for testingdiff --git a/tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server_manager.py b/tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server_manager.pyindex 5f5755077b4..3237de37636 100644--- a/tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server_manager.py+++ b/tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server_manager.py@@ -11,7 +11,7 @@ from litellm.proxy._experimental.mcp_server.mcp_server_manager import (MCPServerManager,_deserialize_env_dict,)-from litellm.proxy._types import LiteLLM_MCPServerTable, MCPSpecVersion, MCPTransport+from litellm.proxy._types import LiteLLM_MCPServerTable, MCPTransportfrom litellm.types.mcp_server.mcp_server_manager import MCPServerdiff --git a/tests/test_litellm/proxy/management_endpoints/test_mcp_management_endpoints.py b/tests/test_litellm/proxy/management_endpoints/test_mcp_management_endpoints.pyindex 7694fae8405..fc97b389137 100644--- a/tests/test_litellm/proxy/management_endpoints/test_mcp_management_endpoints.py+++ b/tests/test_litellm/proxy/management_endpoints/test_mcp_management_endpoints.py@@ -18,7 +18,6 @@ from typing import Optionalfrom litellm.proxy._types import (LiteLLM_MCPServerTable,LitellmUserRoles,- MCPSpecVersion,MCPTransport,UserAPIKeyAuth,)