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
test(ui): cover appending a second model in ModelSelect
Yuneng Jiang0ee47a002839
diff --git a/ui/litellm-dashboard/src/components/ModelSelect/ModelSelect.test.tsx b/ui/litellm-dashboard/src/components/ModelSelect/ModelSelect.test.tsxindex eeaeac541bd..34a21122027 100644--- a/ui/litellm-dashboard/src/components/ModelSelect/ModelSelect.test.tsx+++ b/ui/litellm-dashboard/src/components/ModelSelect/ModelSelect.test.tsx@@ -140,6 +140,23 @@ describe("ModelSelect", () => {expect(mockOnChange).toHaveBeenCalledWith(["gpt-4"]);});+ it("should append a second model to the existing selection", async () => {+ const user = userEvent.setup();+ renderWithProviders(+ <ModelSelect+ onChange={mockOnChange}+ value={["gpt-4"]}+ context="user"+ options={{ showAllProxyModelsOverride: true }}+ />,+ );++ await openModelList(user);+ await user.click(screen.getAllByText("claude-3")[0]);++ expect(mockOnChange).toHaveBeenCalledWith(["gpt-4", "claude-3"]);+ });+it("should offer both special options when they are enabled", async () => {const user = userEvent.setup();mockUseOrganization.mockReturnValue({