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
address greptile review feedback (greploop iteration 2)
yuneng-jiang26e5482abb35
diff --git a/ui/litellm-dashboard/src/components/router_settings/index.test.tsx b/ui/litellm-dashboard/src/components/router_settings/index.test.tsxindex 1920268207d..8edb0ac6e07 100644--- a/ui/litellm-dashboard/src/components/router_settings/index.test.tsx+++ b/ui/litellm-dashboard/src/components/router_settings/index.test.tsx@@ -48,6 +48,7 @@ import {getRouterSettingsCall,setCallbacksCall,} from "@/components/networking";+import NotificationsManager from "@/components/molecules/notifications_manager";const mockCallbacksResponse = {router_settings: {@@ -141,29 +142,34 @@ describe("RouterSettings", () => {const user = userEvent.setup();renderWithProviders(<RouterSettings {...defaultProps} />);+ // Wait for the strategy select to appear — it only renders after getRouterSettingsCall resolvesawait waitFor(() => {- expect(screen.getByRole("button", { name: /save changes/i })).toBeInTheDocument();+ expect(screen.getByTestId("strategy-select")).toBeInTheDocument();});await user.click(screen.getByRole("button", { name: /save changes/i }));expect(setCallbacksCall).toHaveBeenCalledWith("test-token",- expect.objectContaining({ router_settings: expect.any(Object) })+ expect.objectContaining({+ router_settings: expect.objectContaining({+ routing_strategy: "simple-shuffle",+ }),+ }));});it("should show a success notification after saving", async () => {- const NotificationsManager = await import("@/components/molecules/notifications_manager");const user = userEvent.setup();renderWithProviders(<RouterSettings {...defaultProps} />);- await waitFor(() =>- expect(screen.getByRole("button", { name: /save changes/i })).toBeInTheDocument()- );+ // Wait for data to load before interacting+ await waitFor(() => {+ expect(screen.getByTestId("strategy-select")).toBeInTheDocument();+ });await user.click(screen.getByRole("button", { name: /save changes/i }));- expect(NotificationsManager.default.success).toHaveBeenCalledWith(+ expect(NotificationsManager.success).toHaveBeenCalledWith("router settings updated successfully");});