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(proxy/utils.py): fix model dump to exclude none values

Krrish Dholakia65097d595cd9
diff --git a/docs/my-website/docs/proxy/self_serve.md b/docs/my-website/docs/proxy/self_serve.md
index c18aee155d2..118cc7c8785 100644
--- a/docs/my-website/docs/proxy/self_serve.md
+++ b/docs/my-website/docs/proxy/self_serve.md
@@ -175,7 +175,7 @@ export PROXY_LOGOUT_URL="https://www.google.com"
### Set max budget for internal users
-Automatically apply budget per internal user when they sign up
+Automatically apply budget per internal user when they sign up. By default the table will be checked every 10 minutes, for users to reset. To modify this, [see this](./users.md#reset-budgets)
```yaml
litellm_settings:
diff --git a/litellm/proxy/_new_secret_config.yaml b/litellm/proxy/_new_secret_config.yaml
index c4f61258808..e4609ce75e3 100644
--- a/litellm/proxy/_new_secret_config.yaml
+++ b/litellm/proxy/_new_secret_config.yaml
@@ -12,5 +12,8 @@ litellm_settings:
max_internal_user_budget: 0.00001
internal_user_budget_duration: "3s" # reset every 3seconds
+general_settings:
+ proxy_budget_rescheduler_min_time: 1
+ proxy_budget_rescheduler_max_time: 2
diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py
index ffd354224c7..ea830c1363f 100644
--- a/litellm/proxy/utils.py
+++ b/litellm/proxy/utils.py
@@ -1853,7 +1853,9 @@ class PrismaClient:
batcher = self.db.batch_()
for idx, user in enumerate(data_list):
try:
- data_json = self.jsonify_object(data=user.model_dump())
+ data_json = self.jsonify_object(
+ data=user.model_dump(exclude_none=True)
+ )
except:
data_json = self.jsonify_object(data=user.dict())
batcher.litellm_usertable.upsert(