mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-13 08:52:02 +00:00
* feat(ui): set per-threshold budget alert recipients on virtual keys Create Key and Edit Key get the threshold and recipients rows the team member budget alerts already use, writing metadata.max_budget_alert_emails. The helpers and the row editor move to key_team_helpers so the team form and both key forms share them. * test(ui): cover the empty metadata box path and drop a redundant payload case * fix(ui): keep comma-separated string alert recipients stored through the API The backend accepts a string of recipients per threshold, so Edit Key and the team form now load them as rows instead of dropping them and deleting the alert on the next save * fix(ui): keep the stored key alert map on saves that do not edit its rows Edit Key rebuilt max_budget_alert_emails from the rows on every save, so API-written entries the rows cannot show (a null recipient list, a list with a null, thresholds outside 1 to 100) were deleted by unrelated edits. The map is now rebuilt only when the rows were edited and otherwise sent back as stored * fix(ui): load null and mixed alert recipient lists as rows and drop a typed map on Create Key A null recipient list loads as an owner-only row and a mixed list keeps its strings, matching what the backend sends. Create Key now ignores a max_budget_alert_emails typed into the Metadata box, as Edit Key does, and the hint says thresholds replace the default 80% alert * fix(ui): keep Create Key alert rows when the Metadata box holds null * fix(ui): move typed alert maps into rows, keep hidden alert entries, hide alert rows from team admins A max_budget_alert_emails map typed into the Metadata box on Edit Key or Create Key now moves into the threshold rows on blur with a toast, the same way a tags array moves to the Tags field. Entries the rows cannot show stay in the JSON box. When the rows are edited, the saved map keeps the stored entries the rows cannot show (thresholds outside 1 to 100, non-numeric keys, unreadable values). Create Key keeps such typed entries too. Team admins editing a member's key no longer see the alert rows, since that save only accepts budget fields * fix(ui): let the Metadata box own key alert entries the threshold rows cannot show Edit Key now shows max_budget_alert_emails entries outside whole numbers 1 to 100 in the Metadata JSON box and saves them from the box as the admin left it, so they can be seen, edited and removed. Rows still own every entry they can show, and an untouched save sends the stored map unchanged * fix(ui): leave zero-padded alert thresholds to the Metadata box instead of duplicating a row * fix(ui): keep loading zero-padded team member alert thresholds as rows The canonical-key rule applies only to key alert maps, where the Metadata box holds entries the rows cannot show. The team form has no such fallback, so it keeps loading "080" as row 80 as it did before * fix(ui): let the Metadata box own a non-object max_budget_alert_emails value A string, list, number or null stored under max_budget_alert_emails stays in the Edit Key Metadata box, is saved back as the box holds it, and is stored as typed on Create Key. Threshold rows only own an object map, so rows the admin adds replace a non-object value * fix(ui): move typed alert thresholds into the rows when Edit Key saves without a blur Submit now moves a max_budget_alert_emails map typed into the Metadata box into the rows, as it already does for tags, and reads the edited fields at submit time so the moved rows are saved * refactor(ui): name the Edit Key submit handler |
||
|---|---|---|
| .. | ||
| fixtures | ||
| helpers | ||
| oidc | ||
| tests | ||
| constants.ts | ||
| globalSetup.ts | ||
| integration.config.ts | ||
| migration.serverRootPath.config.ts | ||
| migration.serverRootPath.globalSetup.ts | ||
| oidcSetup.ts | ||
| package-lock.json | ||
| package.json | ||
| playwright.config.ts | ||
| playwright.oidc.config.ts | ||
| run_e2e.sh | ||
| tsconfig.json | ||