mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-25 22:20:43 +00:00
Add TeamMembershipRepository::add_member and route PythonAuthHost.add_team_member through it in place of the /team/member_add endpoint call. One transaction puts the team on the user, inserts the member's own budget when it gets one, upserts the membership row and appends the user to the team's roster, under the advisory lock the management endpoints take on the team and then the user row lock, in their order. Python keeps what it owns around the write: resolve_member_budget_id decides the budget before it, writing through a table that hands the row to the transaction, and the cache evictions, the team members gauge and the audit log follow it. Database::transaction commits when its steps succeed and rolls back otherwise. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_jwt_auto_register.py | ||
| test_team_member_add.py | ||