Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix(team_delete): exclude budget_limits and default_team_member_models from deleted team record

Ishaan Jaffer7b3480a94ad1
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)