From 0fc37ca3afec249b38f18f5408daf8cc7688e2b3 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Tue, 10 Mar 2026 14:10:46 -0700 Subject: [PATCH] fix: remove deprecated Shopify REST Admin API, add module-level cache to avoid re-fetch on modal re-open --- litellm/proxy/openapi_registry.json | 17 ----------------- .../components/mcp_tools/OpenAPIQuickPicker.tsx | 12 +++++++++++- 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/litellm/proxy/openapi_registry.json b/litellm/proxy/openapi_registry.json index d525b504a7b..1b3425b75ec 100644 --- a/litellm/proxy/openapi_registry.json +++ b/litellm/proxy/openapi_registry.json @@ -184,23 +184,6 @@ { "name": "reactions_add", "description": "Add an emoji reaction to a message" } ] }, - { - "name": "shopify", - "title": "Shopify", - "description": "Products, orders, customers, and store management via Shopify Admin REST API (requires your store subdomain)", - "icon_url": "https://cdn.simpleicons.org/shopify", - "spec_url": "https://raw.githubusercontent.com/Shopify/shopify-api-specs/main/admin/rest/2023-10/openapi.json", - "key_tools": [ - { "name": "list_products", "description": "List products with variants, pricing, and inventory" }, - { "name": "get_product", "description": "Get full product details including all variants" }, - { "name": "list_orders", "description": "List orders with status, customer, and line item filters" }, - { "name": "get_order", "description": "Get full order details including shipping and payment" }, - { "name": "list_customers", "description": "List customers with order history and tags" }, - { "name": "update_order", "description": "Update order notes, tags, or shipping address" }, - { "name": "create_fulfillment", "description": "Fulfill an order with tracking info" }, - { "name": "list_inventory_levels", "description": "Get stock levels across locations" } - ] - }, { "name": "snowflake", "title": "Snowflake", diff --git a/ui/litellm-dashboard/src/components/mcp_tools/OpenAPIQuickPicker.tsx b/ui/litellm-dashboard/src/components/mcp_tools/OpenAPIQuickPicker.tsx index 2959ed25e57..e0f987611ab 100644 --- a/ui/litellm-dashboard/src/components/mcp_tools/OpenAPIQuickPicker.tsx +++ b/ui/litellm-dashboard/src/components/mcp_tools/OpenAPIQuickPicker.tsx @@ -28,6 +28,9 @@ interface OpenAPIQuickPickerProps { onSelect: (entry: OpenAPIRegistryEntry) => void; } +// Module-level cache so repeated modal opens don't re-fetch the static registry. +let registryCache: OpenAPIRegistryEntry[] | null = null; + const OpenAPIQuickPicker: React.FC = ({ accessToken, selectedName, @@ -39,9 +42,16 @@ const OpenAPIQuickPicker: React.FC = ({ useEffect(() => { if (!accessToken) return; + if (registryCache !== null) { + setApis(registryCache); + return; + } setLoading(true); fetchOpenAPIRegistry(accessToken) - .then((data) => setApis(data.apis ?? [])) + .then((data) => { + registryCache = data.apis ?? []; + setApis(registryCache); + }) .catch(() => setApis([])) .finally(() => setLoading(false)); }, [accessToken]);