diff --git a/litellm/proxy/gateway/__init__.py b/litellm/proxy/gateway/__init__.py new file mode 100644 index 00000000000..d85d81c0a6a --- /dev/null +++ b/litellm/proxy/gateway/__init__.py @@ -0,0 +1,5 @@ +"""LiteLLM MCP Gateway — the clean-room v2 gateway, grafted into v1 behind a flag. + +Written v2-native; nothing here imports from v1 (`litellm.proxy._experimental.mcp_server.*`). +v1 only ever reaches this package through a thin adapter, never the other way round. +""" diff --git a/litellm/proxy/_experimental/mcp_server/v2/README.md b/litellm/proxy/gateway/mcp/README.md similarity index 97% rename from litellm/proxy/_experimental/mcp_server/v2/README.md rename to litellm/proxy/gateway/mcp/README.md index 0874c02541c..0a2d09e2e7c 100644 --- a/litellm/proxy/_experimental/mcp_server/v2/README.md +++ b/litellm/proxy/gateway/mcp/README.md @@ -41,7 +41,7 @@ error. That is the property we want, so the gate is load-bearing rather than dec Run the gate (passes clean, 0 errors): ``` -basedpyright --project litellm/proxy/_experimental/mcp_server/v2/pyrightconfig.json +basedpyright --project litellm/proxy/gateway/mcp/pyrightconfig.json ``` Now prove the gate actually bites. Delete any one arm from `label_enum` in diff --git a/litellm/proxy/_experimental/mcp_server/v2/__init__.py b/litellm/proxy/gateway/mcp/__init__.py similarity index 100% rename from litellm/proxy/_experimental/mcp_server/v2/__init__.py rename to litellm/proxy/gateway/mcp/__init__.py diff --git a/litellm/proxy/_experimental/mcp_server/v2/_spike_exhaustiveness.py b/litellm/proxy/gateway/mcp/_spike_exhaustiveness.py similarity index 100% rename from litellm/proxy/_experimental/mcp_server/v2/_spike_exhaustiveness.py rename to litellm/proxy/gateway/mcp/_spike_exhaustiveness.py diff --git a/litellm/proxy/_experimental/mcp_server/v2/oauth/__init__.py b/litellm/proxy/gateway/mcp/oauth/__init__.py similarity index 100% rename from litellm/proxy/_experimental/mcp_server/v2/oauth/__init__.py rename to litellm/proxy/gateway/mcp/oauth/__init__.py diff --git a/litellm/proxy/_experimental/mcp_server/v2/oauth/httpx_auth.py b/litellm/proxy/gateway/mcp/oauth/httpx_auth.py similarity index 100% rename from litellm/proxy/_experimental/mcp_server/v2/oauth/httpx_auth.py rename to litellm/proxy/gateway/mcp/oauth/httpx_auth.py diff --git a/litellm/proxy/_experimental/mcp_server/v2/oauth/types.py b/litellm/proxy/gateway/mcp/oauth/types.py similarity index 100% rename from litellm/proxy/_experimental/mcp_server/v2/oauth/types.py rename to litellm/proxy/gateway/mcp/oauth/types.py diff --git a/litellm/proxy/_experimental/mcp_server/v2/oauth/upstream_credentials.py b/litellm/proxy/gateway/mcp/oauth/upstream_credentials.py similarity index 100% rename from litellm/proxy/_experimental/mcp_server/v2/oauth/upstream_credentials.py rename to litellm/proxy/gateway/mcp/oauth/upstream_credentials.py diff --git a/litellm/proxy/_experimental/mcp_server/v2/pyrightconfig.json b/litellm/proxy/gateway/mcp/pyrightconfig.json similarity index 86% rename from litellm/proxy/_experimental/mcp_server/v2/pyrightconfig.json rename to litellm/proxy/gateway/mcp/pyrightconfig.json index 6ad94a4ab1b..ca075d1be85 100644 --- a/litellm/proxy/_experimental/mcp_server/v2/pyrightconfig.json +++ b/litellm/proxy/gateway/mcp/pyrightconfig.json @@ -2,7 +2,7 @@ "include": ["."], "typeCheckingMode": "strict", "pythonVersion": "3.10", - "venvPath": "../../../../..", + "venvPath": "../../../..", "venv": ".venv", "reportMissingTypeStubs": false, "reportUnknownMemberType": true, diff --git a/litellm/proxy/_experimental/mcp_server/v2/result.py b/litellm/proxy/gateway/mcp/result.py similarity index 100% rename from litellm/proxy/_experimental/mcp_server/v2/result.py rename to litellm/proxy/gateway/mcp/result.py diff --git a/tests/mcp_tests/v2/test_upstream_credentials.py b/tests/mcp_tests/gateway/test_upstream_credentials.py similarity index 93% rename from tests/mcp_tests/v2/test_upstream_credentials.py rename to tests/mcp_tests/gateway/test_upstream_credentials.py index 0824fc1961b..5170c9b971e 100644 --- a/tests/mcp_tests/v2/test_upstream_credentials.py +++ b/tests/mcp_tests/gateway/test_upstream_credentials.py @@ -8,11 +8,11 @@ import httpx import pytest from pydantic import ValidationError -from litellm.proxy._experimental.mcp_server.v2.oauth.httpx_auth import ( +from litellm.proxy.gateway.mcp.oauth.httpx_auth import ( NoOpAuth, StaticHeaderAuth, ) -from litellm.proxy._experimental.mcp_server.v2.oauth.types import ( +from litellm.proxy.gateway.mcp.oauth.types import ( ApiKeyConfig, AuthSpecKind, NoneConfig, @@ -20,10 +20,10 @@ from litellm.proxy._experimental.mcp_server.v2.oauth.types import ( ServerSpec, Subject, ) -from litellm.proxy._experimental.mcp_server.v2.oauth.upstream_credentials import ( +from litellm.proxy.gateway.mcp.oauth.upstream_credentials import ( UpstreamCredentialProvider, ) -from litellm.proxy._experimental.mcp_server.v2.result import Error, Ok +from litellm.proxy.gateway.mcp.result import Error, Ok PROVIDER = UpstreamCredentialProvider() SUBJECT = Subject(tenant_id="t1", subject_id="u1")