litellm - 💡(How to fix) Fix [Bug]: model_max_budget silently discarded on /team/update (returns 200, stores empty {}) [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

-> 200 OK (no error)

Fix Action

Fixed

Code Example

curl -X POST /team/new \
  -H "Authorization: Bearer $MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"team_id": "test"}'

---

curl -X POST /team/update \
  -H "Authorization: Bearer $MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"team_id": "test", "model_max_budget": {"gpt-4": 10.0}}'
# -> 200 OK (no error)

---

SELECT model_max_budget FROM "LiteLLM_TeamTable" WHERE team_id='test';
-- -> {} (empty, value was discarded)

---

curl -X POST /user/update \
  -H "Authorization: Bearer $MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"user_id": "test-user", "model_max_budget": {"gpt-4": 10.0}}'

curl "/user/info?user_id=test-user" -H "Authorization: Bearer $MASTER_KEY"
# -> model_max_budget: {"gpt-4": 10.0}  (persisted correctly)

---

# /team/update response (200 but field not persisted):
{"team_id": "test", "model_max_budget": null, ...}

# Database:
model_max_budget = {}

# /team/list:
model_max_budget = null
RAW_BUFFERClick to expand / collapse

Check for existing issues

  • I have searched the existing issues and checked that my issue is not a duplicate.

What happened?

POST /team/update with model_max_budget returns 200 but stores {} (empty object) in the database. The field is silently discarded.

For comparison, POST /user/update with the same field persists correctly — so the field works at the user level but not at the team level.

Note: This is separate from the existing issue #25799 which covers model_max_budget not enforcing on keys. This bug is about the field not even being writable at the team level.

Steps to Reproduce

  1. Create a team:
curl -X POST /team/new \
  -H "Authorization: Bearer $MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"team_id": "test"}'
  1. Set model_max_budget on the team:
curl -X POST /team/update \
  -H "Authorization: Bearer $MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"team_id": "test", "model_max_budget": {"gpt-4": 10.0}}'
# -> 200 OK (no error)
  1. Check the database:
SELECT model_max_budget FROM "LiteLLM_TeamTable" WHERE team_id='test';
-- -> {} (empty, value was discarded)
  1. For comparison, set on a user (this works):
curl -X POST /user/update \
  -H "Authorization: Bearer $MASTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"user_id": "test-user", "model_max_budget": {"gpt-4": 10.0}}'

curl "/user/info?user_id=test-user" -H "Authorization: Bearer $MASTER_KEY"
# -> model_max_budget: {"gpt-4": 10.0} ✓ (persisted correctly)

Relevant log output

# /team/update response (200 but field not persisted):
{"team_id": "test", "model_max_budget": null, ...}

# Database:
model_max_budget = {}

# /team/list:
model_max_budget = null

What part of LiteLLM is this about?

Proxy

What LiteLLM version are you on ?

v1.85.0 (also confirmed on v1.83.10)

Twitter / LinkedIn details

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

litellm - 💡(How to fix) Fix [Bug]: model_max_budget silently discarded on /team/update (returns 200, stores empty {}) [1 pull requests]