Commit graph

2651 commits

Author SHA1 Message Date
litellm-bot
dde3379475
[Infra] Harden branch: sync CI/CD files from main, remove attack surface
Automated supply-chain hardening:
- Sync .circleci/, .github/, build scripts from main
- Remove dead/dangerous files (security_scans.sh, .pre-commit-config.yaml, etc.)
- SHA256-verified NVM installs, pip --only-binary
2026-04-04 22:19:54 -07:00
yuneng-jiang
8ae1fe32c4 fixing test 2026-02-06 20:47:43 -08:00
yuneng-jiang
e968e3798c team settings soft budget and alerting emails 2026-02-06 20:40:52 -08:00
Ishaan Jaffer
51af66fdb2 ui new buil 2026-02-06 19:15:29 -08:00
Ishaan Jaff
9b1ccc0608
[Feat] IP-Based Access Control for MCP Servers (#20620)
* update MCPAuthenticatedUser

* add available_on_public_internet for MCPs

* update claude.md

* init IPAddressUtils

* init available_on_public_internet

* add on REST endpoints

* filter with IP

* TestIsInternalIp

* _extract_mcp_headers_from_request

* init get_mcp_client_ip

* _get_general_settings

* allowed_server_ids

* address PR comments

* get_mcp_server_by_name fix

* fix server

* fix review comments

* get_public_mcp_servers

* address _get_allowed_mcp_servers

* test fix

* fix linting

* inint ui types

* add ui for managing MCP private/public

* add ui

* fixes

* add to schema

* add types

* fix endpoint

* add endpoint

* update manager

* test mcp

* dont use external party for ip address
2026-02-06 17:58:24 -08:00
Krish Dholakia
ba74e6d9d2
Add http support to custom code guardrails + Unified guardrails for MCP + Agent guardrail support (#20619)
* fix: fix styling

* fix(custom_code_guardrail.py): add http support for custom code guardrails

allows users to call external guardrails on litellm with minimal code changes (no custom handlers)

Test guardrail integrations more easily

* feat(a2a/): add guardrails for agent interactions

allows the same guardrails for llm's to be applied to agents as well

* fix(a2a/): support passing guardrails to a2a from the UI

* style(code-editor): allow editing custom code guardrails on ui + add examples of pre/post calls for custom code guardrails

* feat(mcp/): support custom code guardrails for mcp calls

allows custom code guardrails to work on mcp input

* feat(chatui.tsx): support guardrails on mcp tool calls on playground
2026-02-06 17:34:32 -08:00
yuneng-jiang
a4689c9b22
Merge pull request #20549 from swayambhu94/fix/ui/antd-notification
refactor: migrate Ant Design notifications to use `App.useApp()` cont…
2026-02-06 13:15:37 -08:00
yuneng-jiang
dfc4a1b412
Merge pull request #20599 from BerriAI/litellm_model_page_col_resize
[Fix] UI - Model Page: Column Resizing on Smaller Screens
2026-02-06 12:38:01 -08:00
yuneng-jiang
ac8f3807db
Merge pull request #20462 from BerriAI/litellm_model_info_cost
[Fix] UI - Model Info Page: Fix Input and Output Labels
2026-02-06 12:34:34 -08:00
yuneng-jiang
4de0ed7a9e
Merge pull request #20444 from BerriAI/litellm_ui_config_req_auth_mh
[Feature] UI - Admin Settings: Add option for Authentication for public AI Hub
2026-02-06 12:34:27 -08:00
yuneng-jiang
8df6cfe9d8 fix model page col resize 2026-02-06 12:27:03 -08:00
yuneng-jiang
ee70010ef1 Adding testing coverage 2026-02-06 11:32:35 -08:00
Swayambhu
a48a8ec945 refactor: Directly use Ant Design's notification hook instead of App.useApp for notification management. 2026-02-06 15:35:11 +05:30
yuneng-jiang
968b953f84 rename admins to AdminPanel 2026-02-05 21:11:26 -08:00
Swayambhu
eee37c569d fix: ensure Ant Design notification instance is initialized only once using useRef. 2026-02-06 10:01:44 +05:30
yuneng-jiang
5ce5399fbb
Merge pull request #20469 from swayambhu94/fix/ui/model-hub-table-crash
fix: Add array type checks for model, agent, and MCP hub data to prev…
2026-02-05 20:14:51 -08:00
Swayambhu
08a6fe2bfa refactor: migrate Ant Design notifications to use App.useApp() context via a new global provider.
1.
notifications_manager.tsx
 - Hybrid notification approach:

Added notificationInstance variable to store the context-based instance
Added
setNotificationInstance()
 function to inject the instance from context
Created
getNotification()
 helper that prefers context instance, falls back to static
Added COMMON_NOTIFICATION_PROPS (exported) with showProgress: true and pauseOnHover: true
All notification methods (
error
,
warning
,
info
,
success
,
fromBackend
) now spread COMMON_NOTIFICATION_PROPS
2.
AntdGlobalProvider.tsx
 - New context provider:

Wraps app with Antd's <App> component
Uses App.useApp() hook to get the context-based notification instance
Injects it into NotificationManager via
setNotificationInstance()
2026-02-06 09:44:02 +05:30
yuneng-jiang
26cdc4a47b
Merge pull request #20465 from BerriAI/litellm_ui_dep_tremor
[Refactor] UI - Admin Page: Migrate to AntD Tabs
2026-02-05 20:12:17 -08:00
Swayambhu
926fb3525c refactor: Add error handling for network calls and apply consistent formatting across networking functions. 2026-02-06 08:33:18 +05:30
yuneng-jiang
f64f949715 Spend by provider refactor 2026-02-05 16:22:07 -08:00
yuneng-jiang
b5956cb020
Merge pull request #20513 from BerriAI/litellm_ui_test_cov_01
[Infra] UI - Adding Unit Tests for Coverage
2026-02-05 12:19:03 -08:00
yuneng-jiang
21d6025c01 adding test for converage 2026-02-05 12:02:12 -08:00
nina-hu
5904fa159b fix(ui): adjust daily spend date filtering for user timezone
The daily spend tables store dates in UTC, but the UI sends dates in the
user's local timezone. This causes a mismatch where records from the
user's evening (stored as the next UTC day) don't appear when filtering
by "today".

Changes:
- Add `_adjust_dates_for_timezone()` helper to expand date range based
  on timezone offset
- Add `timezone` query parameter to `/user/daily/activity` and
  `/user/daily/activity/aggregated` endpoints
- Frontend sends `timezone` using `Date.getTimezoneOffset()`

For users west of UTC (e.g., PST), end_date is extended by 1 day.
For users east of UTC (e.g., IST), start_date is extended by 1 day earlier.
This ensures all records within the user's local date range are captured.
2026-02-04 21:42:34 -08:00
Swayambhu
2c430ebd96 fix: Add array type checks for model, agent, and MCP hub data to prevent crashes from non-array API responses and include a regression test.
This PR:Fixes a frontend regression where the
PublicModelHub
 page would crash with TypeError: e.filter is not a function when the API returned an error object (e.g. { "detail": "..." }) instead of the expected data array.
Changes:

Added defensive Array.isArray() checks in
src/components/public_model_hub.tsx
 for:
modelHubData
agentHubData
mcpHubData
Updated useMemo hooks and helper functions to handle invalid data gracefully.
Added a regression test in
src/components/public_model_hub.test.tsx
 that mocks a non-array API response to ensure the component renders without crashing.
2026-02-05 10:28:04 +05:30
yuneng-jiang
ed7beba781 small fixes 2026-02-04 20:54:59 -08:00
yuneng-jiang
539ff7a850 refactor admin page 2026-02-04 20:46:31 -08:00
yuneng-jiang
fa86f1a10a Fix input and output label 2026-02-04 20:14:01 -08:00
yuneng-jiang
b982542c6c fixing build 2026-02-04 20:05:10 -08:00
Ishaan Jaff
15b717c300
[Feat] UI - Add support for MCP Semantic Filtering on UI (#20454)
* feat: remove_callbacks_by_type

* feat: _init_semantic_filter_settings_in_db

* add MCP semantic filtering settings endpoints

* v0 - semantic filter UI

* fix endpint _init_semantic_filter_settings_in_db

* refactor ui

* add LITELLM_UI_ALLOW_HEADERS

* ui fix

* ui fix
2026-02-04 18:38:53 -08:00
yuneng-jiang
d016ac863b Adding tests for model hub 2026-02-04 17:05:06 -08:00
yuneng-jiang
bdf47eb0f0 Adding tests 2026-02-04 17:01:48 -08:00
yuneng-jiang
28bae2264c ai hub req auth working 2026-02-04 16:57:46 -08:00
yuneng-jiang
c47866afb9 useAuthorized refactor 2026-02-04 16:37:45 -08:00
yuneng-jiang
ec4f7a38ff Add option for authentication for public AI Hub 2026-02-04 15:49:05 -08:00
yuneng-jiang
cd9466a50c Adding tests 2026-02-04 12:35:58 -08:00
yuneng-jiang
609c423314 migrate to antd table 2026-02-04 12:22:57 -08:00
yuneng-jiang
208cf5e86d refactor - rename search tools files 2026-02-04 11:53:03 -08:00
Krish Dholakia
ca34b4ee13
Revert "feat(guardrails): implement team-based isolation guardrails mgmnt (#1…" (#20393)
This reverts commit 76a399ba69.
2026-02-03 20:55:46 -08:00
Krish Dholakia
7056d9984e
Custom Code Guardrails UI Playground (#20377)
* feat(guardrails/): allow custom code execution for guardrails

first step in allowing teams to submit custom code for guardrails

* feat: custom_code_guardrail.md

support passing custom code for guardrails

* feat: initial commit adding ui for custom code guardrails

allows users to write guardrails based on custom code

* feat: expose new test custom code guardrail endpoint

allows ui testing playground to sanity check if guardrail is working as expected

* fix: fix linting errors

* fix: fix max recursion check

* fix: fix linting error
2026-02-03 19:57:24 -08:00
Sameer Kankute
25fa1ad4e7
Merge pull request #20386 from naaa760/fix/extra-head-chat-comp-brid
fix(proxy): forward extra headers in chat
2026-02-04 09:11:43 +05:30
yuneng-jiang
12b8cd5971
Merge pull request #20380 from BerriAI/litellm_ui_key_budget_change
[Feature] UI - User Budget Page: Unlimited Budget Checkbox
2026-02-03 18:29:46 -08:00
yuneng-jiang
831f89b964 unlimited budget ui changes 2026-02-03 18:19:33 -08:00
yuneng-jiang
92786b5608
Merge pull request #20317 from BerriAI/litellm_antd_modal
Chore: Antd Modal Deprecated Props
2026-02-03 17:02:01 -08:00
yuneng-jiang
a2653bcd5e Adding Allowed Routes to Key Info and Edit Pages 2026-02-03 15:26:51 -08:00
Ishaan Jaff
59cab4d2aa
UI - Show team alias on Models health page (#20359)
* feat(ui): Add team-alias column to Models Health Status UI

- Added Team Alias column to the Models Health Status table
- Updated HealthCheckComponent to accept teams prop
- Updated health_check_columns to display team alias based on team_id
- Falls back to team_id if team alias not found, or shows '-' if no team
- Updated parent components to pass teams data to HealthCheckComponent

Co-authored-by: ishaan <ishaan@berri.ai>

* Update ui/litellm-dashboard/src/components/model_dashboard/health_check_columns.tsx

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: ishaan <ishaan@berri.ai>
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-02-03 12:53:50 -08:00
Sameer Kankute
b7f0d05dfd
Merge pull request #20337 from BerriAI/main
update 02 staging PR
2026-02-03 17:08:01 +05:30
yuneng-jiang
9202870e14
Merge pull request #20308 from BerriAI/litellm_ui_community_buttons
[Feature] UI - Navbar: Option to Hide Community Engagement Buttons
2026-02-02 20:10:01 -08:00
Harshit Jain
76a399ba69
feat(guardrails): implement team-based isolation guardrails mgmnt (#19889)
* feat(guardrails): implement team-based isolation guardrails mgmnt

* fix lint errors

* add allow_team_guardrail_config for admin permissions
2026-02-02 19:14:55 -08:00
yuneng-jiang
610ef7b4cf chore: antd modal deprecated props 2026-02-02 19:04:18 -08:00
yuneng-jiang
cf734cb586 Migrate Default Team settings to use reusable Model Select 2026-02-02 17:57:35 -08:00