The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix(ui): treat MCP allowed clients with an empty alias or value as malformed
yassine2141da81ea0
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/MCPNetworkSettings.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/MCPNetworkSettings.test.tsxindex 4cc87f1455c..4a486bfc648 100644--- a/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/MCPNetworkSettings.test.tsx+++ b/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/MCPNetworkSettings.test.tsx@@ -211,6 +211,17 @@ describe("MCPNetworkSettings", () => {await waitFor(() => expect(screen.queryByText(/stored allowlist is not a list/)).not.toBeInTheDocument());});+ it("treats a stored entry with an empty alias or value as denying every client, like the gateway does", async () => {+ vi.mocked(getGeneralSettingsCall).mockResolvedValue([+ { field_name: "mcp_allowed_clients", field_value: [ANTIGRAVITY, { alias: "", value: "claude-code" }] },+ ]);++ renderSettings();++ expect(await screen.findByText(/stored allowlist is not a list of alias and value pairs/)).toBeVisible();+ expect(screen.queryByRole("button", { name: /^Antigravity CLI/ })).not.toBeInTheDocument();+ });+it("adds clients as alias and value pairs and saves them under mcp_allowed_clients", async () => {renderSettings();await screen.findByText("Allowed Clients");diff --git a/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/MCPNetworkSettings.tsx b/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/MCPNetworkSettings.tsxindex db45cfdedd1..2fd62c7f1ef 100644--- a/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/MCPNetworkSettings.tsx+++ b/ui/litellm-dashboard/src/app/(dashboard)/mcp-servers/_components/MCPNetworkSettings.tsx@@ -52,7 +52,7 @@ interface ClientDraft extends AllowedClient {const isAllowedClient = (entry: unknown): entry is AllowedClient => {if (typeof entry !== "object" || entry === null) return false;const { alias, value } = entry as Partial<Record<keyof AllowedClient, unknown>>;- return typeof alias === "string" && typeof value === "string";+ return typeof alias === "string" && typeof value === "string" && !isIncomplete({ alias, value });};type StoredAllowlist =