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]

Merge branch 'main' into litellm_use_redis_for_updates

Ishaan Jaff7e8a02099c0f
diff --cc litellm/proxy/_types.py
index 24beef6b63f,3c22aaa601b..e7d6bec0044
--- a/litellm/proxy/_types.py
+++ b/litellm/proxy/_types.py
@@@ -2733,16 -2718,4 +2733,17 @@@ class DailyUserSpendTransaction(TypedDi
prompt_tokens: int
completion_tokens: int
spend: float
+ api_requests: int
+
+
+class DBSpendUpdateTransactions(TypedDict):
+ """
+ Internal Data Structure for buffering spend updates in Redis or in memory before committing them to the database
+ """
+
+ user_list_transactions: Optional[Dict[str, float]]
+ end_user_list_transactions: Optional[Dict[str, float]]
+ key_list_transactions: Optional[Dict[str, float]]
+ team_list_transactions: Optional[Dict[str, float]]
+ team_member_list_transactions: Optional[Dict[str, float]]
+ org_list_transactions: Optional[Dict[str, float]]
diff --cc litellm/proxy/proxy_server.py
index 91d700b8439,7c9b60d5cbd..89c15f413db
--- a/litellm/proxy/proxy_server.py
+++ b/litellm/proxy/proxy_server.py
@@@ -24,6 -24,6 +24,7 @@@ from typing import
get_type_hints,
)
++from litellm.constants import DEFAULT_MAX_RECURSE_DEPTH
from litellm.types.utils import (
ModelResponse,
ModelResponseStream,