9 views
-/https://github.com/berriai/litellm/issues/31447
GitHub · issue

#31447 [Bug]: Setting team_member_budget replaces the entire team metadata object

  • State: open
  • Author: @hspens
  • Labels: bug, proxy

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

### What happened

Writing a team's per-member budget (`team_member_budget` on `/team/new` or `/team/update`) causes LiteLLM to set `team_member_budget_id` into the team's `metadata` by **replacing the whole `metadata` dict**, rather than merging. Every pre-existing key — `managed_by`, guardrails config, etc. — is silently dropped.

A second, coupled problem makes it unrecoverable: a **metadata-only** `/team/update` (the natural way to restore a dropped key) **nulls the `team_member_budget` pointer** (`team_member_budget_table.budget_id` → `null`) and **ignores any caller-supplied `team_member_budget_id`** in the metadata payload. So there is no single request that preserves both a custom metadata key and the budget pointer — they overwrite each other on every write, producing an endless flip-flop for any controller that reconciles team metadata.

### Expected

- `team_member_budget_id` should be **merged** into `metadata`, not replace it — unrelated keys (`managed_by`, guardrails, …) must survive a budget write. - A metadata-only `/team/up…

GitHub resolver

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

Refresh page
vote history (5 events)
#0 of 0 · 31d19h9m58s ago — entered · #import:https:::github.com:berriai:litellm post #1724
Adding Unix-socket transport support spans configuration discovery, HTTP client behavior, platform compatibility, and integration testing, creating more implementation and regression risk than the localized team metadata/update consistency fix.
The right issue is harder because it spans coupled API update paths, persistence semantics, backward compatibility, and regression coverage; the left issue is primarily an external project-metadata clarification with little implementation scope.
Issue #34566 is substantially harder because it spans an authentication and authorization flow, credential binding, live permission evaluation, revocation behavior, failure-closed security handling, compatibility/backport concerns, and documentation. Issue #31447 is comparatively localized to correcting team metadata and budget-pointer update semantics with focused regression tests.
#27735 is harder because diagnosing and correcting stale budget enforcement likely spans spend accounting, cache consistency, concurrency, and multiple request paths, with greater regression and distributed-system risk. #31447 appears more localized to persistence/update semantics and can be addressed with focused merge behavior and regression tests.
#0 of 0 · 31d17h43m53s ago — current · #import:https:::github.com:berriai:litellm post #3157
Issue 31447 is harder because it spans persistence semantics, partial-update behavior, merge rules, and preserving coupled relational state across multiple API paths, requiring broader regression coverage. Issue 29168 is more narrowly contained to provider-specific schema translation and compatibility tests.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search