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): stop MCP playground tool calls from sending twice (#29821)
tin-berri21d2c3aa8313
diff --git a/ui/litellm-dashboard/src/components/mcp_tools/ToolTestPanel.test.tsx b/ui/litellm-dashboard/src/components/mcp_tools/ToolTestPanel.test.tsxindex 08df1fbea2d..4bd351216b8 100644--- a/ui/litellm-dashboard/src/components/mcp_tools/ToolTestPanel.test.tsx+++ b/ui/litellm-dashboard/src/components/mcp_tools/ToolTestPanel.test.tsx@@ -151,4 +151,19 @@ describe("ToolTestPanel defaults", () => {expect(screen.getByPlaceholderText("Enter input for this tool")).toBeInTheDocument();expect(screen.queryByText("No parameters required")).not.toBeInTheDocument();});++ it("renders the call button as type=button so a click never also triggers native form submission", () => {+ const schema: InputSchema = {+ type: "object",+ properties: {+ message: { type: "string", description: "Prompt text" },+ },+ };++ renderPanel(schema);++ const callButton = screen.getByRole("button", { name: "Call Tool" });+ expect(callButton.closest("form")).not.toBeNull();+ expect(callButton).toHaveAttribute("type", "button");+ });});diff --git a/ui/litellm-dashboard/src/components/mcp_tools/ToolTestPanel.tsx b/ui/litellm-dashboard/src/components/mcp_tools/ToolTestPanel.tsxindex c57ea8b523d..e3e84cb7434 100644--- a/ui/litellm-dashboard/src/components/mcp_tools/ToolTestPanel.tsx+++ b/ui/litellm-dashboard/src/components/mcp_tools/ToolTestPanel.tsx@@ -521,6 +521,7 @@ export function ToolTestPanel({<div className="pt-3 border-t border-gray-100"><Button+ type="button"onClick={() => form.submit()}disabled={isLoading}variant="primary"