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
feat(ui): highlight Auto Router in the navbar announcement (#36315)
devin-ai-integration[bot]87736a767ca3
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/hooks/useHideAgentPlatformBanner.ts b/ui/litellm-dashboard/src/app/(dashboard)/hooks/useHideAutoRouterAnnouncement.tssimilarity index 67%rename from ui/litellm-dashboard/src/app/(dashboard)/hooks/useHideAgentPlatformBanner.tsrename to ui/litellm-dashboard/src/app/(dashboard)/hooks/useHideAutoRouterAnnouncement.tsindex 15b44a5abc6..c213c4834bc 100644--- a/ui/litellm-dashboard/src/app/(dashboard)/hooks/useHideAgentPlatformBanner.ts+++ b/ui/litellm-dashboard/src/app/(dashboard)/hooks/useHideAutoRouterAnnouncement.ts@@ -1,19 +1,18 @@-// hooks/useHideAgentPlatformBanner.tsimport { useSyncExternalStore } from "react";import { getLocalStorageItem, LOCAL_STORAGE_EVENT } from "@/utils/localStorageUtils";-export const HIDE_AGENT_PLATFORM_BANNER_KEY = "litellmHideAgentPlatformBanner";+export const HIDE_AUTO_ROUTER_ANNOUNCEMENT_KEY = "litellmHideAutoRouterAnnouncement";function subscribe(callback: () => void) {const onStorage = (e: StorageEvent) => {- if (e.key === HIDE_AGENT_PLATFORM_BANNER_KEY) {+ if (e.key === HIDE_AUTO_ROUTER_ANNOUNCEMENT_KEY) {callback();}};const onCustom = (e: Event) => {const { key } = (e as CustomEvent).detail;- if (key === HIDE_AGENT_PLATFORM_BANNER_KEY) {+ if (key === HIDE_AUTO_ROUTER_ANNOUNCEMENT_KEY) {callback();}};@@ -28,9 +27,9 @@ function subscribe(callback: () => void) {}function getSnapshot() {- return getLocalStorageItem(HIDE_AGENT_PLATFORM_BANNER_KEY) === "true";+ return getLocalStorageItem(HIDE_AUTO_ROUTER_ANNOUNCEMENT_KEY) === "true";}-export function useHideAgentPlatformBanner() {+export function useHideAutoRouterAnnouncement() {return useSyncExternalStore(subscribe, getSnapshot);}diff --git a/ui/litellm-dashboard/src/components/Navbar/NotificationsBell/NotificationsBell.test.tsx b/ui/litellm-dashboard/src/components/Navbar/NotificationsBell/NotificationsBell.test.tsxindex 4ead085d977..8894f2a714b 100644--- a/ui/litellm-dashboard/src/components/Navbar/NotificationsBell/NotificationsBell.test.tsx+++ b/ui/litellm-dashboard/src/components/Navbar/NotificationsBell/NotificationsBell.test.tsx@@ -1,5 +1,5 @@import { renderWithProviders, screen } from "../../../../tests/test-utils";-import { NotificationsBell, AGENT_PLATFORM_URL } from "./NotificationsBell";+import { NotificationsBell, AUTO_ROUTER_DOCS_URL } from "./NotificationsBell";import React from "react";import userEvent from "@testing-library/user-event";@@ -8,15 +8,15 @@ describe("NotificationsBell", () => {localStorage.clear();});- it("should open notifications with Agent Platform details and GitHub link", async () => {+ it("should open notifications with Auto Router details and docs link", async () => {const user = userEvent.setup();renderWithProviders(<NotificationsBell />);await user.click(screen.getByRole("button", { name: /^notifications$/i }));- expect(screen.getByText(/LiteLLM Agent Platform/i)).toBeInTheDocument();- const githubBtn = screen.getByRole("link", { name: /^GitHub$/i });- expect(githubBtn).toHaveAttribute("href", AGENT_PLATFORM_URL);- expect(githubBtn).toHaveAttribute("target", "_blank");- expect(githubBtn).toHaveAttribute("rel", "noopener noreferrer");+ expect(screen.getByText(/^LiteLLM Auto Router$/i)).toBeInTheDocument();+ const docsBtn = screen.getByRole("link", { name: /^read the docs$/i });+ expect(docsBtn).toHaveAttribute("href", AUTO_ROUTER_DOCS_URL);+ expect(docsBtn).toHaveAttribute("target", "_blank");+ expect(docsBtn).toHaveAttribute("rel", "noopener noreferrer");});it("should offer mark as read when announcement is unread", async () => {@@ -31,13 +31,13 @@ describe("NotificationsBell", () => {renderWithProviders(<NotificationsBell />);await user.click(screen.getByRole("button", { name: /^notifications$/i }));await user.click(screen.getByRole("button", { name: /^mark as read$/i }));- expect(localStorage.getItem("litellmHideAgentPlatformBanner")).toBe("true");+ expect(localStorage.getItem("litellmHideAutoRouterAnnouncement")).toBe("true");await user.click(screen.getByRole("button", { name: /^notifications$/i }));expect(screen.queryByRole("button", { name: /^mark as read$/i })).not.toBeInTheDocument();});it("should not show mark as read when previously dismissed", async () => {- localStorage.setItem("litellmHideAgentPlatformBanner", "true");+ localStorage.setItem("litellmHideAutoRouterAnnouncement", "true");const user = userEvent.setup();renderWithProviders(<NotificationsBell />);await user.click(screen.getByRole("button", { name: /^notifications$/i }));diff --git a/ui/litellm-dashboard/src/components/Navbar/NotificationsBell/NotificationsBell.tsx b/ui/litellm-dashboard/src/components/Navbar/NotificationsBell/NotificationsBell.tsxindex f57638a4e54..a3d5db4afd7 100644--- a/ui/litellm-dashboard/src/components/Navbar/NotificationsBell/NotificationsBell.tsx+++ b/ui/litellm-dashboard/src/components/Navbar/NotificationsBell/NotificationsBell.tsx@@ -1,38 +1,38 @@"use client";import {- HIDE_AGENT_PLATFORM_BANNER_KEY,- useHideAgentPlatformBanner,-} from "@/app/(dashboard)/hooks/useHideAgentPlatformBanner";+ HIDE_AUTO_ROUTER_ANNOUNCEMENT_KEY,+ useHideAutoRouterAnnouncement,+} from "@/app/(dashboard)/hooks/useHideAutoRouterAnnouncement";import { emitLocalStorageChange, setLocalStorageItem } from "@/utils/localStorageUtils";import { BellOutlined } from "@ant-design/icons";import { Badge, Button, Popover, Typography } from "antd";import React, { useState } from "react";-export const AGENT_PLATFORM_URL = "https://github.com/BerriAI/litellm-agent-platform";+export const AUTO_ROUTER_DOCS_URL = "https://docs.litellm.ai/docs/proxy/auto_routing";export const NotificationsBell: React.FC = () => {- const hidden = useHideAgentPlatformBanner();+ const hidden = useHideAutoRouterAnnouncement();const hasUnread = !hidden;const [open, setOpen] = useState(false);const markDismissed = () => {- setLocalStorageItem(HIDE_AGENT_PLATFORM_BANNER_KEY, "true");- emitLocalStorageChange(HIDE_AGENT_PLATFORM_BANNER_KEY);+ setLocalStorageItem(HIDE_AUTO_ROUTER_ANNOUNCEMENT_KEY, "true");+ emitLocalStorageChange(HIDE_AUTO_ROUTER_ANNOUNCEMENT_KEY);setOpen(false);};const content = (<div className="max-w-[280px]"><Typography.Title level={5} className="mt-0! mb-2!">- LiteLLM Agent Platform+ LiteLLM Auto Router</Typography.Title><Typography.Paragraph type="secondary" className="mb-3! text-sm leading-snug">- Open-source agent infra — sandboxes, durable sessions, and workers on AWS Fargate.+ Route every request to the cheapest model that can handle it, no prompt changes needed.</Typography.Paragraph><div className="flex flex-wrap items-center gap-2">- <Button type="primary" size="small" href={AGENT_PLATFORM_URL} target="_blank" rel="noopener noreferrer">- GitHub+ <Button type="primary" size="small" href={AUTO_ROUTER_DOCS_URL} target="_blank" rel="noopener noreferrer">+ Read the docs</Button>{hasUnread ? (<Button type="link" size="small" className="px-1!" onClick={markDismissed}>