mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-24 00:52:24 +00:00
Add an opt-in `allow_user_team_creation` flag (default False) that lets internal users create their own standalone teams instead of asking a proxy admin. When enabled, an INTERNAL_USER may call POST /team/new for a team with no organization_id; the existing handler already makes the creator the team admin. The route gate is scoped tightly: only INTERNAL_USER, only /team/new, only when the request carries no organization_id, and only when the flag is on. Org-scoped requests still fall through to the existing org-admin path so a user cannot mint a team inside an organization they do not belong to. A self-served team is clamped to the creating user's effective limits so it can never be wider than its creator. The clamp uses the tightest of the calling key's and the underlying user's tpm/rpm caps, and the user's own max_budget; the per-session UI key budget is deliberately excluded. Values seeded by default_team_params that exceed the caller's ceiling are clamped down rather than rejected, so the feature stays usable under an admin default that is higher than a given user's cap. The flag is surfaced in the Admin UI Settings so an admin can toggle it, and the Teams page shows Create Team to internal users when it is on. The create form no longer forces a non-admin into a required-but-empty organization dropdown. |
||
|---|---|---|
| .. | ||
| litellm-dashboard | ||
| Dockerfile | ||
| nginx.conf | ||