From e2e5b63b413ec4116c90649cd80aef0f0f454c6a Mon Sep 17 00:00:00 2001 From: Ryan Crabbe Date: Fri, 17 Apr 2026 23:24:46 -0700 Subject: [PATCH] fix(ui): revert submit guard to allow intentional extra_headers clearing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The ?.length guard prevented intentional clears from persisting — send the form value as-is since initialValues now populates it correctly. --- .../src/components/mcp_tools/mcp_server_edit.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.tsx b/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.tsx index e97222acbd..c64214e080 100644 --- a/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.tsx +++ b/ui/litellm-dashboard/src/components/mcp_tools/mcp_server_edit.tsx @@ -564,7 +564,7 @@ const MCPServerEdit: React.FC = ({ mcp_access_groups: accessGroups, alias: restValues.alias, // Include permission management fields - extra_headers: restValues.extra_headers?.length ? restValues.extra_headers : undefined, + extra_headers: restValues.extra_headers || [], allowed_tools: allowedTools.length > 0 ? allowedTools : null, tool_name_to_display_name: Object.keys(toolNameToDisplayName).length > 0 ? toolNameToDisplayName : null, tool_name_to_description: Object.keys(toolNameToDescription).length > 0 ? toolNameToDescription : null,