#31447 [Bug]: Setting team_member_budget replaces the entire team metadata object
### 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…