Commit graph

4874 commits

Author SHA1 Message Date
Ishaan Jaff
cd9c388a3f truncateUserAgent 2025-08-02 11:54:54 -07:00
tanjiro
eb173f9155
Add advanced date picker to all the tabs on the usage page (#13221)
* advancedatepicker for tag usage and team usage

* reduce white space in date picker

* selected time range option is visible

* dont wait for apply button to select relative time options
2025-08-02 07:54:49 -07:00
Jugal D. Bhatt
900c7f45c0
[MCP Gateway] Litellm mcp pre and during guardrails (#13188)
* add guardrail support

* add guardrail support

* guardrails for MCP

* added changes

* add mcp guardrails

* added test

* add ui

* fix guardrail form

* working with cursor

* remvoe print

* fix mcp servertests

* fix mypy and remove console logs

* fix mypy and remove console logs

* fix mypy tests
2025-08-01 20:02:25 -07:00
Ishaan Jaff
b36df94481 ui new build 2025-08-01 15:42:19 -07:00
Ishaan Jaff
4a85a91f20
[QA] Viewing Agent Activity Headers on UI Usage Page (#13212)
* qa - agents

* refactored WAU, MAU and DAU endpoints

* fixes for dau, wau, mau

* use stack=true

* fixes for DAU calc

* fixes for rendering WAU, MAU

* use 1 section for topline

* Fixes for endpoint

* remove filter

* fix spacing

* fix activity

* working UI rendering

* fixes for chart data

* allow selecting specific tags

* add DistinctTagResponse endpoints

* use wide selector

* add types

* fixes for UI rendering

* get_per_user_analytics
2025-08-01 15:29:13 -07:00
Krrish Dholakia
917233fd52 fix(model_group_alias_settings.tsx): fix check 2025-08-01 09:26:49 -07:00
Krrish Dholakia
278dd52e71 build(ui/): fix linting errors 2025-08-01 09:23:18 -07:00
Ishaan Jaff
74e29ae153
[UI QA] QA - Agent Activity Tab (#13203)
* backend fixes

* fixes for User-Agent ui

* UI fixes chart loader

* fixes chart loader

* fixes ChartLoader

* fix ChartLoader

* fixes for analytics
2025-07-31 21:35:25 -07:00
Krish Dholakia
c7e4435bdc
Fix - using managed files w/ OTEL + UI - add model group alias on UI (#13171)
* fix(router.py): safe deep copy kwargs

OTEL adds a parent_otel_span which cannot be deepcopied

* fix: use safe deep copy in other places as well

* test: add script to check and ban copy.deepcopy of kwargs

enforce safe_deep_copy usage

* build(ui/): new component for adding model group alias on UI

* fix(proxy_server.py): support updating model_group_alias via /config/update

allows ui component to work

* fix(router.py): update model_group_alias in router settings based on db value

* fix: fix code qa error
2025-07-31 21:22:04 -07:00
Ishaan Jaff
cc4881eedd ui new build 2025-07-31 17:11:49 -07:00
Ishaan Jaff
56fc0cf374 ui polish 2025-07-31 17:08:47 -07:00
Ishaan Jaff
3acb78d450
Litellm fix fallbacks UI (#13191)
* UI - fix setting fallbacks on UI

* fix add fallbacks
2025-07-31 17:07:15 -07:00
Ishaan Jaff
edd3c3bc40 UI - new build 2025-07-31 14:16:16 -07:00
Ishaan Jaff
92cdac2e87
[Feat] v2 updates - tracking DAU, WAU, MAU for coding tool usage + show Daily Usage per User (#13147)
* Add user agent analytics endpoints and UI for tracking client metrics

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

* fix user agent analytics

* fix getting DAU

* fixes for user agent

* showing top user agents

* on this page remove Success Rate by User Agent

* fix linting

* add agent activity

* cleanup interface

* fix ruff

* round cost

* fix charts

* fixes - show DAU, MAU, WAU

* move to a diff file

* fix

* fixes for user agent analytics

* fix user_agent_analytics_endpoints

* fix mypy linting

* fix linting

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: ishaan <ishaan@berri.ai>
2025-07-30 14:42:30 -07:00
Ishaan Jaff
0201c51b50
[Feat] UI + Backend add a tab for use agent activity (#13146)
* Add user agent analytics endpoints and UI for tracking client metrics

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

* fix user agent analytics

* fix getting DAU

* fixes for user agent

* showing top user agents

* on this page remove Success Rate by User Agent

* fix linting

* add agent activity

* cleanup interface

* fix ruff

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: ishaan <ishaan@berri.ai>
2025-07-30 12:11:07 -07:00
tanjiro
1f0e5ef340
New Advanced Date Range Picker Component (#13141)
* new date-range picker added

* remove unused utils
2025-07-30 11:56:24 -07:00
tanjiro
0af45206a3
Added Voyage, Jinai, Deepinfra and VolcEngine providers on the UI (#13131)
* added voyage and jinai and volcengine

* deepinfra added and alphabetically ordered
2025-07-30 10:01:07 -07:00
Krish Dholakia
ea6b4b08d3
move to use_prisma_migrate by default + resolve team-only models on auth checks + UI - add sagemaker on UI (#13117)
* fix(proxy_cli.py): make use_prisma_migrate proxy default

Fixes https://github.com/BerriAI/litellm/issues/13046

 Prisma migrate deploy prevents resetting db

* fix(auth_checks.py): resolve team only models while doing auth checks on model access groups

Fixes issue where key had access via an access group, but team only model could not be called

* test(test_router.py): add unit testing

* feat(provider_specific_fields.tsx): add aws sagemaker on UI
2025-07-29 21:56:18 -07:00
Ishaan Jaff
1af0743e58 Revert "Revert "[MCP Gateway] Add protocol headers (#13062)""
This reverts commit acd915f2db.
2025-07-29 18:14:31 -07:00
tanjiro
c4088841d9
After selecting date range show loader on usage cost charts (#13113)
* prettier

* added loader in bar chart

* prettier

* added existing loader style

* make datepicker responsive
2025-07-29 17:55:39 -07:00
Ishaan Jaff
acd915f2db Revert "[MCP Gateway] Add protocol headers (#13062)"
This reverts commit 8de24bab7c.
2025-07-29 17:26:00 -07:00
Jugal D. Bhatt
8de24bab7c
[MCP Gateway] Add protocol headers (#13062)
* Add protocol headers

* fix mypy

* fix tests

* fix tests
2025-07-29 16:03:23 -07:00
Cole McIntosh
8a4a40844e
fix: improve MCP server URL validation to support internal/Kubernetes URLs (#13099)
* fix: improve MCP server URL validation to support internal/Kubernetes URLs

- Replace strict Ant Design URL validator with flexible custom validator
- Allow URLs like http://service-name.domain.svc.cluster.:1234/mcp
- Update both create and edit MCP server forms for consistency

* refactor: extract MCP server validation into reusable utilities

- Move URL validation logic to utils.tsx to follow DRY principles
- Add validateMCPServerUrl function for flexible URL validation
- Add validateMCPServerName function for hyphen validation
- Update both create and edit components to use shared utilities
- Reduces code duplication and improves maintainability
2025-07-29 13:36:19 -07:00
tanjiro
ec2c5b3d07
default to 7 days (#12917) 2025-07-28 21:27:43 -07:00
Jugal D. Bhatt
33c012a49d
fix scrolling issue (#13015) 2025-07-28 17:28:10 -07:00
stellasec
47f6984dce
Properly parse json options for key generation in the UI (#12989) 2025-07-28 16:43:51 -07:00
Krrish Dholakia
8d49dd66cb build: update ui build 2025-07-27 11:50:56 -07:00
Krrish Dholakia
39b7ce5388 refactor(create_key_button.tsx): cleanup read only option (confusing) 2025-07-27 11:49:56 -07:00
Krrish Dholakia
1b7f7ba643 build: build new ui 2025-07-27 11:08:27 -07:00
Krish Dholakia
94aa6b0b5d
Bulk User Edit - additional improvements - edit all users + set 'no-default-models' on all users (#12925)
* feat(bulk_user_update/): support updating all users on proxy

* fix(bulk_edit_user.tsx): persist user settings when 'add to team' clicked

* fix(team_endpoints.py): bulk add all proxy users to team

supports flow from UI to add all existing users to a team

* fix: minor fixes

* feat(user_edit_view.tsx): support setting no default model on user edit

allows preventing users from calling models outside team scope

* fix(user_edit_view.tsx): prevent triggering submit when 'cancel' is clicked

* refactor(internal_user_endpoints.py): refactor to reduce function size
2025-07-27 10:12:30 -07:00
Jugal D. Bhatt
b921e22594
[MCP Gateway] Litellm mcp multi header propagation (#13003)
* change alias-> server_name

* add server alias uses

* add tests

* schema

* ruff fix

* fix alias for config

* fix tests

* add alias

* fix tests

* add multi server header support

* add and fix tests

* fix tests

* fix tests

* add a common util

* ruff fix

* fix ruff

* fix tests

* fix migration

* mypy fix

* change server py
2025-07-26 11:45:14 -07:00
Krish Dholakia
4b50566d6d
[FEAT] Model-Guardrails: Add on UI (#13006)
* feat(proxy_server.py): working guardrails on streaming output

ensures guardrail actually raises an error if flagged during streaming output

* test: add unit tests

* feat(advanced_settings.tsx): add guardrails option as ui component on model add

enables setting guardrails on model add

* feat(add_model_tab.tsx): fix add model form

* feat(model_info_view.tsx): support adding guardrails on model update

* fix(add_model_tab.tsx/): working health check when guardrails selected

* fix(proxy_server.py): fix yield
2025-07-26 11:42:03 -07:00
Jugal D. Bhatt
586b1ec8b4
[Vector Store] make vector store permission management OSS (#12990)
* add vector store on ui behind enterprise in vector store

* remove enterprise
2025-07-26 11:13:49 -07:00
Jugal D. Bhatt
10595ea077
[MCP Gateway] add Litellm mcp alias for prefixing (#12994)
* change alias-> server_name

* add server alias uses

* add tests

* schema

* ruff fix

* fix alias for config

* fix tests

* add alias

* fix tests

* fix tests

* add a common util

* ruff fix

* fix migration
2025-07-25 17:57:52 -07:00
Jugal D. Bhatt
d1b63566ac
remove features from enterprise (#12988) 2025-07-25 10:55:28 -07:00
Krish Dholakia
dd607cd301
Show global retry policy on UI (#12969)
* fix(router.py): return global retry policy on `get/config/callbacks`

Partial fix for https://github.com/BerriAI/litellm/issues/12855

* fix(model_dashboard.tsx): accept global retry policy

Fixes https://github.com/BerriAI/litellm/issues/12855

* fix(model_dashboard.tsx): update global retry policy, if that's what was edited
2025-07-24 22:37:15 -07:00
Ishaan Jaff
d892e969ab ui new build 2025-07-24 21:27:06 -07:00
Ishaan Jaff
91eee78a8c Revert "EditAutoRouterTabProps"
This reverts commit 2835d3a374.
2025-07-24 21:26:01 -07:00
Ishaan Jaff
0630b52044 EditAutoRouterTabProps 2025-07-24 21:26:01 -07:00
Ishaan Jaff
39b0fe0bf7
[Feat] Edit Auto Router Settings on UI (#12966)
* EditAutoRouterTabProps

* Revert "EditAutoRouterTabProps"

This reverts commit 2835d3a374.

* add EditAutoRouterTab

* delete edit

* fixes for edit auto-router

* fix accessing model edit

* working edit auto router

* fix - edit remove custom model name

* fixes for edit auto router settings

* qa for adding a model router

* test fix
2025-07-24 21:25:48 -07:00
Ishaan Jaff
106a298f0a
[Feat] UI - Allow Adding LiteLLM Auto Router on UI (#12960)
* add router.json

* test_router_auto_router

* async_pre_routing_hook

* fixes for auto router

* add async_pre_routing_hook

* add LiteLLMRouterEncoder

* update test auto_router_embedding_model

* add auto_router_embedding_model

* add AutoRouter

* fix async_pre_routing_hook

* update async_pre_routing_hook

* fix auto router

* fix router.json

* working router init

* working embedding encoder

* working auto router

* test_router_auto_router

* test auto router

* add semantic-router as optional for litellm

* add extras

* semantic_router==0.1.10

* ruff fix

* use aiohttp==3.10.11

* python-dotenv==1.0.1

* test auto router

* test_router_auto_router

* semantic_router

* test_is_auto_router_deployment

* fix check

* fix docker build step

* add semantic_router

* UI  - Add auto router on litellm

* working utterances config

* fix route config builder

* kind of working add automodel router

* move loc of add deployment

* fixes for AutoRouter

* add auto_router_config in types.py

* fixes for init_auto_router_deployment

* fix adding auto router models

* working auto-router with dB

* Revert "add semantic_router"

This reverts commit 537b672887.

* TestAutoRouter

* fix linting

* add semantic router to docker

* test fix

* fix router config builder

* remove export button
2025-07-24 19:58:49 -07:00
Krish Dholakia
1a57875d24
Proxy - specify key_type - allows specifying if key can call LLM API routes vs. Management routes only (#12909)
* feat(key_management_endpoints.py): Support new 'key_type' field

allow user to specify if key should be 'management' or 'llm api' key

Security fix

* test(test_route_checks.py): add unit tests

* fix(create_key_button.tsx): add ui component to select key type

allows specifying if key can call llm api vs. management routes

* feat(create_key_button.tsx): add specifying key type to ui

* fix(route_checks.py): add sensitive data masker for user id on not allowed error message

prevent leaking sensitive information
2025-07-24 16:40:40 -07:00
Ishaan Jaff
3e529fae7f
[UI] Allow setting up CloudZero Usage through LiteLLM UI (#12923)
* refactor cz settings

* allow viewing/setting CZ settings

* working button

* fixes for export button

* nicer button

* fix className
2025-07-23 21:17:12 -07:00
Krrish Dholakia
4277becdc2 docs(credentials.tsx): cleanup reference to dead link 2025-07-23 09:02:39 -07:00
Krish Dholakia
d26f74ade5
Request Headers - support x-litellm-num-retries + Usage - support usage by model group (#12890)
* feat(litellm_pre_call_utils.py): add num_retries to litellm data for backend call

allow user to pass in num retries via request headers

* test(test_litellm_pre_call_utils.py): add unit test

* docs(request_headers.md): document new request header

* fix(common_daily_activity.py): show spend breakdown by model group

Partial fix for https://github.com/BerriAI/litellm/issues/12887

* feat(new_usage.tsx): new tab switcher for viewing usage by model group vs. received model

Closes https://github.com/BerriAI/litellm/issues/12887
2025-07-22 23:09:36 -07:00
Ishaan Jaff
bf300f8ca7 Revert "Litellm dev 07 21 2025 p1 (#12848)"
This reverts commit e4e10aa4ed.
2025-07-22 18:28:36 -07:00
tanjiro
03e420f91a
Improvements on the Regenerate Key Flow (#12788)
* improve regeneration ux

* toLocaleString

* regenerate key twice in a row

* fix delete key
2025-07-22 07:47:26 -07:00
Krish Dholakia
e4e10aa4ed
Litellm dev 07 21 2025 p1 (#12848)
* fix(main.py): fix async retryer

Fixes https://github.com/BerriAI/litellm/issues/12830

* fix(forward_clientside_headers_by_model_group.py): filter out 'content-type' from forwardable headers

clientside content-type != proxy content type, can cause requests to hang

* test(tests/): update tests
2025-07-21 22:09:39 -07:00
dependabot[bot]
2be16eb493
build(deps): bump form-data from 4.0.0 to 4.0.4 in /ui/litellm-dashboard (#12851)
---
updated-dependencies:
- dependency-name: form-data
  dependency-version: 4.0.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-21 22:05:38 -07:00
Ishaan Jaff
67edd7c481
fix team edit guardrail (#12823) 2025-07-21 11:44:22 -07:00