From ffbd7ef525955a8e3ebb0b34dbcdb2793a405689 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Tue, 10 Mar 2026 11:21:06 -0700 Subject: [PATCH] fix: use official Shopify API specs repo, move lru_cache error handling to caller --- .../mcp_management_endpoints.py | 18 +++++++++--------- litellm/proxy/openapi_registry.json | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/litellm/proxy/management_endpoints/mcp_management_endpoints.py b/litellm/proxy/management_endpoints/mcp_management_endpoints.py index 710aa0b1162..d45629b8f69 100644 --- a/litellm/proxy/management_endpoints/mcp_management_endpoints.py +++ b/litellm/proxy/management_endpoints/mcp_management_endpoints.py @@ -1373,14 +1373,8 @@ if MCP_AVAILABLE: @functools.lru_cache(maxsize=1) def _load_openapi_registry() -> Dict[str, Any]: - try: - with open(_OPENAPI_REGISTRY_PATH, "r") as f: - data: Dict[str, Any] = json.load(f) - except Exception as e: - verbose_proxy_logger.warning( - f"Failed to load OpenAPI registry from {_OPENAPI_REGISTRY_PATH}: {e}" - ) - data = {"apis": []} + with open(_OPENAPI_REGISTRY_PATH, "r") as f: + data: Dict[str, Any] = json.load(f) return data @router.get( @@ -1399,4 +1393,10 @@ if MCP_AVAILABLE: ) }, ) - return _load_openapi_registry() + try: + return _load_openapi_registry() + except Exception as e: + verbose_proxy_logger.warning( + f"Failed to load OpenAPI registry from {_OPENAPI_REGISTRY_PATH}: {e}" + ) + return {"apis": []} diff --git a/litellm/proxy/openapi_registry.json b/litellm/proxy/openapi_registry.json index 208a1f10eb8..ff59f13ac14 100644 --- a/litellm/proxy/openapi_registry.json +++ b/litellm/proxy/openapi_registry.json @@ -189,7 +189,7 @@ "title": "Shopify", "description": "Products, orders, customers, and store management (requires your store subdomain)", "icon_url": "https://cdn.simpleicons.org/shopify", - "spec_url": "https://raw.githubusercontent.com/allengrant/shopify_openapi/master/shopify_openapi.json", + "spec_url": "https://raw.githubusercontent.com/Shopify/shopify-api-specs/main/admin/rest/2024-01/openapi.json", "oauth": { "authorization_url": "https://your-store.myshopify.com/admin/oauth/authorize", "token_url": "https://your-store.myshopify.com/admin/oauth/access_token",