This commit is contained in:
mariohome5 2026-08-26 03:35:06 -03:00 • committed by GitHub
commit b8a87b69ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -496,7 +496,7 @@ class LiteLLMRoutes(enum.Enum):
mcp_inference_routes = [
"/mcp",
"/mcp/",
"/mcp/{subpath}",
"/mcp/{subpath:path}",
"/mcp/tools",
"/mcp/tools/list",
"/mcp/tools/call",

View file

@ -466,6 +466,8 @@ def test_virtual_key_llm_api_routes_rejects_mcp_multi_segment_admin_subpaths(
("/mcp", "POST"),
("/mcp/", "POST"),
("/mcp/my-server", "POST"), # matches the /mcp/{subpath} pattern
("/mcp/my-server/", "POST"), # same server, trailing slash
("/mcp/my-server/mcp", "POST"), # streamable-http transport sub-path
("/mcp/tools", "GET"),
("/mcp/tools/list", "POST"),
("/mcp/tools/call", "POST"),