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]

style(spend): format CloudZero and Focus recovery row coercion

Cursor Agent4db370e85194
diff --git a/litellm/integrations/cloudzero/database.py b/litellm/integrations/cloudzero/database.py
index 6a63868a08b..e630bd85114 100644
--- a/litellm/integrations/cloudzero/database.py
+++ b/litellm/integrations/cloudzero/database.py
@@ -101,7 +101,9 @@ class LiteLLMDatabase:
usage_rows: Final = (
db_response.to_dicts()
if isinstance(db_response, pl.DataFrame)
- else db_response if isinstance(db_response, list) else []
+ else db_response
+ if isinstance(db_response, list)
+ else []
)
# v1.99 double-hashed DailyUserSpend.api_key values miss the
# VerificationToken join above; recover alias/team for those rows.
diff --git a/litellm/integrations/focus/database.py b/litellm/integrations/focus/database.py
index da6458c9369..02b1e9e944b 100644
--- a/litellm/integrations/focus/database.py
+++ b/litellm/integrations/focus/database.py
@@ -103,7 +103,9 @@ class FocusLiteLLMDatabase:
usage_rows: Final = (
db_response.to_dicts()
if isinstance(db_response, pl.DataFrame)
- else db_response if isinstance(db_response, list) else []
+ else db_response
+ if isinstance(db_response, list)
+ else []
)
# v1.99 double-hashed DailyUserSpend.api_key values miss the
# VerificationToken join above; recover alias/team for those rows.