litellm/ui/litellm-dashboard/src/components/team
devin-ai-integration[bot] d08746feb1
feat(proxy): email alerts at configured percentages of a team member budget (#42665)
* feat(proxy): email alerts at configured percentages of a team member budget

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(alerting): label team member budget crossings as team member budget

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(auth): cover the team member alert dispatch from _check_team_member_budget

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(email): drop the emoji from the team member budget alert template

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(proxy): ignore team member alert thresholds outside 1 to 100 on both the backend and the dashboard

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(proxy): bound team member alert threshold key length before int parsing

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(integration): drop the legacy covers marker from the team member alert test

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* fix(team): reject malformed team_member_max_budget_alert_emails on team writes

Thresholds outside 1-100, non-list recipients, and invalid emails now return 422 on
/team/new, /team/update and PATCH /team/{id} instead of being stored and silently
ignored. The value is stored canonically. Read-side LiteLLM_TeamTable is unchanged,
and the PATCH body stays a raw merge patch so a null threshold still deletes it.

* fix(auth): enforce and alert on team member budgets only in common_checks

The builder re-checked the team member budget inline before common_checks ran the same
check, so one request that crossed a team_member_max_budget_alert_emails threshold
dispatched two alerts. Drop the inline check; common_checks is the single authorization
point and already covers per-member rows, the team default member budget, zero-cost
skips and the cross-pod spend counter. Its 422 message now uses the TeamMember=user:team
form the builder and budget reservation already returned.

* Revert "fix(team): reject malformed team_member_max_budget_alert_emails on team writes"

This reverts commit 703e754b46.

* fix(alerting): keep BaseBudgetAlertType.get_event_message zero-arg

Requiring user_info broke existing callers and out-of-tree subclasses. The team member
label now comes from SlackAlerting.budget_alerts, so the interface and its Readme are
unchanged from main.

* fix(mcp): keep team member budget enforcement on the MCP OAuth auth dependency

The MCP OAuth dependency stops at _user_api_key_auth_builder and never reaches common_checks, so removing the builder's inline member budget check would have let over-budget members through there. Enforce it explicitly for that caller.

* fix(auth): keep main's team member budget enforcement, alert once per request

Restore the builder's team member budget check and 422 message exactly as on main and drop the MCP-only gate. The builder sends the member alert only on the request it rejects; common_checks sends it for requests that get past the builder, so no request alerts twice.

* test(integration): read team member alert deliveries without a shared accumulator

* test(integration): match team member alert deliveries by subject so other alerts cannot race the count

* refactor(proxy): build the team member alert threshold config without mutable collections

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* refactor(proxy): collapse the alert recipient isinstance checks into one call

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

* test(integration): read the SMTP sink through lock-guarded snapshots and assert the exact deliveries

---------

Co-authored-by: ryan <ryan@berri.ai>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-26 02:42:45 +00:00
..
AvailableTeamsPanel.test.tsx refactor(ui): migrate available teams table onto shared DataTable 2026-07-20 20:08:42 -07:00
AvailableTeamsPanel.tsx refactor(ui): codemod every toast call site onto lib/toast and delete the antd-era facades (#37253) 2026-08-18 18:24:49 +00:00
AvailableTeamsTable.tsx fix(ui): make Admin UI table pagination honor the selected page size 2026-09-03 23:59:58 +00:00
AvailableTeamsTableColumns.tsx refactor(ui): migrate available teams table onto shared DataTable 2026-07-20 20:08:42 -07:00
EditLoggingSettings.tsx
EditMembership.integration.test.tsx feat(ui): temporary budget increase controls for team members 2026-09-17 18:56:30 +00:00
EditMembership.test.tsx Fix select in edit membership 2025-12-04 21:59:43 -08:00
EditMembership.tsx feat(ui): temporary budget increase controls for team members 2026-09-17 18:56:30 +00:00
GuardrailsSelect.tsx refactor(ui): migrate the teams form graph off antd Form onto react-hook-form (#37417) 2026-08-18 22:37:04 -07:00
LoggingSettings.test.tsx feat(arize): per-team success and error sampling rates for the Arize AX callback (#42383) 2026-09-22 11:21:40 -05:00
LoggingSettings.tsx fix(otel v2): reject a langfuse_span_scope that conflicts with another callback entry on the same team or key 2026-09-19 23:16:54 +00:00
member_permissions.test.tsx refactor(ui): migrate key info and permissions views off antd and tremor 2026-08-14 03:30:31 -07:00
member_permissions.tsx refactor(ui): map hardcoded Tailwind palette classes onto semantic tokens (#37576) 2026-08-19 22:11:44 -07:00
memberBudgetReset.test.ts feat(ui): offer reset of custom member budgets when team default changes (#42835) 2026-09-24 17:28:48 -07:00
memberBudgetReset.ts feat(ui): offer reset of custom member budgets when team default changes (#42835) 2026-09-24 17:28:48 -07:00
memberFormValues.test.ts feat(ui): temporary budget increase controls for team members 2026-09-17 18:56:30 +00:00
memberFormValues.ts feat(ui): temporary budget increase controls for team members 2026-09-17 18:56:30 +00:00
MyUserTab.test.tsx refactor(ui): migrate search and user controls to shadcn (#36694) 2026-08-13 06:43:30 +00:00
MyUserTab.tsx refactor(ui): codemod the antd Tooltips outside form files onto the shadcn atom (#37402) 2026-08-19 02:14:37 +00:00
permission_definitions.test.tsx added option to allow team user to see logs of team 2026-04-09 17:43:20 -07:00
permission_definitions.tsx feat(auto-router): allow opted-in team members to manage their routers 2026-09-14 23:56:55 -07:00
ResetMemberBudgetsDialog.test.tsx feat(ui): offer reset of custom member budgets when team default changes (#42835) 2026-09-24 17:28:48 -07:00
ResetMemberBudgetsDialog.tsx feat(ui): offer reset of custom member budgets when team default changes (#42835) 2026-09-24 17:28:48 -07:00
tabVisibilityUtils.test.ts style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
tabVisibilityUtils.ts style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00
teamAdminEditAccess.test.ts feat(proxy): let team admins manage projects via team_admin_editable_team_fields 2026-09-19 01:02:50 +00:00
teamAdminEditAccess.ts feat(proxy): let team admins update member key budgets when enabled (#42555) 2026-09-25 01:54:52 +00:00
TeamAdminSettingsForm.test.tsx feat(proxy): let team admins edit rpm_limit and max_budget when enabled 2026-09-16 17:25:36 -07:00
TeamAdminSettingsForm.tsx feat(proxy): let team admins edit rpm_limit and max_budget when enabled 2026-09-16 17:25:36 -07:00
TeamInfo.integration.test.tsx feat(ui): offer reset of custom member budgets when team default changes (#42835) 2026-09-24 17:28:48 -07:00
TeamInfo.test.tsx feat(proxy): email alerts at configured percentages of a team member budget (#42665) 2026-09-26 02:42:45 +00:00
TeamInfo.tsx feat(proxy): email alerts at configured percentages of a team member budget (#42665) 2026-09-26 02:42:45 +00:00
teamMemberBudgetAlertEmails.test.ts feat(proxy): email alerts at configured percentages of a team member budget (#42665) 2026-09-26 02:42:45 +00:00
teamMemberBudgetAlertEmails.ts feat(proxy): email alerts at configured percentages of a team member budget (#42665) 2026-09-26 02:42:45 +00:00
TeamMemberTab.test.tsx feat(ui): offer reset of custom member budgets when team default changes (#42835) 2026-09-24 17:28:48 -07:00
TeamMemberTab.tsx feat(ui): offer reset of custom member budgets when team default changes (#42835) 2026-09-24 17:28:48 -07:00
teamModelAccess.test.ts fix(ui): let access groups be a team's only model source, with hover provenance (#36234) 2026-08-07 17:45:50 -07:00
teamModelAccess.ts fix(ui): name the granting access group on hover instead of an Inherited tag 2026-09-03 10:20:10 -07:00
TeamVirtualKeysTable.test.tsx fix(ui): name the popover copy buttons after the field they copy 2026-09-10 18:40:05 -07:00
TeamVirtualKeysTable.tsx feat(ui): link the entity cells on the team detail page's keys table 2026-09-10 18:38:31 -07:00
useMemberBudgetReset.test.tsx feat(ui): offer reset of custom member budgets when team default changes (#42835) 2026-09-24 17:28:48 -07:00
useMemberBudgetReset.ts feat(ui): offer reset of custom member budgets when team default changes (#42835) 2026-09-24 17:28:48 -07:00
useMyTeamMember.ts style(ui): run prettier --write across the dashboard (#29622) 2026-06-04 11:37:54 -07:00