From 7b3480a94ad199396fb8717f381ab8b0168de42e Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Fri, 17 Apr 2026 14:42:09 -0700 Subject: [PATCH] fix(team_delete): exclude budget_limits and default_team_member_models from deleted team record --- litellm/proxy/management_endpoints/team_endpoints.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/management_endpoints/team_endpoints.py b/litellm/proxy/management_endpoints/team_endpoints.py index bb86dd6ce8f..377adb216c2 100644 --- a/litellm/proxy/management_endpoints/team_endpoints.py +++ b/litellm/proxy/management_endpoints/team_endpoints.py @@ -2981,7 +2981,13 @@ def _transform_teams_to_deleted_records( if json_field in record and record[json_field] is not None: record[json_field] = json.dumps(record[json_field]) - for rel_key in ("litellm_model_table", "object_permission", "id"): + for rel_key in ( + "litellm_model_table", + "object_permission", + "id", + "budget_limits", # not in LiteLLM_DeletedTeamTable schema + "default_team_member_models", # not in LiteLLM_DeletedTeamTable schema + ): record.pop(rel_key, None) records.append(record)