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
address greptile review feedback (greploop iteration 2)
yuneng-jiang70ef4d0d69e3
diff --git a/litellm/proxy/db/db_spend_update_writer.py b/litellm/proxy/db/db_spend_update_writer.pyindex e2d365ee465..4a8c9d33d9f 100644--- a/litellm/proxy/db/db_spend_update_writer.py+++ b/litellm/proxy/db/db_spend_update_writer.py@@ -225,7 +225,8 @@ class DBSpendUpdateWriter:verbose_proxy_logger.debug("Runs spend update on all tables")except Exception:verbose_proxy_logger.error(- "Spend tracking - update_database failed. All spend updates for this request will be lost. "+ "Spend tracking - update_database failed. Spend log insertion or daily transaction enqueue "+ "may not have completed for this request. ""response_cost=%s, token=%s, user_id=%s, team_id=%s, org_id=%s, end_user_id=%s - %s",response_cost,token,diff --git a/litellm/proxy/db/db_transaction_queue/redis_update_buffer.py b/litellm/proxy/db/db_transaction_queue/redis_update_buffer.pyindex 85e139b4de0..027f3e639e3 100644--- a/litellm/proxy/db/db_transaction_queue/redis_update_buffer.py+++ b/litellm/proxy/db/db_transaction_queue/redis_update_buffer.py@@ -101,7 +101,7 @@ class RedisUpdateBuffer:key=redis_key,values=list_of_transactions,)- verbose_proxy_logger.info(+ verbose_proxy_logger.debug("Spend tracking - pushed spend updates to Redis buffer. ""redis_key=%s, buffer_size=%s",redis_key,@@ -118,7 +118,6 @@ class RedisUpdateBuffer:redis_key,str(e),)- raiseasync def store_in_memory_spend_updates_in_redis(self,