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(lint): clear the one-over LIT002 and inline-object budget hits

Oliver Jensen38c04638ef97
diff --git a/litellm/proxy/auth/login_utils.py b/litellm/proxy/auth/login_utils.py
index 2bf08414e98..16b4ef7380c 100644
--- a/litellm/proxy/auth/login_utils.py
+++ b/litellm/proxy/auth/login_utils.py
@@ -84,11 +84,12 @@ async def screen_login_password_for_breach(
return False
breached: Final = await is_password_breached(password, general_settings, client)
checked_at: Final = datetime.now(timezone.utc)
- update_data: Final[prisma_types.LiteLLM_UserTableUpdateInput] = (
- {"last_breach_check_at": checked_at, "password_reset_required": True}
- if breached
- else {"last_breach_check_at": checked_at}
- )
+ breached_update: Final[prisma_types.LiteLLM_UserTableUpdateInput] = {
+ "last_breach_check_at": checked_at,
+ "password_reset_required": True,
+ }
+ recheck_update: Final[prisma_types.LiteLLM_UserTableUpdateInput] = {"last_breach_check_at": checked_at}
+ update_data: Final = breached_update if breached else recheck_update
find_user: Final[prisma_types.LiteLLM_UserTableWhereInput] = {"user_id": user_id}
try:
await UserRepository(prisma_client).table.update(where=find_user, data=update_data)
diff --git a/ui/litellm-dashboard/src/app/(dashboard)/layout.test.tsx b/ui/litellm-dashboard/src/app/(dashboard)/layout.test.tsx
index c930652cca0..ae6575e2349 100644
--- a/ui/litellm-dashboard/src/app/(dashboard)/layout.test.tsx
+++ b/ui/litellm-dashboard/src/app/(dashboard)/layout.test.tsx
@@ -131,12 +131,13 @@ describe("(dashboard) Layout", () => {
});
it("routes a session flagged password_reset_required to the change-password page", async () => {
- document.cookie = `token=${sessionCookie({
+ const flaggedClaims = {
user_id: "flagged-user",
key: "sk-session",
login_method: "username_password",
password_reset_required: true,
- })}; Path=/`;
+ };
+ document.cookie = `token=${sessionCookie(flaggedClaims)}; Path=/`;
render(
<AuthProvider>