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
[Fix] Flaky MCP server and AgentCore streaming tests in CI
yuneng-jiang64d3d7626f98
diff --git a/tests/mcp_tests/test_mcp_server.py b/tests/mcp_tests/test_mcp_server.pyindex 128ca517ba5..5a0a42d6f77 100644--- a/tests/mcp_tests/test_mcp_server.py+++ b/tests/mcp_tests/test_mcp_server.py@@ -1456,6 +1456,7 @@ async def test_add_update_server_with_alias():mock_mcp_server.authorization_url = Nonemock_mcp_server.registration_url = Nonemock_mcp_server.token_url = None+ mock_mcp_server.oauth2_flow = None# Additional fields used by build_mcp_server_from_tablemock_mcp_server.extra_headers = Nonemock_mcp_server.allow_all_keys = False@@ -1511,6 +1512,7 @@ async def test_add_update_server_without_alias():mock_mcp_server.authorization_url = Nonemock_mcp_server.registration_url = Nonemock_mcp_server.token_url = None+ mock_mcp_server.oauth2_flow = None# Additional fields used by build_mcp_server_from_tablemock_mcp_server.extra_headers = Nonemock_mcp_server.allow_all_keys = False@@ -1566,6 +1568,7 @@ async def test_add_update_server_fallback_to_server_id():mock_mcp_server.authorization_url = Nonemock_mcp_server.registration_url = Nonemock_mcp_server.token_url = None+ mock_mcp_server.oauth2_flow = None# Additional fields used by build_mcp_server_from_table - set explicitly# to avoid MagicMock objects being passed to Pydantic MCPServer constructormock_mcp_server.extra_headers = Nonediff --git a/tests/test_litellm/llms/bedrock/chat/agentcore/test_agentcore_transformation.py b/tests/test_litellm/llms/bedrock/chat/agentcore/test_agentcore_transformation.pyindex acb55a97399..3dede83032a 100644--- a/tests/test_litellm/llms/bedrock/chat/agentcore/test_agentcore_transformation.py+++ b/tests/test_litellm/llms/bedrock/chat/agentcore/test_agentcore_transformation.py@@ -219,6 +219,7 @@ class TestAgentCoreStreamingJsonFallback:messages=[{"role": "user", "content": "test"}],stream=True,client=client,+ api_key="test-jwt-token",)# Collect content across all chunks@@ -257,6 +258,7 @@ class TestAgentCoreStreamingJsonFallback:messages=[{"role": "user", "content": "test"}],stream=True,client=client,+ api_key="test-jwt-token",)# Collect content across all chunks@@ -289,6 +291,7 @@ class TestAgentCoreStreamingJsonFallback:messages=[{"role": "user", "content": "test"}],stream=True,client=client,+ api_key="test-jwt-token",)async def test_async_streaming_malformed_json_raises_error(self):@@ -316,4 +319,5 @@ class TestAgentCoreStreamingJsonFallback:messages=[{"role": "user", "content": "test"}],stream=True,client=client,+ api_key="test-jwt-token",)