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 1)
yuneng-jiang40721ab18f15
diff --git a/ui/litellm-dashboard/src/components/AIHub/AgentHubTableColumns.tsx b/ui/litellm-dashboard/src/components/AIHub/AgentHubTableColumns.tsxindex c6a8c0b9daa..09b1c147615 100644--- a/ui/litellm-dashboard/src/components/AIHub/AgentHubTableColumns.tsx+++ b/ui/litellm-dashboard/src/components/AIHub/AgentHubTableColumns.tsx@@ -194,7 +194,6 @@ export const getAgentHubTableColumns = (return publicA - publicB;},cell: ({ row }) => {- console.log(`CHECKPOINT 1: ${JSON.stringify(row.original)}`);const agent = row.original;return agent.is_public === true ? (diff --git a/ui/litellm-dashboard/src/components/EntityUsageExport/ExportTypeSelector.test.tsx b/ui/litellm-dashboard/src/components/EntityUsageExport/ExportTypeSelector.test.tsxindex 6ccf8822e02..d9469f095a3 100644--- a/ui/litellm-dashboard/src/components/EntityUsageExport/ExportTypeSelector.test.tsx+++ b/ui/litellm-dashboard/src/components/EntityUsageExport/ExportTypeSelector.test.tsx@@ -31,7 +31,7 @@ describe("ExportTypeSelector", () => {it("should have the correct radio checked based on value prop", () => {render(<ExportTypeSelector value="daily_with_models" onChange={vi.fn()} entityType="team" />);- const radios = screen.getAllByRole("radio");- expect(radios[2]).toBeChecked();+ const modelRadio = screen.getByRole("radio", { name: /by team and model/i });+ expect(modelRadio).toBeChecked();});});diff --git a/ui/litellm-dashboard/src/components/GuardrailsMonitor/GuardrailConfig.test.tsx b/ui/litellm-dashboard/src/components/GuardrailsMonitor/GuardrailConfig.test.tsxindex fd9ad61599b..38f65681982 100644--- a/ui/litellm-dashboard/src/components/GuardrailsMonitor/GuardrailConfig.test.tsx+++ b/ui/litellm-dashboard/src/components/GuardrailsMonitor/GuardrailConfig.test.tsx@@ -10,6 +10,10 @@ describe("GuardrailConfig", () => {provider: "bedrock",};+ afterEach(() => {+ vi.useRealTimers();+ });+it("should render", () => {render(<GuardrailConfig {...defaultProps} />);expect(screen.getByText("Parameters")).toBeInTheDocument();@@ -39,10 +43,16 @@ describe("GuardrailConfig", () => {it("should show custom code textarea when custom code override is toggled on", async () => {const user = userEvent.setup();render(<GuardrailConfig {...defaultProps} />);- const switches = screen.getAllByRole("switch");- // The second switch is the custom code override toggle- const customCodeSwitch = switches[1];- await user.click(customCodeSwitch);+ // Walk up from "Custom Code Override" heading to find the enclosing section,+ // then locate the switch within it+ const heading = screen.getByText("Custom Code Override");+ let container = heading.parentElement;+ let customCodeSwitch: Element | null = null;+ while (container && !customCodeSwitch) {+ customCodeSwitch = container.querySelector('[role="switch"]');+ container = container.parentElement;+ }+ await user.click(customCodeSwitch!);expect(screen.getByPlaceholderText(/async def evaluate/)).toBeInTheDocument();});@@ -63,7 +73,6 @@ describe("GuardrailConfig", () => {render(<GuardrailConfig {...defaultProps} />);await user.click(screen.getByRole("button", { name: /re-run on failing logs/i }));expect(screen.getByText(/Running on 10 samples/)).toBeInTheDocument();- vi.useRealTimers();});it("should show success message after re-run completes", async () => {@@ -73,7 +82,6 @@ describe("GuardrailConfig", () => {await user.click(screen.getByRole("button", { name: /re-run on failing logs/i }));act(() => { vi.advanceTimersByTime(2500); });expect(screen.getByText(/7\/10 would now pass/)).toBeInTheDocument();- vi.useRealTimers();});it("should display the Revert and Save buttons", () => {