Commit graph

36172 commits

Author SHA1 Message Date
yuneng-jiang
0ce1ea37c5
Merge pull request #24472 from BerriAI/litellm_extract_pipeline_test_panel
[Refactor] UI - Policies: Extract PipelineTestPanel from pipeline_flow_builder
2026-03-23 22:55:42 -07:00
yuneng-jiang
abccac89dc Address greptile review feedback (greploop iteration 3)
- Add tests for getTestSourceOptions (2 tests)
- Add null guards to selectAntOption test helper

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:37:24 -07:00
yuneng-jiang
23a9a4190b Address greptile review feedback (greploop iteration 2)
- Memoize promptsForSource with useMemo for consistency
- Extract getTestSourceOptions to pipeline_utils.tsx, removing
  direct getFrameworks import from pipeline_test_drawer.tsx

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:31:58 -07:00
yuneng-jiang
c91b422d62
Merge pull request #24471 from BerriAI/litellm_migrate_regenerate_key_modal_antd
[Refactor] UI - Keys: Migrate Regenerate Key Modal to antd
2026-03-23 22:27:06 -07:00
yuneng-jiang
c397bc83fc Address greptile review feedback (greploop iteration 1)
- Move testSourceOptions into component with useMemo (was module-scope)
- Remove dead mockPassPrompt/mockFailPrompt constants from test file

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:26:37 -07:00
yuneng-jiang
52343c1a99 Address greptile review feedback (greploop iteration 2)
Add missing marginTop: 8 to Current expiry Text element to
restore the mt-2 spacing from the original div.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:15:43 -07:00
yuneng-jiang
1c611c4d6b Add try/finally to compliance-dataset path and test coverage
- Wrap compliance-dataset loop in try/finally so isRunning resets
  consistently with the quick-chat branch
- Add 4 tests covering the compliance-dataset execution path:
  matched/total count, mismatch indicator, per-prompt errors,
  and call count verification

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:14:09 -07:00
yuneng-jiang
345af54100 Address greptile review feedback (greploop iteration 1)
Add missing display: block and marginTop: 8 to the grace period
recommendation Text element, matching the original div styling.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:12:40 -07:00
yuneng-jiang
63525d1215 Add missing display: block to Current expiry Text
The original <div> was block-level by default. The replacement
<Text type="secondary"> renders inline, causing it to flow into
the preceding form field. Add display: "block" to match the
sibling New expiry element.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 22:10:00 -07:00
yuneng-jiang
45a54d64cd Address review feedback: rename, fix FailIcon, add missing tests
- Rename pipeline_icons.tsx to pipeline_utils.tsx (better reflects mixed
  contents: constants, helpers, and icons)
- Fix FailIcon missing cross mark paths (pre-existing bug, now renders ✕)
- Add 4 tests for getPromptsForTestSource covering all branches

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:58:25 -07:00
yuneng-jiang
6fc1937d33 Use antd Text type="success" instead of hardcoded color
Replace inline color "#52c41a" with antd's native
<Text type="success"> for the new expiry message.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:55:34 -07:00
yuneng-jiang
d67a549669
Merge pull request #24470 from BerriAI/litellm_ui_unit_tests_five_components
[Test] UI: Add unit tests for 5 untested dashboard components
2026-03-23 21:54:11 -07:00
yuneng-jiang
4836575d41 [Refactor] UI - Policies: Extract PipelineTestPanel from pipeline_flow_builder
Extract the PipelineTestPanel component (~420 lines) and shared utilities
from the 1583-line pipeline_flow_builder.tsx into separate files.

New files:
- pipeline_icons.tsx: icons, constants, and utility functions
- pipeline_test_drawer.tsx: PipelineTestPanel component
- pipeline_icons.test.ts: 19 tests for utility functions
- pipeline_test_drawer.test.tsx: 11 tests for PipelineTestPanel

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:34:47 -07:00
yuneng-jiang
33cb594f05 Migrate regenerate key modal from Tremor to antd components
Replace Tremor Button, Grid, Col, Text, TextInput, Title with antd
equivalents (Button, Typography, Input). Use antd Button loading prop
instead of manual "Regenerating..." text. Replace Tailwind utility
classes with inline styles to match antd patterns.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:34:44 -07:00
yuneng-jiang
5d9136bb71 [Test] UI: Add unit tests for 5 untested dashboard components
Add Vitest + RTL unit tests for WorkerDropdown, AccessGroupSelector,
MemberTable, ModelSelector, and AutoRotationView (37 tests total).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 21:33:12 -07:00
Krish Dholakia
3292d02aa4
Merge pull request #24460 from DmitriyAlergant/ci/skip-scheduled-workflows-on-forks
ci: skip scheduled workflows on forks
2026-03-23 19:54:50 -07:00
Krish Dholakia
14fffc2770
Merge pull request #24432 from BerriAI/krrishdholakia/project-id-tracking
feat(proxy): add project_alias tracking in callbacks
2026-03-23 19:24:44 -07:00
DmitriyAlergant
1310a275d2 ci: narrow codeql guard to schedule-only
Use event_name check so push/PR-triggered CodeQL scans still run on
forks — only the scheduled run is skipped.
2026-03-23 21:39:11 -04:00
DmitriyAlergant
91bc095e18 ci: skip scheduled workflows on forks
Add `if: github.repository == 'BerriAI/litellm'` guard to scheduled
jobs in stale.yml, codeql.yml, and create_daily_staging_branch.yml.

This matches the existing pattern in auto_update_price_and_context_window.yml
and prevents these workflows from running unnecessarily on fork repositories.
2026-03-23 21:29:00 -04:00
Krrish Dholakia
26d162ccf4 fix(test): add user_api_key_project_alias to spend logs expected keys
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 18:12:50 -07:00
Krrish Dholakia
742e176611 docs(reasoning_content.md): update guide 2026-03-23 17:23:14 -07:00
Krish Dholakia
8a3aa4d31c
Merge pull request #24434 from BerriAI/krrishdholakia/prometheus-spend-metadata
feat(prometheus): include spend_logs_metadata in custom labels
2026-03-23 16:52:59 -07:00
Krrish Dholakia
dd0e7dcca8 test(prometheus): add tests for spend_logs_metadata in custom labels
Verify that spend_logs_metadata is correctly merged into combined_metadata
and flows through to Prometheus custom labels. Tests cover: basic extraction,
precedence when keys overlap, all three metadata sources combined, and None
handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 11:02:21 -07:00
Krrish Dholakia
7fa623df91 feat(prometheus): include spend_logs_metadata in custom labels
Add spend_logs_metadata to combined_metadata in Prometheus logger so
custom metadata from x-litellm-spend-logs-metadata header can be used
in Prometheus custom labels.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 10:59:18 -07:00
Krrish Dholakia
6809213957 feat(proxy): add project_alias tracking through callback metadata pipeline
Thread project_alias alongside project_id through the metadata pipeline so
callbacks receive the human-readable project name. DRY up duplicate metadata
dict construction in proxy_track_cost_callback and pass_through_endpoints by
reusing get_sanitized_user_information_from_key — future metadata fields only
need adding in one place.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 10:44:17 -07:00
Krish Dholakia
63425b4cb4
Merge pull request #23910 from michelligabriele/fix/guardrail-post-call-logging
fix(proxy): post-call guardrail response not captured for logging
2026-03-23 09:21:28 -07:00
michelligabriele
fa7ccf0893 fix(test): add request_data param to test mock + black formatting 2026-03-23 15:43:05 +01:00
michelligabriele
9a231bd758 fix(proxy): use real request_data in Responses API streaming fallback path 2026-03-23 15:39:23 +01:00
michelligabriele
4625ccbaa2 fix(proxy): anchor metadata dict in _process_response/_process_error so pop() mutates the real dict 2026-03-23 15:39:23 +01:00
michelligabriele
d8fd9a20ed fix(proxy): address Greptile review — streaming request_data, OCR backward compat, test coverage
- Pass request_data to end-of-stream process_output_streaming_response call
- Restore inputs.update() in OCR handler for third-party guardrail providers
- Add streaming end-to-end test for guardrail logging passthrough
2026-03-23 15:39:23 +01:00
michelligabriele
ae454fd700 fix(proxy): OpenAI Moderation post-call guardrail response not captured for logging
Two independent bugs prevented post-call OpenAI Moderation guardrail
results from reaching downstream logging callbacks (Langfuse, Datadog).

Bug 1: process_output_response() created a throwaway request_data dict,
so guardrail info written by @log_guardrail_information was discarded.
Fixed by threading the real request_data from the unified guardrail
dispatcher through all 13 BaseTranslation handlers, with litellm_metadata
injection preserved for third-party guardrails (Zscaler, Prompt Security).
Also extended to process_output_streaming_response for consistency.

Bug 2: The @log_guardrail_information decorator collapsed the full
moderation API response (categories, scores, flagged status) to "allow".
Fixed by overriding _process_response/_process_error on
OpenAIModerationGuardrail to stash and log the full response, following
the established Model Armor pattern.
2026-03-23 15:39:22 +01:00
yuneng-jiang
c89496f378
Merge pull request #24342 from BerriAI/litellm_yj_march_21_2026
[Fix] UI - Teams: Table refresh, infinite dropdown, leftnav migration
2026-03-21 23:36:21 -07:00
yuneng-jiang
38d477507d remove outdated e2e test 2026-03-21 23:14:53 -07:00
yuneng-jiang
6bb08883af adding poetry lock 2026-03-21 23:01:28 -07:00
yuneng-jiang
fa65433c8c bump: version 1.82.5 → 1.82.6 2026-03-21 22:56:09 -07:00
yuneng-jiang
d91980dc45 adding build 2026-03-21 22:55:04 -07:00
yuneng-jiang
071c8641de bump: version 0.4.59 → 0.4.60 2026-03-21 22:54:41 -07:00
yuneng-jiang
88a4c7aeaf bump: version 0.4.58 → 0.4.59 2026-03-21 22:54:38 -07:00
yuneng-jiang
34d079910b chore: update Next.js build artifacts (2026-03-22 05:53 UTC, node v22.16.0) 2026-03-21 22:53:50 -07:00
yuneng-jiang
9073daeebc [Fix] UI - TeamDropdown: Match org dropdown styling and fix test mock
- Use Select.Option with font-medium alias + Text secondary ID to match OrganizationDropdown
- Default page size to 20
- Add useInfiniteTeams mock to AddModelForm tests

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 22:52:16 -07:00
yuneng-jiang
aea8e32048 [Fix] UI: Team table refresh, infinite team dropdown, leftnav for dashboard routes
- OldTeams: refresh table via fetchTeamsV2 after team create instead of appending
- TeamDropdown: rewrite with useInfiniteTeams for paginated fetch, scroll-to-load, and debounced search
- Update all TeamDropdown consumers to use the new self-fetching API
- Dashboard layout: switch from Sidebar2 to SidebarProvider (leftnav)
- Leftnav: add MIGRATED_PAGES routing for path-based navigation (api-reference)
- Navbar: remove chat button

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 22:05:26 -07:00
yuneng-jiang
9963b31e07 Revert "fix(proxy): restore per-entity breakdown in aggregated daily activity endpoint"
This reverts commit 9c3fab24ad.
2026-03-21 21:37:29 -07:00
yuneng-jiang
f5194b5ce3
Merge pull request #24334 from BerriAI/litellm_yj_march_21_2026
[Infra] Build UI for release
2026-03-21 18:03:38 -07:00
yuneng-jiang
d217e49193 chore: update Next.js build artifacts (2026-03-22 01:02 UTC, node v22.16.0) 2026-03-21 18:02:32 -07:00
yuneng-jiang
e3d4c29d37
Merge pull request #24323 from BerriAI/litellm_ryan_march_20
litellm ryan march 20
2026-03-21 15:57:28 -07:00
Ryan Crabbe
3e27ff1b78 fix: resolve mypy type errors in audit_logs.py 2026-03-21 15:42:01 -07:00
Ryan Crabbe
f494ab513f docs: add High Availability Control Plane documentation
New docs page covering the HA control plane architecture where each
worker instance has its own DB, Redis, and master key. Includes a
React component diagram, setup configs, SSO notes, and local testing
instructions.
2026-03-21 15:31:49 -07:00
yuneng-jiang
1986f1034e
Merge pull request #24211 from BerriAI/litellm_dev_sameer_16_march_week
Litellm dev sameer 16 march week
2026-03-21 15:19:15 -07:00
yuneng-jiang
72fba093c8 Merge remote-tracking branch 'origin/main' into litellm_dev_sameer_16_march_week 2026-03-21 15:11:29 -07:00
yuneng-jiang
7b31ea40a9
Merge pull request #22844 from BerriAI/litellm_oss_staging_03_05_2026
Litellm oss staging 03 05 2026
2026-03-21 15:09:48 -07:00