From 3539c0afc999c47eec8e07b027c746f49ed2a38d Mon Sep 17 00:00:00 2001 From: yuneng-jiang Date: Tue, 10 Nov 2026 10:11:16 -0800 Subject: [PATCH] test(integration): cap the OAuth metadata lookup in the mixed capabilities subscription case (#50867) The second server in this case is a plain MCP SDK server registered as oauth_delegate. The gateway's first catalog listing waits for that server's OAuth metadata lookup, which never resolves and runs for the full MCP_METADATA_TIMEOUT of 10 seconds. The MCP SDK client also gives server/discover 10 seconds, so the case passed or failed on about a tenth of a second of head start. Setting LITELLM_MCP_METADATA_TIMEOUT to 5 for this case keeps the lookup well inside the client limit. The case still asserts that subscription changes are delivered and tools are refreshed across both servers. --- tests/integration/mcp/test_interactions.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/mcp/test_interactions.py b/tests/integration/mcp/test_interactions.py index 5577cf16067..b77deb5236a 100644 --- a/tests/integration/mcp/test_interactions.py +++ b/tests/integration/mcp/test_interactions.py @@ -1227,6 +1227,7 @@ def test_modern_subscription_delivers_changes_between_calls_and_refreshes_tools( "PYTHONPATH": os.pathsep.join((str(source), str(source / "tests"))), "LITELLM_SALT_KEY": "subscription-pagination-key", **({"LITELLM_MCP_TOOL_LISTING_TIMEOUT": "2"} if access == "probe-timeout" else {}), + **({"LITELLM_MCP_METADATA_TIMEOUT": "5"} if access == "mixed-capabilities" else {}), "STORE_MODEL_IN_DB": "False", "DISABLE_SCHEMA_UPDATE": "true", "LITELLM_LOCAL_MODEL_COST_MAP": "True",