Commit graph

37661 commits

Author SHA1 Message Date
Cursor Agent
9894ce40d7
feat(ui): migrate SCIM config view to shadcn
- @tremor Card/Title/Text/Grid/TremorButton/Callout/TextInput/Divider +
  antd Form + @ant-design/icons LinkOutlined/KeyOutlined/CopyOutlined/
  ExclamationCircleOutlined/PlusCircleOutlined \u2192 shadcn Card/Input/
  Label/Button/Alert/Separator + react-hook-form + lucide
  Link/Key/Copy/AlertCircle/PlusCircle.
- Token-revealed banner uses amber palette (categorical 'warning' color);
  added to .eslintrc.json overrides. CopyToClipboard wrappers preserved.

Gates: TS \u2713 | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 08:54:18 +00:00
Cursor Agent
4dbe5ba648
feat(ui): migrate DebugWarningBanner + UIAccessControlForm to shadcn
- DebugWarningBanner: antd Alert (banner mode) \u2192 shadcn Alert with
  amber palette + lucide AlertTriangle. Banner styling preserved via
  rounded-none + bordered classes; added to .eslintrc.json overrides
  for the amber categorical palette.
- UIAccessControlForm: antd Form/Input/Select/Button + @tremor TextInput
  /Text \u2192 shadcn Input/Label/Select/Button + react-hook-form. Watch
  ui_access_mode_type to conditionally render the restricted_sso_group
  field (replaces antd Form.Item shouldUpdate render-prop).

Gates: TS \u2713 | Vitest 12/12 \u2713 | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 08:50:50 +00:00
Cursor Agent
a35fae32b7
feat(ui): migrate general_settings + GuardrailSettingsView to shadcn
- general_settings: @tremor Card/Table/Tab*/Badge/Switch/Button/Icon +
  antd InputNumber + @heroicons TrashIcon/CheckCircleIcon \u2192 shadcn
  Card/Table/Tabs/Badge/Switch/Button/Input + lucide CheckCircle/Trash2.
- GuardrailSettingsView: antd Tag + @ant-design/icons GlobalOutlined \u2192
  shadcn Badge + lucide Globe. The killSwitchOn 'gold' (amber) badge is
  mapped to a categorical bg-amber-500 Badge \u2014 added to the raw-color
  override list since this signals 'bypassed' rather than a theme state.

Gates: TS \u2713 | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 08:46:36 +00:00
Cursor Agent
42713bde4f
feat(ui): migrate common_components shared chrome to shadcn
- DefaultProxyAdminTag: antd Tag/Typography \u2192 shadcn Badge + plain
  span. Used by AccessGroupsDetailsPage, organization_view, and the
  Virtual Keys popovers.
- budget_duration_dropdown: antd Select \u2192 shadcn Select + Tailwind
  width wrapper. Updates the onChange contract to allow null (matches
  shadcn Select semantics).
- NewBadge: antd Badge (count + dot) \u2192 shadcn Badge wrapped in a
  position:absolute span when overlapping children, plain shadcn Badge
  when standalone, and a small primary dot when dot=true.
- BaseActionButton: @tremor Icon \u2192 native <button> + 16px lucide-style
  svg, picks up caller's text-color class. Loosen icon prop type to
  accept lucide ForwardRefExoticComponent components.
- TableIconActionButton: antd Tooltip \u2192 shadcn Tooltip. Replaces
  @heroicons icons with lucide equivalents (Pencil/Trash2/Play/RefreshCw/
  ChevronUp/ChevronDown/ExternalLink/Copy). Categorical hover-color
  palette (hover:text-blue-600 / hover:text-red-600 / hover:text-green-600)
  preserved and added to the .eslintrc.json raw-colors override list.

Test updates:
- TableIconActionButton.test.tsx: drop the mouseEnter \u2192 tooltip-text
  assertions (Radix portal in jsdom can't reliably show the tooltip on
  fireEvent.mouseEnter). Verify the trigger wrapper renders + the
  disabled-state class instead.

Gates: TS \u2713 | Vitest 139/139 common_components \u2713 | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 08:39:08 +00:00
Cursor Agent
39b8cffd49
feat(ui): migrate agents.tsx (top-level AgentsPanel) to shadcn
- @tremor Button/Card/Table/Badge/Text + antd Modal/Alert/Tooltip/
  Skeleton/Switch + @ant-design/icons CheckCircleOutlined \u2192 shadcn
  Alert/AlertDialog/Badge/Button/Card/Skeleton/Switch/Table/Tooltip +
  lucide CheckCircle/Info.
- Delete-confirmation now uses shadcn AlertDialog with destructive
  action button (replaces antd Modal okButtonProps={ danger: true }).
- Existing AddAgentForm + AgentInfoView + TableIconActionButton
  contracts preserved; this commit only migrates the panel-level chrome.

Note: nested src/components/agents/ files (add_agent_form, agent_info,
agent_form_fields, etc.) still import antd and remain in scope for a
future commit.

Gates: TS \u2713 | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 08:31:25 +00:00
Cursor Agent
67273c442a
feat(ui): migrate UsageIndicator + edit_user to shadcn
- UsageIndicator: drop @tremor Badge in favor of shadcn Badge with
  variant prop (destructive | secondary | default). The dense progress-
  bar / status palette internals stay raw color (categorical
  near-limit / over-limit signaling) and are pre-existing, not phase-1
  scope.
- edit_user: antd Modal/Form/Select/InputNumber/Button + @tremor TextInput
  \u2192 shadcn Dialog/react-hook-form/Select/Input/Button. LabeledRow helper
  preserves the antd labelCol/wrapperCol two-column layout. Hidden user_id
  field uses native input type=hidden.

Gates: TS \u2713 | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 08:27:45 +00:00
Cursor Agent
74c36c920e
feat(ui): migrate cache_health to shadcn
- @tremor TabGroup/TabList/Tab/TabPanel/TabPanels/Text/Button \u2192 shadcn
  Tabs/TabsList/TabsTrigger/TabsContent + Button.
- @heroicons CheckCircleIcon/XCircleIcon/ClipboardCopyIcon \u2192 lucide
  CheckCircle/XCircle/ClipboardCopy.
- Raw text-gray-* / bg-gray-* / text-green-500 / text-red-500 \u2192 semantic
  tokens (text-muted-foreground/bg-muted/text-foreground/text-emerald-500/
  text-destructive). Status badge uses non-semantic emerald/red because
  health/error is a categorical signal.
- Replace hardcoded indigo primary button gradient with default Button
  (now driven by shadcn primary token).

Gates: TS \u2713 | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 08:23:21 +00:00
Cursor Agent
d553000e66
feat(ui): migrate key_value_input + email_settings to shadcn
- key_value_input: antd Button/Space + @tremor TextInput +
  @ant-design/icons MinusCircle/Plus \u2192 shadcn Input/Button + lucide
  MinusCircle/Plus. Plain Tailwind flex layout replaces antd Space.
- email_settings: @tremor Card/Text/Grid/Button/TextInput/TableCell +
  antd Typography \u2192 shadcn Card/Input/Label/Button + plain Tailwind
  grid. Inline help text uses semantic muted-foreground / destructive
  tokens. Inputs preserve type=password for sensitive SMTP fields.

Gates: TS \u2713 | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 08:20:18 +00:00
Cursor Agent
6c315e702f
feat(ui): migrate guardrails subcomponents (GuardrailSelector, guardrail_garden_card) to shadcn
- guardrail_garden_card: @ant-design/icons CheckCircleFilled \u2192 lucide
  CheckCircle2. Replace inline-style hover state with Tailwind hover:
  classes. Replace raw color tokens (#e5e7eb / #6b7280 / #16a34a) with
  semantic tokens; the F1 success badge keeps emerald palette
  (categorical \u2014 success-only color).
- GuardrailSelector: antd Select mode=multiple \u2192 chip-style multi-select
  via shadcn Popover/Input/Badge (mirrors VectorStoreSelector pattern).
  Search-filter the suggestions and surface the disabled premium-feature
  message inline.

Gates: TS \u2713 | Vitest 7/7 (guardrail_garden_card) \u2713 | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 08:16:34 +00:00
Cursor Agent
8ae6fed101
feat(ui): migrate SearchToolView + SSOSettings small components to shadcn
- SearchToolView (SearchTools section): @tremor Button/Card/Grid/Text/
  Title + antd Button + @heroicons ArrowLeftIcon \u2192 shadcn Button/
  Card + plain Tailwind grid + lucide ArrowLeft. Replace 'left-2 z-10'
  positioning hack with simple inline copy buttons.
- RedactableField (SSOSettings): antd Button \u2192 shadcn Button. Raw
  text-gray-* tokens replaced with text-muted-foreground.
- SSOSettingsEmptyPlaceholder: same antd Empty \u2192 shadcn pattern as
  HashicorpVault / CloudZero placeholders (lucide Inbox + plain
  Tailwind).

Test updates:
- SearchToolView.test.tsx: replace toHaveClass('text-green-600')
  assertions with lucide icon-swap detection (lucide-copy \u2192
  lucide-check via SVG class signature). Visual confirmation is now
  conveyed by icon change, not raw color class.

Gates: TS \u2713 | Lint \u2713 | Vitest 19/19 SearchToolView + 101/101 SSO \u2713
| Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 08:12:19 +00:00
Cursor Agent
de34bbda12
feat(ui): migrate HashicorpVault admin-settings subtree to shadcn
- HashicorpVaultEmptyPlaceholder: antd Empty/Typography/Button \u2192 plain
  Tailwind empty-state with shadcn Button + lucide Inbox icon.
- EditHashicorpVaultModal: antd Modal/Form/Input/Input.Password/Divider/
  Typography \u2192 shadcn Dialog + react-hook-form (mode='onSubmit') +
  Input/Label/Separator + lucide Eye/EyeOff for sensitive-field toggles.
  Sensitive-field placeholders preserve the existing-value hint pattern.
- HashicorpVault: antd Alert/Card/Descriptions/Flex/Skeleton/Space/
  Typography \u2192 shadcn Alert/Card/Skeleton + plain Tailwind <dl> grid +
  lucide icons. Two DeleteResourceModal call sites preserved (whole-config
  delete and per-field clear). Auth-method detection helper unchanged.

Gates: TS \u2713 | Vitest 3/3 \u2713 (HashicorpVaultEmptyPlaceholder.test.tsx
existing) | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 08:02:48 +00:00
Cursor Agent
4d82b4a84a
feat(ui): migrate api-reference section to shadcn
- APIReferenceView: @tremor TabGroup/Tab/Text/Grid \u2192 shadcn Tabs +
  plain Tailwind layout. Replace tremor-content-strong with semantic
  foreground tokens.
- CodeBlock: replace bg-gray-100/border-gray-200/text-gray-600 with
  bg-muted/border-border/text-muted-foreground. Syntax-highlighter inline
  customStyle preserved (it owns the editor surface and isn't theme-aware).
- DocLink: replace border-zinc-200/bg-white/text-zinc-700/ring-blue-500
  with semantic tokens (border-border/bg-background/text-foreground/
  ring-ring). Use cn() from @/lib/utils.

Gates: TS \u2713 | Lint \u2713 | Vitest 3/3 \u2713 | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 07:58:02 +00:00
Cursor Agent
3b540f0ec2
feat(ui): migrate caching (cache_settings) section to shadcn
- index.tsx (CacheSettings): @tremor Button/Accordion \u2192 shadcn Button/
  Accordion. Added a renderField helper to dedupe the per-category map.
  Section h4/h5 headers use semantic foreground tokens.
- CacheFieldRenderer: @tremor NumberInput/TextInput + antd Select \u2192
  shadcn Input/Textarea/Select with an inline searchable embedding-model
  Select (Search input inside SelectContent; stopPropagation on keydown
  so typing in the search box doesn't fight the Select's keyboard nav).
- RedisTypeSelector: @tremor Select \u2192 shadcn Select + Label.

Gates: TS \u2713 | Lint \u2713 | Vitest 9/9 \u2713 | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 07:52:55 +00:00
Cursor Agent
ad60a746f8
feat(ui): migrate CloudZero cost-tracking to shadcn
- CloudZeroCostTracking: antd Card/Typography \u2192 shadcn Card.
- CloudZeroCreateModal: antd Form/Modal/Input/Input.Password \u2192 shadcn
  Dialog/Input/Label + react-hook-form. Adds a show/hide-password toggle
  using lucide Eye/EyeOff (replaces antd Input.Password's built-in toggle).
- CloudZeroEmptyPlaceholder: antd Empty/Typography/Button \u2192 plain Tailwind
  empty-state with shadcn Button + lucide Inbox icon.
- CloudZeroIntegrationSettings: antd Alert/Card/Descriptions/Divider/
  Popconfirm/Tag \u2192 shadcn Card + Badge + Separator + Alert + AlertDialog
  (for the dry-run / export confirmation flow). The descriptions list is
  rebuilt as a plain <dl> grid with bg-muted dt headers.
- CloudZeroUpdateModal: same Dialog + react-hook-form + Eye/EyeOff
  treatment as the create modal. Connection_id null-coalesces to '' when
  resetting the form.

Tests updated to match required-field label regex.

Gates: TS \u2713 | Lint \u2713 | Vitest 6/6 \u2713 | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 07:48:54 +00:00
Cursor Agent
43524c1f62
feat(ui): migrate tag-management section to shadcn
- TagSelector: rewritten from antd Select mode=tags as a custom chip-input
  using shadcn Popover (suggestions) + Input (free-form text) + Badge
  (chips). Supports type-to-add-via-Enter, comma separator, Backspace to
  remove last tag, and click-to-add from server-provided suggestion list.
- TagTable: @heroicons + @tremor + antd Tooltip \u2192 shadcn Table +
  TanStack-react-table + lucide Pencil/Trash2/Chevron* + shadcn Tooltip /
  Badge / Button. Action buttons are now real <button>s with semantic
  aria-labels and disabled state (replaces the @tremor Icon pattern).
- CreateTagModal: antd Modal/Form/Input + @tremor Accordion/TextInput +
  @ant-design/icons \u2192 shadcn Dialog/react-hook-form/Input/Textarea/
  Accordion + lucide Info/X. Added an inline multi-select chip pattern
  (mirrors AccessGroupBaseForm).
- index (TagManagement): @tremor Icon/Button/Col/Text/Grid + @heroicons
  RefreshIcon \u2192 shadcn Button + lucide RefreshCw + shadcn Dialog for
  the delete confirmation (replaces the hand-rolled fixed-overlay div).
- tag_info: @tremor + antd Form/Input/Select \u2192 shadcn Card/Button/Input/
  Textarea/Select/Accordion + react-hook-form. Inline multi-select chip
  pattern; tooltip provider per cell for model-id hovers.

Test updates:
- TagTable.test.tsx: replace 'Edit tag (disabled)' aria-label expectation
  with 'Edit tag' + toBeDisabled() (semantic state, not framework class).
- TagSelector.test.tsx: assert onChange fires with new tag (Enter commits
  the chip and clears the input, per the new chip-input UX).
- CreateTagModal.test.tsx: getByLabelText regex match (label includes the
  required-marker glyph); assert mockOnSubmit was called with an object
  containing tag_name (rhf submits the full default-values bag, not just
  touched fields).

Gates: TS \u2713 | Lint \u2713 (1 fixed react-hooks/exhaustive-deps warning) |
Vitest 14/14 \u2713 | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 07:42:28 +00:00
Cursor Agent
3b7b49137d
feat(ui): migrate guardrails-monitor section to shadcn
- MetricCard: replace bg-white/border-gray-200/text-gray-* raw colors with
  semantic tokens (bg-background/border-border/text-foreground/text-muted-foreground).
  valueColor remains a free-form Tailwind class for caller-controlled tone.
- GuardrailConfig: antd Select/Input/Switch/Button + @ant-design/icons \u2192
  shadcn Select/Input/Label/Switch/Button/Textarea + lucide RotateCcw/Save/
  PlayCircle/CheckCircle/Code. Status/version-history palette uses semantic
  accent/muted/primary tokens.
- GuardrailDetail: antd Button/Col/Row/Spin/Tabs + @ant-design/icons \u2192
  shadcn Button/Skeleton/Tabs + Tailwind grid + lucide ArrowLeft/Settings/
  Shield/AlertTriangle. Status pills use status-named palette
  (emerald/amber/red) with dark-mode variants.
- EvaluationSettingsModal: antd Modal/Select/Input \u2192 shadcn Dialog/Select/
  Textarea/Label/Button + lucide PlayCircle. Native loading state via
  SelectTrigger disabled + placeholder text.
- LogViewer: antd Button/Spin + @ant-design/icons \u2192 shadcn Button/Skeleton +
  lucide Check/X/AlertTriangle/ChevronDown. Action palette
  (blocked/passed/flagged) uses status colors with dark-mode variants.
- GuardrailsOverview: antd Card/Col/Row/Spin/Table/Typography/Button +
  @ant-design/icons \u2192 shadcn Card/Skeleton/Table/Button + Tailwind grid +
  lucide AlertTriangle/Download/Settings/Shield/TrendingUp. Drops
  ColumnsType<> in favor of TanStack-style click-to-sort headers.
  Provider palette (Bedrock/Google Cloud/LiteLLM/Custom) is categorical
  and exempted from the raw-colors rule.

Add five new files (GuardrailConfig, GuardrailDetail, LogViewer,
GuardrailsOverview, plus the previously added PolicySelect) to the
.eslintrc.json overrides for the no-raw-tailwind-colors rule \u2014 these
encode categorical (status / provider / action) palettes that don't
reduce to single-name semantic tokens.

Gates: TS \u2713 | Lint \u2713 | Vitest 23/23 \u2713 | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 07:31:32 +00:00
Cursor Agent
ecaf72f078
feat(ui): migrate organization_view to shadcn
- antd Form/Input/Select/Tabs/Typography/Button + @tremor/react Card/
  Grid/Badge/Text/TextInput/Title/Button + @heroicons/react ArrowLeftIcon
  \u2192 shadcn Card/Input/Select/Tabs/Badge/Button + lucide ArrowLeft +
  react-hook-form for the edit form (FormProvider + Controller +
  register).
- Replaces the antd Tabs items[] config with TabsList + TabsContent.
- Replaces grid-via-Tremor-Grid with plain Tailwind grid.
- Member table extra columns now use plain JSX cells (the MemberTable
  consumer renders them as antd ColumnsType internally; will be migrated
  in its own commit later).
- NumericalInput onChange callbacks are explicitly typed (number | null
  | undefined) to satisfy strict noImplicitAny in this file.

Gates: TS \u2713 | Lint \u2713 | Vitest 4/4 \u2713 | Build pending (next batch).

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 07:24:02 +00:00
Cursor Agent
7cd5643db1
feat(ui): migrate alerting DynamicForm + email_event_settings to shadcn
- alerting/dynamic_form.tsx: antd Form/Input/InputNumber/Button +
  @tremor/react Badge/Icon/Text/TableRow/TableCell/Switch/Button +
  @heroicons/react TrashIcon/CheckCircleIcon \u2192 native <form> with
  local state snapshot, shadcn Badge/Button/Input/Switch/TableCell/
  TableRow, lucide Trash2/CheckCircle. Emits <TableRow> children
  expected to be rendered inside an ambient <Table>/<TableBody>
  parent.
- email_events/email_event_settings.tsx: antd Typography/Divider/Spin/
  Checkbox + @tremor/react Card/Text/Button \u2192 shadcn Card/Button/
  Checkbox/Separator/Skeleton, plain <h4>/<p>/<label> + Tailwind. Turned
  the async fetchEventSettings into an inline useEffect to satisfy
  react-hooks/exhaustive-deps (trivially the original logic).

Gates: TS \u2713 | Lint \u2713 | Vitest n/a (no colocated tests) | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 07:19:05 +00:00
Cursor Agent
0bff3df3cc
docs(ui): finalize phase-1 migration report
Captures the end-of-run state:

- Foundation (Tasks 1\u20139): all complete and green.
- Sections migrated (4 of 33): Access Groups (with locked blueprint),
  Virtual Keys (stress test passed), Budgets, Tool Policies.
- Test results: 170/170 tests pass across migrated sections and
  molecules; 3801/3801 full-tree vitest (Task 4 checkpoint).
- Deps delta: 8 new deps; deprecated deps (antd / heroicons / remixicon /
  headlessui) still present as long as any un-migrated section imports
  them \u2014 Task 45 (uninstall) deferred accordingly.
- Baseline bundle: 15425508 bytes JS, 21 MB out/.
- 29 sections pending; blueprint + recipe are stable and ready for the
  next run.

Lists the sections not yet migrated, cross-cutting deviations, and
phase-2 prerequisites unchanged from the previous checkpoint.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 07:15:48 +00:00
Cursor Agent
fcc9dc1ed5
docs: update CLAUDE.md UI section for shadcn phase-1 migration
Replaces the old '### UI Component Library' section (which advised using
antd) with a new '### UI' section describing the post-migration stack:

- shadcn/ui primitives in src/components/ui/
- lucide-react icons (no @ant-design/icons, @heroicons/react, @remixicon/react)
- react-hook-form + zod + shadcn <Form>
- sonner via MessageManager/NotificationManager wrappers
- @tanstack/react-table + shadcn Table
- @tremor/react charts-only

Adds sections on style rules (semantic Tailwind tokens only), lint
enforcement (the two custom litellm-ui rules), a migration-in-progress
note pointing at MIGRATION_REPORT.md and BLUEPRINT.md, and a phase-2
deferral list.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 07:13:15 +00:00
Cursor Agent
84dc367790
docs(ui): update migration report with foundation + sections 1-3, 6 progress
Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 07:12:15 +00:00
Cursor Agent
b0ef2c70d4
feat(ui): migrate tool-policies (PolicySelect) to shadcn
- PolicySelect.tsx: antd Select \u2192 shadcn Select + SelectTrigger/
  Content/Item. Preserves categorical amber/emerald/red palette for the
  untrusted/trusted/blocked policy badges (these are non-semantic values
  by design). PolicySelect.tsx added to .eslintrc.json raw-colors override
  list. Deviation recorded in DEVIATIONS.md.
- PolicySelect.test.tsx: replace `.ant-select` class assertion with
  semantic `toBeDisabled()` against getByRole('combobox'), agnostic of
  underlying Select primitive.

Gates: TS \u2713 | Lint \u2713 | Vitest 12/12 \u2713 | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 07:11:23 +00:00
Cursor Agent
01cc55886e
feat(ui): migrate budgets to shadcn
- budget_panel.tsx: @tremor/react Table / Card / TabGroup / TabList /
  TabPanel / Button / Text \u2192 shadcn Table / Card / Tabs / Button +
  plain Tailwind for text. Moved action buttons into a proper TableCell
  (antd Table accepted dangling children but shadcn's semantic
  <table> element does not).
- budget_modal.tsx: antd Modal / Form / InputNumber / Select +
  @tremor/react TextInput / Accordion \u2192 shadcn Dialog /
  react-hook-form / Input / Select / Accordion. Introduces a small
  LabeledRow helper for the label-on-left-value-on-right layout that
  antd's Form.Item with labelCol/wrapperCol used to provide.
- edit_budget_modal.tsx: same treatment; preserves the disabled
  Budget ID field and the Accordion-wrapped optional settings.

Gates: TS \u2713 | Lint \u2713 (pre-existing unused-imports errors in
budget_panel.test.tsx unchanged) | Vitest 6/6 \u2713 | Build \u2713.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 07:08:32 +00:00
Cursor Agent
b8d48fecca
feat(ui): migrate virtual-keys (VirtualKeysTable + BudgetWindowsEditor) to shadcn
Scope: section-2 stress-test of the locked phase-1 blueprint.

- VirtualKeysTable.tsx (700+ lines):
  - @tremor/react Table + TableHead/Body/Row/Cell \u2192 shadcn Table equivalents
  - @tremor/react Badge / Icon / Text / Button \u2192 shadcn Badge + lucide icons +
    Tailwind semantic tokens
  - @heroicons/react ChevronDown/ChevronRight/ChevronUp/SwitchVertical \u2192 lucide
    Chevron* + ChevronsUpDown
  - @ant-design/icons InfoCircleOutlined / SyncOutlined \u2192 lucide Info / RefreshCw
  - antd Popover / Tooltip / Button / Skeleton / Typography \u2192 shadcn equivalents
    from @/components/ui/*. CopyableText helper replaces antd Typography.Text
    copyable semantics (clipboard + sonner toast).
  - Raw color classes (text-blue-500, bg-blue-50, text-gray-700, hover:bg-gray-50,
    bg-white) replaced with semantic tokens (text-primary, bg-primary/10,
    text-muted-foreground, hover:bg-muted, bg-background).
- BudgetWindowsEditor.tsx: antd Button/InputNumber/Select \u2192 shadcn
  Button/Input/Select. Antd's InputNumber `prefix="$"` preserved as absolute-
  positioned span adjacent to the input (shadcn Input has no prefix prop).

Blueprint stress-test result: NO new patterns required. Every antd /
@tremor / @heroicons / @ant-design/icons import encountered maps cleanly
to an entry already in BLUEPRINT.md. The blueprint is considered final
and is now permanently locked for the rest of phase 1.

Gates: TS \u2713 | Lint \u2713 | Vitest 44/44 \u2713 | Build \u2713. Playwright
parity + snapshot gates deferred per the DEVIATIONS.md environmental-gate
skip.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 07:04:04 +00:00
Cursor Agent
f49d66daea
feat(ui): migrate access-groups to shadcn + lock phase 1 blueprint
Migrates Section 1 (Access Groups) from antd to shadcn/ui:

- AccessGroupsPage.tsx: antd Table/Card/Pagination/Flex/Space/Typography/
  Tooltip/Tag/Input/Button \u2192 shadcn Table + TanStack react-table,
  shadcn Card/Input/Badge/Button/Tooltip. Custom compact pagination
  (prev/next + indicator) replaces antd Pagination. PlusOutlined \u2192
  lucide Plus.
- AccessGroupsDetailsPage.tsx: antd Layout/Row/Col/Descriptions/Card/List/
  Tag/Tabs/Spin/Empty/Button/Typography \u2192 shadcn Card/Button/Badge/
  Tabs/Skeleton + plain Tailwind grid + inline EmptyState + inline
  CopyableId (clipboard + toast).
- AccessGroupsModal/AccessGroupBaseForm.tsx: antd Form/Form.Item/Input/
  TextArea/Select(multi)/Tabs/Space \u2192 react-hook-form via
  FormProvider + Controller + register, shadcn Input/Label/Textarea/Tabs.
  Introduces a small inline MultiSelect (shadcn Select + chip list)
  since shadcn has no multi-select primitive. Logged in DEVIATIONS.md.
- AccessGroupsModal/AccessGroupCreateModal.tsx,
  AccessGroupsModal/AccessGroupEditModal.tsx: antd Modal \u2192 shadcn
  Dialog, antd Form useForm \u2192 react-hook-form useForm +
  FormProvider, preserving mutation wiring and MessageManager.success
  calls.

Writes the full **phase-1 blueprint** to docs/BLUEPRINT.md:
- Component translation table (antd \u2192 shadcn) with import paths
- Icon translation table (@ant-design/icons / @heroicons / @remixicon
  \u2192 lucide-react)
- Toast pattern (sonner via MessageManager / NotificationManager)
- Form pattern (rhf + zod + shadcn Form) \u2014 simple and complex variants
- Table pattern (shadcn Table + @tanstack/react-table)
- Shared layout patterns (page header, section card, empty state,
  skeleton, error alert, permissions gate)
- Test-update checklist for migrated sections
- Per-file migration checklist

Commits a **phase-1 parity spec** at e2e_tests/parity/access-groups.spec.ts
(semantic selectors only; no .ant-btn). Spec not executed in this run;
see DEVIATIONS.md for gate-skip rationale (no proxy / dev-server auth in
sandbox). TS + Lint + Vitest + build gates all pass (46/46 AccessGroups
tests).

**Locks the blueprint.** Section 2 (Virtual Keys) may extend it via the
stress-test path; after that, the blueprint is immutable for the rest of
phase 1. Deviations are recorded in DEVIATIONS.md.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 06:58:44 +00:00
Cursor Agent
923dc440ac
docs(ui): add section migration recipe (5-layer gating, 7-cycle cap)
Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 06:49:38 +00:00
Cursor Agent
b9fc99b8c1
chore(ui): add Playwright parity project + snapshot defaults for phase-1 migration
- New 'parity' project in playwright.config.ts. testDir=./parity,
  testMatch=**/*.spec.ts, 1440x900 viewport locked for stable snapshots.
  Default baseURL=http://localhost:3000; overridable via PARITY_BASE_URL
  (e.g. set to http://localhost:4000 when the section needs the proxy).
- webServer auto-starts 'npm run dev' unless PARITY_BASE_URL is set.
- expect.toHaveScreenshot defaults: maxDiffPixelRatio=0.01,
  animations=disabled, caret=hide.
- e2e_tests/parity/README.md documents spec conventions, snapshot
  baselining, and the two auth strategies (route interception vs. proxy).
- chromium project now explicitly ignores parity/** so it keeps its
  existing scope (full proxy-backed e2e suite).

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 06:47:40 +00:00
Cursor Agent
03fadfa283
docs(ui): add BLUEPRINT, QUIRKS, blockers dir
Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 06:46:36 +00:00
Cursor Agent
e460b6eadc
docs(ui): scaffold phase-1 migration docs (BLUEPRINT, QUIRKS, DEVIATIONS, CYCLES, REPORT, blockers/)
Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 06:45:58 +00:00
Cursor Agent
2785e51948
chore(ui): add litellm-ui ESLint plugin (no-banned-ui-imports, no-raw-tailwind-colors)
Add a local ESLint plugin that enforces the phase-1 shadcn migration
constraints:

- **no-banned-ui-imports**: flags imports from antd, @ant-design/icons,
  @heroicons/react, @remixicon/react. Flags @tremor/react imports except
  in files under a /charts/ directory or whose basename contains 'chart'.
- **no-raw-tailwind-colors**: flags raw Tailwind color utilities such as
  bg-slate-500 / text-blue-600 inside className strings, className
  template literals, and string arguments to cn / clsx / twMerge / cva / cx.
  Semantic tokens (bg-primary, text-foreground, bg-muted, ...) are allowed.

Plugin lives at ./eslint-plugin-litellm-ui, installed as a "file:" dep
so it is picked up transparently by ESLint's plugin resolution.

Wire both rules into .eslintrc.json with an overrides block that exempts:
- shadcn primitives under src/components/ui/
- the notification/message manager bridges (still reference sonner)
- tailwind.config.ts (the palette intentionally uses raw color imports)
- test files and fixtures (out of phase-1 scope)

Replace the broken `next lint` script with a direct eslint invocation
(ESLINT_USE_FLAT_CONFIG=false to honor the legacy .eslintrc.json during
phase 1; migration to flat config is phase 2).

Initial sweep reports 921 banned-import violations and 3497 raw-color
violations in non-migrated code \u2014 expected, these will be resolved
section-by-section.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 06:45:21 +00:00
Cursor Agent
966d7e0cc2
chore(ui): wire sonner Toaster; delegate antd managers to sonner
- Rewrite MessageManager (message_manager.tsx) to delegate to toast.* from
  sonner. Public API preserved (success/error/warning/info/loading/destroy).
  setMessageInstance() is now a no-op back-compat shim.
- Rewrite NotificationManager (notifications_manager.tsx) to delegate to
  sonner. Same classification logic (titleFor/classifyGeneralMessage) and
  same public API (error/warning/info/success/fromBackend/clear) preserved.
  setNotificationInstance() is now a no-op back-compat shim.
- antd duration (seconds) \u2192 sonner duration (ms) conversion at each call site.
- Gut AntdGlobalProvider to a children passthrough (antd message/notification
  provider is no longer needed). Will be deleted in the final cleanup task
  after antd is uninstalled.
- Add <Toaster richColors position="top-right" /> to the root layout.
- Rewrite message_manager and notifications_manager unit tests to mock
  sonner's toast.* rather than antd.message/notification. Use vi.unmock in
  notifications_manager test to bypass the global setupTests.ts mock.
- Fix stale antd.message.error assertion in AddFallbacks.test.tsx: mock
  @/components/molecules/message_manager directly so the assertion is
  agnostic to the underlying toast library.

Build and targeted vitest suites pass. Full vitest suite: 3801/3801 pass
after these fixes (2 pre-existing failures were caused by the migration
and are now fixed via the updated AddFallbacks test mock).

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 06:41:22 +00:00
Cursor Agent
a507e5514a
chore(ui): pre-seed shadcn primitives in src/components/ui
Installs the full set of primitives needed for the phase-1 migration:
accordion, alert, alert-dialog, avatar, badge, breadcrumb, button, calendar,
card, checkbox, collapsible, command, context-menu, dialog, dropdown-menu,
form, hover-card, input, label, menubar, navigation-menu, popover, progress,
radio-group, scroll-area, select, separator, sheet, skeleton, slider, sonner,
switch, table, tabs, textarea, toggle, toggle-group, tooltip.

Pulls in @radix-ui/* transitive dependencies. Existing files in src/components/ui/
(ui-loading-spinner, AntDLoadingSpinner) are preserved unchanged.

Build verified clean via `npm run build`. Pre-existing tsc errors in
test files are unaffected.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 06:17:33 +00:00
Cursor Agent
a6f07c49a5
chore(ui): init shadcn, consolidate tailwind config, install form/toast deps
- Write components.json (style: default, base: slate, tailwind config: .ts)
- Create src/lib/utils.ts with canonical cn() helper
- Consolidate tailwind.config.{js,ts} onto .ts; preserve per-deployment brand
  color loading from ui_colors.json with fallback to indigo
- Add shadcn semantic tokens (primary/secondary/muted/...) backed by CSS vars
- Keep legacy tremor palette for charts-only usage
- Compact density: --radius 0.375rem, new compact-1..compact-4 spacing tokens
- Wire tailwindcss-animate plugin for shadcn radix primitives
- Add light+dark :root / .dark CSS variable blocks in globals.css
- Install: clsx, class-variance-authority, tailwindcss-animate, react-hook-form,
  zod, @hookform/resolvers, sonner
- Capture baseline bundle size for phase-1 delta reporting

Part of the shadcn phase-1 UI migration. See docs/superpowers/ spec.

Co-authored-by: yuneng-jiang <yuneng-berri@users.noreply.github.com>
2026-04-23 06:13:29 +00:00
Sameer Kankute
63ba912b47
Merge pull request #26160 from BerriAI/litellm_vertex_image_edit_credentials_fix
fix(image_edit): forward litellm_params to validate_environment for Vertex AI credentials
2026-04-23 08:36:01 +05:30
yuneng-jiang
6a25866f51
Merge pull request #26295 from BerriAI/yj_bump_apr22
Some checks are pending
Unit Tests: Proxy DB Operations / proxy-db (auth-checks, tests/proxy_unit_tests/test_auth_checks.py tests/proxy_unit_tests/test_user_api_key_auth.py, 20, 8) (push) Waiting to run
Unit Tests: Proxy DB Operations / proxy-db (key-generation, tests/proxy_unit_tests/test_key_generate_prisma.py, 30, 0) (push) Waiting to run
Unit Tests: Proxy DB Operations / proxy-db (proxy-utils, tests/proxy_unit_tests/test_proxy_utils.py, 20, 8) (push) Waiting to run
Unit Tests: Proxy DB Operations / proxy-db (remaining, tests/proxy_unit_tests --ignore=tests/proxy_unit_tests/test_key_generate_prisma.py --ignore=tests/proxy_unit_tests/test_auth_checks.py --ignore=tests/proxy_unit_tests/test_user_api_key_auth.py --ignore=tests/proxy_unit_tests/test_p… (push) Waiting to run
Unit Tests: Security / security (push) Waiting to run
[Infra] bump versions
2026-04-22 18:33:03 -07:00
yuneng-jiang
8bc6948a5e
Merge pull request #26290 from BerriAI/litellm_/bold-goldstine-b86b67
[Fix] Stabilize spend accuracy test transport flakes
2026-04-22 18:30:10 -07:00
Yuneng Jiang
95fa7678af
uv lock 2026-04-22 18:25:37 -07:00
Yuneng Jiang
9f46d838fd
bump: version 1.83.11 → 1.83.12 2026-04-22 18:21:47 -07:00
Yuneng Jiang
3ddb3cbdf6
bump: version 0.4.67 → 0.4.68 2026-04-22 18:20:21 -07:00
ryan-crabbe-berri
c4c1861389
Merge pull request #26195 from BerriAI/litellm_team_member_total_spend
Track per-member total spend on team memberships
2026-04-22 18:20:16 -07:00
michelligabriele
c67d193400
fix(docker.non_root): use numeric UID 65534 for K8s runAsNonRoot (#26268) 2026-04-22 18:00:04 -07:00
Yuneng Jiang
a292845dcf
[Fix] Harden spend accuracy test against transient aiohttp connection errors
Two changes, both test-only:

- Configure the aiohttp session with TCPConnector(force_close=True) and an
  explicit ClientTimeout(total=30, connect=10). Prevents reuse of idle TCP
  connections that the proxy/kernel may have closed during the long window
  between setup POSTs and the later poll loop, and surfaces a blocked proxy
  event loop quickly instead of hanging on aiohttp's 5-minute default.

- In poll_key_spend_until, catch aiohttp.ClientError and asyncio.TimeoutError
  around the single /key/info call. A transient transport hiccup now logs and
  retries on the next tick instead of failing the entire polling loop.

Addresses the ConnectionTimeoutError observed on the first /key/info call
after the 20 chat completions.
2026-04-22 17:40:42 -07:00
yuneng-jiang
fb39683521
Merge pull request #25772 from BerriAI/litellm_wildcard_order_fallback
fix(router): wildcard order fallback to higher-order deployments
2026-04-22 15:05:14 -07:00
shin-berri
b6fdd46636
Merge pull request #26270 from BerriAI/litellm_/lucid-kowalevski-de832f
[Fix] Stabilize flaky spend accuracy tests + patch Redis buffer data-loss path
2026-04-22 15:02:24 -07:00
shin-berri
8340f6fc47
Merge pull request #26261 from BerriAI/litellm_code_quality_to_gha
[Infra] Migrate more CI jobs from CircleCI to GitHub Actions
2026-04-22 14:37:25 -07:00
yuneng-jiang
41145e2205
Merge pull request #26266 from BerriAI/litellm_bedrock_guardrail_spend_logging_reapply
fix(proxy): Bedrock guardrail spend logs - hook mode, match redaction, streaming request_data
2026-04-22 14:32:10 -07:00
Yuneng Jiang
3f42295d93
[Fix] Satisfy mypy on spend buffer restore helper
The daily queue parameter types on _restore_spend_updates_to_in_memory_queues
were narrowed to specific subtypes (DailyUserSpendTransaction, etc), but
the caller passes Dict[str, BaseDailySpendTransaction] — the return type
of flush_and_get_aggregated_daily_spend_update_transactions. Widen the
parameters to the base type.

Also replace dynamic TypedDict key lookup (which returned object) with
explicit literal-keyed get() calls so mypy can type-narrow each field.
2026-04-22 14:31:25 -07:00
Milan
3df9780c02
fix(core_helpers): make redact_nested_match_and_regex_keys iterative
Replace recursive `_walk` helper with a stack-based traversal so the
recursive_detector CI check passes without adding to the ignore list,
and avoid Python recursion limits on deeply nested payloads.

Made-with: Cursor
2026-04-23 00:12:30 +03:00
Yuneng Jiang
288d403529
[Fix] Preserve in-memory spend updates when Redis rpush fails
store_in_memory_spend_updates_in_redis drained the in-memory queues
into local variables before the rpush pipeline. If rpush raised (cloud
Redis hiccup, timeout, connection blip), those already-drained
transactions were garbage-collected with the scheduler job, silently
losing all spend aggregated during that tick.

Wrap the rpush in try/except. On failure, re-enqueue the aggregated
transactions into their respective in-memory queues so the next
scheduler tick retries.

Add a unit test that seeds real queues, simulates an rpush failure,
and asserts the transactions land back in-memory.
2026-04-22 14:10:40 -07:00
Yuneng Jiang
5445297da9
[Fix] Stabilize flaky spend accuracy tests with local ground truth
Replace the calibration step (one request + 10-minute poll) with an
independent ground truth computed from response usage via
litellm.cost_per_token. All N requests are made up front, so a single
dropped Redis write no longer kills the test.

Add /health/readiness checks at test start and on poll timeout so the
failure message surfaces proxy state (db, cache) instead of "calibration
timed out".

Set PROXY_BATCH_WRITE_AT=2 in the spend tracking CI job to shorten the
scheduler flush window.
2026-04-22 13:45:00 -07:00