From bfd28e539ac6d5d84f21305e38233aa3c7fb0fb9 Mon Sep 17 00:00:00 2001 From: zgaetano Date: Tue, 31 Mar 2026 15:33:10 -0400 Subject: [PATCH] Remove mcp-gateway/gateway-proxy/gateway_proxy_patch.py --- .../gateway-proxy/gateway_proxy_patch.py | 45 ------------------- 1 file changed, 45 deletions(-) delete mode 100644 mcp-gateway/gateway-proxy/gateway_proxy_patch.py diff --git a/mcp-gateway/gateway-proxy/gateway_proxy_patch.py b/mcp-gateway/gateway-proxy/gateway_proxy_patch.py deleted file mode 100644 index ab5a75f..0000000 --- a/mcp-gateway/gateway-proxy/gateway_proxy_patch.py +++ /dev/null @@ -1,45 +0,0 @@ -""" -PATCH: Add OpenAI-compatible routes to gateway_proxy.py - -This file contains the modifications needed to add OpenAI API support -to the MCP gateway. Apply these changes to gateway_proxy.py: - -1. Add import at the top of the file (after other imports): - from .openai_routes_fixed import convert_mcp_tool_to_openai, list_models, tools, chat_completions - -2. Add these routes to the routes list (before the closing bracket): - - # OpenAI-compatible API endpoints - Route("/v1/models", list_models, methods=["GET"]), - Route("/v1/tools", lambda r: tools(r, TOOL_DEFINITIONS), methods=["GET"]), - Route("/v1/chat/completions", lambda r: chat_completions(r, TOOL_DEFINITIONS), methods=["POST"]), - -3. The lambda functions are necessary to pass TOOL_DEFINITIONS to the handlers. - -IMPLEMENTATION STEPS: -===================== - -1. Make a backup of gateway_proxy.py: - cp gateway_proxy.py gateway_proxy.backup - -2. Add the import statement after line 27 (after from .openai_routes import...): - - from .openai_routes_fixed import convert_mcp_tool_to_openai, list_models, tools, chat_completions - -3. Find the routes list (around line 795) and add before the final closing bracket: - - # OpenAI-compatible API endpoints (for Open-UI and other OpenAI clients) - Route("/v1/models", list_models, methods=["GET"]), - Route("/v1/tools", lambda r: tools(r, TOOL_DEFINITIONS), methods=["GET"]), - Route("/v1/chat/completions", lambda r: chat_completions(r, TOOL_DEFINITIONS), methods=["POST"]), - -4. Restart the gateway container: - docker-compose restart gateway-proxy - -5. Test tool discovery from OpenUI: - GET http://mcp.wilddragon.net:8000/v1/tools - - Should return JSON with "data" array containing tool definitions in OpenAI format. -""" - -print(__doc__)