Skip to content

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]

fix(ui): fix CI failures on upgrade banner PR

Kerry Lu7edc79583139
diff --git a/litellm/proxy/ui_crud_endpoints/latest_release_endpoints.py b/litellm/proxy/ui_crud_endpoints/latest_release_endpoints.py
index c0306e65aee..4a01728dfe1 100644
--- a/litellm/proxy/ui_crud_endpoints/latest_release_endpoints.py
+++ b/litellm/proxy/ui_crud_endpoints/latest_release_endpoints.py
@@ -3,7 +3,7 @@ from collections import Counter
from collections.abc import Awaitable, Mapping
from dataclasses import dataclass
from types import MappingProxyType
-from typing import Final, Literal, Protocol
+from typing import Annotated, Final, Literal, Protocol
import httpx
from fastapi import APIRouter, Depends
@@ -124,8 +124,8 @@ async def get_latest_release_info(
response_model=LatestReleaseInfo | None,
)
async def latest_release_info(
- client: _AsyncGetClient = Depends(_default_client),
- cache: InMemoryCache = Depends(_default_cache),
+ client: Annotated[_AsyncGetClient, Depends(_default_client)],
+ cache: Annotated[InMemoryCache, Depends(_default_cache)],
) -> LatestReleaseInfo | None:
"""
Latest stable LiteLLM GitHub release with its PR count split into new features, bug fixes and other updates.
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/layout.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/layout.test.tsx
index 7f1f4cc4bd5..e1fb6e21596 100644
--- a/ui/litellm-dashboard/src/app/(dashboard)/layout.test.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/layout.test.tsx
@@ -37,6 +37,10 @@ vi.mock("@/components/UserBanner", () => ({
UserBanner: () => null,
}));
+vi.mock("@/components/UpgradeBanner", () => ({
+ UpgradeBanner: () => null,
+}));
+
vi.mock("@/contexts/ThemeContext", () => ({
ThemeProvider: ({ children }: { children: React.ReactNode }) => <>{children}</>,
}));
diff --git a/ui/litellm-dashboard/src/components/UpgradeBanner.test.tsx b/ui/litellm-dashboard/src/components/UpgradeBanner.test.tsx
index be031ea8ad5..6aa384600c8 100644
--- a/ui/litellm-dashboard/src/components/UpgradeBanner.test.tsx
+++ b/ui/litellm-dashboard/src/components/UpgradeBanner.test.tsx
@@ -28,9 +28,8 @@ describe("describeRelease", () => {
});
it("singularises counts of one", () => {
- expect(describeRelease({ ...RELEASE, new_features: 1, bug_fixes: 1, other_updates: 1 })).toBe(
- "1 new feature, 1 fix, and 1 other update",
- );
+ const singularCounts = { ...RELEASE, new_features: 1, bug_fixes: 1, other_updates: 1 };
+ expect(describeRelease(singularCounts)).toBe("1 new feature, 1 fix, and 1 other update");
});
});