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): drop stray text next to Close in the model connection test dialog
Yuneng Jiang795c03627905
diff --git a/ui/litellm-dashboard/src/components/add_model/AddModelForm.test.tsx b/ui/litellm-dashboard/src/components/add_model/AddModelForm.test.tsxindex 340fd811e97..3b879da2d68 100644--- a/ui/litellm-dashboard/src/components/add_model/AddModelForm.test.tsx+++ b/ui/litellm-dashboard/src/components/add_model/AddModelForm.test.tsx@@ -33,6 +33,7 @@ vi.mock("../networking", async () => {{ model_group: "gpt-3.5-turbo", mode: "chat" },],}),+ testConnectionRequest: vi.fn().mockResolvedValue({ status: "success" }),getProviderCreateMetadata: vi.fn().mockResolvedValue([{provider: "OpenAI",@@ -311,6 +312,20 @@ describe("AddModelForm", () => {expect(await screen.findByRole("button", { name: "Add Model" })).toBeInTheDocument();});+ it("shows only the Close button in the connection test dialog footer", async () => {+ const mockUseAuthorized = vi.mocked(await import("@/app/(dashboard)/hooks/useAuthorized"));+ mockUseAuthorized.default.mockReturnValue(mockAuthorizedUser("proxy_admin", "user-1", true));++ renderWithProviders(<AddModelForm {...createTestProps()} />);++ await userEvent.click(await screen.findByTestId("test-connect-btn"));++ const dialog = await screen.findByRole("dialog");+ const footer = dialog.querySelector('[data-slot="dialog-footer"]');+ expect(footer).not.toBeNull();+ expect(footer!.textContent?.trim()).toBe("Close");+ });+describe("the enterprise gate on the Team-BYOK switch", () => {const renderForm = async (premiumUser: boolean) => {const mockUseAuthorized = vi.mocked(await import("@/app/(dashboard)/hooks/useAuthorized"));diff --git a/ui/litellm-dashboard/src/components/add_model/AddModelForm.tsx b/ui/litellm-dashboard/src/components/add_model/AddModelForm.tsxindex b6884327a3c..ad0f749b189 100644--- a/ui/litellm-dashboard/src/components/add_model/AddModelForm.tsx+++ b/ui/litellm-dashboard/src/components/add_model/AddModelForm.tsx@@ -476,7 +476,6 @@ const AddModelForm: React.FC<AddModelFormProps> = ({/>)}<DialogFooter>- {" "}<Buttonvariant="outline"onClick={() => {@@ -486,7 +485,6 @@ const AddModelForm: React.FC<AddModelFormProps> = ({>Close</Button>- , ]</DialogFooter></DialogContent></Dialog>