* 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
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()
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.
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.
* 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
* 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>