6 views
-/https://github.com/berriai/litellm/issues/29066
GitHub · issue

#29066 [Bug] team/member_update with max_budget_in_team=null leaves litellm_budget_table null, failing Pydantic validation on every subsequent request from that team's members

  • State: open
  • Author: @eoinverling

### Description

`POST /team/member_update` accepts `max_budget_in_team: null` and clears the budget link on the underlying `LiteLLM_TeamMembership` row (both `budget_id` and the joined `litellm_budget_table` become null). The update returns HTTP 200 and `/team/info` reflects the cleared state. The DB schema permits this — `litellm_budget_table` is a nullable FK.

The `LiteLLM_TeamMembership` Pydantic model in v1.85+, however, treats `litellm_budget_table` as **required** (not `Optional`). Any subsequent request from a member of the affected team fails with:

``` 1 validation error for LiteLLM_TeamMembership litellm_budget_table Field required [type=missing, input_value="REDACTED_BY_LITELLM", input_type=dict] For further information visit https://errors.pydantic.dev/2.12/v/missing ```

The error happens in the auth/load path on every request, so **every virtual key belonging to a member of the affected team is bricked** until the member budget is set back to a non-null value. This includes existing keys created before the membership was cleared.

### Repro

1. Create a team with a pool budget:

```bash curl -X POST $LITELLM/team/new \ -H "Authorization: Bearer $MASTER_KEY" …

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (3 events)
#0 of 0 · 31d19h4m19s ago — entered · #import:https:::github.com:berriai:litellm post #1793
30825 is harder because it requires redesigning callback-specific metadata propagation and preserving compatibility across multiple logging integrations, whereas 29066 is comparatively localized to nullable model handling and related validation tests.
28003 requires cross-cutting observability-pipeline investigation, external API contract validation, and careful handling of nonstandard events, making regression risk higher; 29066 is comparatively localized to aligning a persistence/model contract with targeted auth-path tests.
#0 of 0 · 31d17h58m54s ago — current · #import:https:::github.com:berriai:litellm post #2880
#29066 is harder because it crosses persistence, Pydantic modeling, and the request authorization path, with broader regression risk; #35214 is a relatively localized provider-translation fix with narrower testing scope.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search