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): surface the config-endpoint hint as visible menu text
mubashir1osmani093b47371031
diff --git a/ui/litellm-dashboard/src/components/PassThroughSettings/PassThroughEndpointsTable.test.tsx b/ui/litellm-dashboard/src/components/PassThroughSettings/PassThroughEndpointsTable.test.tsxindex 7a3fc621fc1..af3f98b746b 100644--- a/ui/litellm-dashboard/src/components/PassThroughSettings/PassThroughEndpointsTable.test.tsx+++ b/ui/litellm-dashboard/src/components/PassThroughSettings/PassThroughEndpointsTable.test.tsx@@ -115,6 +115,9 @@ describe("PassThroughEndpointsTable", () => {expect(editItem).toHaveAttribute("data-disabled");expect(deleteItem).toHaveAttribute("data-disabled");+ expect(screen.getByTestId("endpoint-config-hint")).toHaveTextContent(+ "This endpoint is defined in the config file and cannot be edited or deleted on the dashboard.",+ );await user.click(editItem);await user.click(deleteItem);@@ -123,6 +126,15 @@ describe("PassThroughEndpointsTable", () => {expect(onDeleteClick).not.toHaveBeenCalled();});+ it("should not show the config hint for DB endpoints", async () => {+ const user = userEvent.setup();+ render(<PassThroughEndpointsTable {...defaultProps} />);++ await user.click(screen.getByTestId("endpoint-actions-ep-1"));+ await screen.findByTestId("endpoint-action-delete");+ expect(screen.queryByTestId("endpoint-config-hint")).not.toBeInTheDocument();+ });+it("should label endpoint source as Config or DB", () => {const configEndpoint: passThroughItem = {id: "ep-config",diff --git a/ui/litellm-dashboard/src/components/PassThroughSettings/PassThroughEndpointsTableColumns.tsx b/ui/litellm-dashboard/src/components/PassThroughSettings/PassThroughEndpointsTableColumns.tsxindex d63be628110..5b18685a140 100644--- a/ui/litellm-dashboard/src/components/PassThroughSettings/PassThroughEndpointsTableColumns.tsx+++ b/ui/litellm-dashboard/src/components/PassThroughSettings/PassThroughEndpointsTableColumns.tsx@@ -18,9 +18,8 @@ import { cn } from "@/lib/cva.config";import type { passThroughItem } from "./PassThroughSettings";-const CONFIG_EDIT_HINT = "Config pass-through endpoints cannot be edited on the dashboard. Please edit the config file.";-const CONFIG_DELETE_HINT =- "Config pass-through endpoints cannot be deleted on the dashboard. Please edit the config file.";+const CONFIG_ENDPOINT_HINT =+ "This endpoint is defined in the config file and cannot be edited or deleted on the dashboard.";function HeaderWithTooltip({ title, tooltip }: { title: string; tooltip: string }) {return (@@ -91,7 +90,6 @@ function EndpointRowActions({ endpoint, onEndpointClick, onDeleteClick }: Endpoi<DropdownMenuItemdata-testid="endpoint-action-edit"disabled={isFromConfig || !endpointId}- title={isFromConfig ? CONFIG_EDIT_HINT : undefined}onClick={() => !isFromConfig && endpointId && onEndpointClick(endpointId)}><Pencil />@@ -102,12 +100,16 @@ function EndpointRowActions({ endpoint, onEndpointClick, onDeleteClick }: Endpoivariant="destructive"data-testid="endpoint-action-delete"disabled={isFromConfig || !endpointId}- title={isFromConfig ? CONFIG_DELETE_HINT : undefined}onClick={() => !isFromConfig && endpointId && onDeleteClick(endpointId)}><Trash2 />Delete</DropdownMenuItem>+ {isFromConfig && (+ <div data-testid="endpoint-config-hint" className="px-2 py-1.5 text-xs text-muted-foreground">+ {CONFIG_ENDPOINT_HINT}+ </div>+ )}</DropdownMenuContent></DropdownMenu>);