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-jiang56ed8379e297
diff --git a/ui/litellm-dashboard/src/components/AIHub/AgentHubTableColumns.test.tsx b/ui/litellm-dashboard/src/components/AIHub/AgentHubTableColumns.test.tsxindex c32df2f5466..703a24d8d6f 100644--- a/ui/litellm-dashboard/src/components/AIHub/AgentHubTableColumns.test.tsx+++ b/ui/litellm-dashboard/src/components/AIHub/AgentHubTableColumns.test.tsx@@ -94,8 +94,14 @@ describe("AgentHubTableColumns", () => {it("should display I/O modes", () => {render(<TestTable data={[mockAgent]} />);- expect(screen.getByText("text")).toBeInTheDocument();- expect(screen.getByText("text, image")).toBeInTheDocument();+ // "In:" and "Out:" are in <span> children; getByText with exact:false+ // matches against the element's full textContent across child nodes+ expect(screen.getByText((_, el) =>+ el?.tagName === "P" && el.textContent === "In: text"+ )).toBeInTheDocument();+ expect(screen.getByText((_, el) =>+ el?.tagName === "P" && el.textContent === "Out: text, image"+ )).toBeInTheDocument();});it("should display 'Yes' badge for public agents", () => {diff --git a/ui/litellm-dashboard/src/components/GuardrailsMonitor/GuardrailConfig.test.tsx b/ui/litellm-dashboard/src/components/GuardrailsMonitor/GuardrailConfig.test.tsxindex 38f65681982..ac84c270d82 100644--- a/ui/litellm-dashboard/src/components/GuardrailsMonitor/GuardrailConfig.test.tsx+++ b/ui/litellm-dashboard/src/components/GuardrailsMonitor/GuardrailConfig.test.tsx@@ -24,6 +24,8 @@ describe("GuardrailConfig", () => {expect(screen.getByText(/Configure Content Safety behavior/)).toBeInTheDocument();});+ // Note: Version history entries are hardcoded placeholders in the component.+ // These assertions will need updating when wired to real API data.it("should show version history when 'View history' is clicked", async () => {const user = userEvent.setup();render(<GuardrailConfig {...defaultProps} />);@@ -87,6 +89,7 @@ describe("GuardrailConfig", () => {it("should display the Revert and Save buttons", () => {render(<GuardrailConfig {...defaultProps} />);expect(screen.getByRole("button", { name: /revert/i })).toBeInTheDocument();- expect(screen.getByRole("button", { name: /save as v4/i })).toBeInTheDocument();+ // The component's hardcoded default version is "v3", so Save shows "v4"+ expect(screen.getByRole("button", { name: /save as v\d+/i })).toBeInTheDocument();});});diff --git a/ui/litellm-dashboard/src/components/GuardrailsMonitor/ScoreChart.test.tsx b/ui/litellm-dashboard/src/components/GuardrailsMonitor/ScoreChart.test.tsxindex b950dd9a302..c32e6745784 100644--- a/ui/litellm-dashboard/src/components/GuardrailsMonitor/ScoreChart.test.tsx+++ b/ui/litellm-dashboard/src/components/GuardrailsMonitor/ScoreChart.test.tsx@@ -1,4 +1,5 @@import { render, screen } from "@testing-library/react";+import { vi } from "vitest";import { ScoreChart } from "./ScoreChart";vi.mock("@tremor/react", async (importOriginal) => {