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 issue writing db (#13001)

Emerson Gomesdc8c14b504cb
diff --git a/litellm/proxy/db/db_spend_update_writer.py b/litellm/proxy/db/db_spend_update_writer.py
index e3338a84607..79312520407 100644
--- a/litellm/proxy/db/db_spend_update_writer.py
+++ b/litellm/proxy/db/db_spend_update_writer.py
@@ -872,7 +872,8 @@ class DBSpendUpdateWriter:
"model": transaction["model"],
"custom_llm_provider": transaction.get(
"custom_llm_provider"
- ),
+ )
+ or "",
"mcp_namespaced_tool_name": transaction.get(
"mcp_namespaced_tool_name"
)