This commit is contained in:
lda
2026-05-13 20:59:33 +07:00 Verified
parent 92f5ca1755
commit 11afed99ab
6 changed files with 71 additions and 9 deletions
+2
View File
@@ -1,11 +1,13 @@
from .admin import create_proxy_admin_server
from .runtime import (
ProxyRuntime,
TransparentProxyRuntime,
create_transparent_proxy_client,
create_transparent_proxy_server,
)
__all__ = [
"ProxyRuntime",
"TransparentProxyRuntime",
"create_proxy_admin_server",
"create_transparent_proxy_client",
+11 -3
View File
@@ -40,7 +40,13 @@ _ADMIN_TOOL_NAMES = [
]
class TransparentProxyRuntime:
class ProxyRuntime:
"""Mount configured upstream MCP connections into one FastMCP server.
The `transparent_proxy` package name is compatibility history. This runtime
is now the shared proxy mounting engine used by unified mode too.
"""
def __init__(
self,
config: BrokerConfig,
@@ -176,6 +182,9 @@ class TransparentProxyRuntime:
raise KeyError(proxy_name)
TransparentProxyRuntime = ProxyRuntime
def create_transparent_proxy_server(
config: BrokerConfig,
*,
@@ -191,7 +200,7 @@ def create_transparent_proxy_server(
resources_as_tools=resources_as_tools,
prompts_as_tools=prompts_as_tools,
)
return TransparentProxyRuntime(
return ProxyRuntime(
config,
config_path=config_path,
resources_as_tools=resources_as_tools,
@@ -225,4 +234,3 @@ def create_transparent_proxy_client(
)
)
)