Commit graph

1257 commits

Author SHA1 Message Date
Ishaan Jaff
8b1d2d6956
[Feat - UI] - Allow setting Default Team setting when LiteLLM SSO auto creates teams (#9918)
* endpoint for updating default team settings on ui

* add GET default team settings endpoint

* ui expose default team settings on UI

* update to use DefaultTeamSSOParams

* DefaultTeamSSOParams

* fix DefaultTeamSSOParams

* docs team management

* test_update_default_team_settings
2025-04-11 14:07:10 -07:00
Krrish Dholakia
a1433da4a7 fix: transform_request.tsx
don't hardcode to localhost
2025-04-09 17:50:13 -07:00
Krrish Dholakia
3f3afabda9 feat(leftnav.tsx): show api playground on UI
allows easy testing on UI
2025-04-09 17:50:13 -07:00
Krrish Dholakia
b11c08bde3 fix(new_usage.tsx): increase page size + iterate through all pages if multiple pages 2025-04-09 17:50:13 -07:00
Christian Owusu
d4e5da87be
Reflect key and team update in UI (#9825)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 16s
Helm unit test / unit-test (push) Successful in 23s
* Reflect updates to keys in UI instantly

* Reflect updates to teams in UI instantly
2025-04-09 07:47:16 -07:00
dependabot[bot]
73356b3a9f
Bump next from 14.2.25 to 14.2.26 in /ui/litellm-dashboard (#9716)
Bumps [next](https://github.com/vercel/next.js) from 14.2.25 to 14.2.26.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.2.25...v14.2.26)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 14.2.26
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-08 14:15:19 -07:00
Ishaan Jaff
ff3a6830a4
[Feat] LiteLLM Tag/Policy Management (#9813)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 15s
Helm unit test / unit-test (push) Successful in 21s
* rendering tags on UI

* use /models for building tags

* CRUD endpoints for Tag management

* fix tag management

* working api for LIST tags

* working tag management

* refactor UI components

* fixes ui tag management

* clean up ui tag management

* fix tag management ui

* fix show allowed llms

* e2e tag controls

* stash change for rendering tags on UI

* ui working tag selector on Test Key page

* fixes for tag management

* clean up tag info

* fix code quality

* test for tag management

* ui clarify what tag routing is
2025-04-07 21:54:24 -07:00
Ishaan Jaff
7f6de81196 ui new build 2025-04-05 12:30:37 -07:00
Ishaan Jaff
80eb1ac8fa
[UI QA/Bug Fix] - Don't change team, key, org, model values on scroll (#9776)
* UI - use 1 component for numerical input

* disable scroll number values on models page

* team edit - disable numerical value scroll

* fix numerical input view

* use numerical component on create key

* add NumericalInput

* ui fix org numerical input

* remove file in incorrect location

* fix NumericalInput
2025-04-05 12:29:31 -07:00
Krish Dholakia
d66db2207b
Allow team members to see team models (#9742)
* fix(proxy_server.py): allow team member to see team models

* fix(model_dashboard.tsx): show edit + delete icons to be disabled if user is not admin and did not create models

* fix(proxy_server.py): fix ruff function size error

* fix(proxy_server.py): fix user model filter check
2025-04-04 20:36:48 -07:00
Ishaan Jaff
cba1dacc7d ui new build 2025-04-04 14:39:55 -07:00
Ishaan Jaff
e67d16d5bd
Merge pull request #9748 from BerriAI/litellm_ui_allow_testing_image_endpoints
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 18s
Helm unit test / unit-test (push) Successful in 22s
[Feat] UI - Test Key v2 page - allow testing image endpoints + polish the page
2025-04-03 22:39:45 -07:00
Ishaan Jaff
c8468b71c8 fix linting ui 2025-04-03 22:32:56 -07:00
Ishaan Jaff
f6c2b86903 fix typo 2025-04-03 22:21:11 -07:00
Ishaan Jaff
d55d37ad99 ui new chat ui endpoints 2025-04-03 22:11:04 -07:00
Ishaan Jaff
e91dc1e00f refactor chat playground 2025-04-03 21:57:05 -07:00
Ishaan Jaff
353c882574 clean up endpoint selector 2025-04-03 21:33:39 -07:00
Ishaan Jaff
72d7b26811 fix allow selecting endpoint on test key page 2025-04-03 21:00:42 -07:00
Ishaan Jaff
747894864c use litellm mapping 2025-04-03 20:05:11 -07:00
Krish Dholakia
cb4a9d1365
UI Improvements + Fixes - remove 'default key' on user signup + fix showing user models available for personal key creation (#9741)
* fix(create_user_button.tsx): don't auto create key on user signup

prevents unknown key from being created whenever user signs up

* fix(top_key_view.tsx): show key hash on hover for new usage tab

* fix(create_key_button.tsx): fix showing user models they have access to during personal key creatio
2025-04-03 20:00:45 -07:00
Ishaan Jaff
b361329e07 use 1 file for fetch model options 2025-04-03 19:27:44 -07:00
Ishaan Jaff
6ffe3f1e46 working image generation on chat ui 2025-04-03 14:43:56 -07:00
Ishaan Jaff
e44318c605 refactor to have 1 folder for llm api calls 2025-04-03 14:32:20 -07:00
Krish Dholakia
6dda1ba6dd
LiteLLM Minor Fixes & Improvements (04/02/2025) (#9725)
* Add date picker to usage tab + Add reasoning_content token tracking across all providers on streaming (#9722)

* feat(new_usage.tsx): add date picker for new usage tab

allow user to look back on their usage data

* feat(anthropic/chat/transformation.py): report reasoning tokens in completion token details

allows usage tracking on how many reasoning tokens are actually being used

* feat(streaming_chunk_builder.py): return reasoning_tokens in anthropic/openai streaming response

allows tracking reasoning_token usage across providers

* Fix update team metadata + fix bulk adding models on Ui  (#9721)

* fix(handle_add_model_submit.tsx): fix bulk adding models

* fix(team_info.tsx): fix team metadata update

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

* (v0) Unified file id - allow calling multiple providers with same file id (#9718)

* feat(files_endpoints.py): initial commit adding 'target_model_names' support

allow developer to specify all the models they want to call with the file

* feat(files_endpoints.py): return unified files endpoint

* test(test_files_endpoints.py): add validation test - if invalid purpose submitted

* feat: more updates

* feat: initial working commit of unified file id translation

* fix: additional fixes

* fix(router.py): remove model replace logic in jsonl on acreate_file

enables file upload to work for chat completion requests as well

* fix(files_endpoints.py): remove whitespace around model name

* fix(azure/handler.py): return acreate_file with correct response type

* fix: fix linting errors

* test: fix mock test to run on github actions

* fix: fix ruff errors

* fix: fix file too large error

* fix(utils.py): remove redundant var

* test: modify test to work on github actions

* test: update tests

* test: more debug logs to understand ci/cd issue

* test: fix test for respx

* test: skip mock respx test

fails on ci/cd - not clear why

* fix: fix ruff check

* fix: fix test

* fix(model_connection_test.tsx): fix linting error

* test: update unit tests
2025-04-03 11:48:52 -07:00
Krish Dholakia
3d0313b15b
Litellm user daily activity allow non admin usage (#9695)
* feat(internal_user_endpoints.py): allow non-admin to view their own usage via `/user/daily/activity` route

* fix(leftnav.tsx): allow users to view their own usage via new_usage.tsx

allows internal users to see their usage via new api

Handles 1m+ spend logs scenario

* fix(leftnav.tsx): allow all users to see new usage tab
2025-04-01 22:27:26 -07:00
Krrish Dholakia
0cfc3e822c build: new ui build 2025-04-01 19:44:23 -07:00
Krrish Dholakia
09214574b0 build(ui/): update ui build 2025-04-01 19:38:41 -07:00
Krish Dholakia
60863bb134
UI - New Usage Tab fixes (#9696)
* fix(new_usage.tsx): enable smooth scrolling - remove double scroll bars

enables easier viewing of overflowing content

* fix(new_usage.tsx): fix ordering of daily spend

ensure always from earliest to latest date

* feat(internal_user_endpoints.py): return key alias on `/user/daily/activity`

Enables easier consumption on UI

* fix(new_usage.tsx): show key alias on usage tab

* feat(activity_metric.tsx): new activity panel - showing spend per model per day

allows debugging if models are not being tracked

* fix(top_key_view.tsx): use consistent param for selecting key
2025-04-01 19:36:00 -07:00
Krish Dholakia
62ad84fb64
UI (new_usage.tsx): Report 'total_tokens' + report success/failure calls (#9675)
* feat(internal_user_endpoints.py): return 'total_tokens' in `/user/daily/analytics`

* test(test_internal_user_endpoints.py): add unit test to assert spend metrics and dailyspend metadata always report the same fields

* build(schema.prisma): record success + failure calls to daily user table

allows understanding why model requests might exceed provider requests (e.g. user hit rate limit error)

* fix(internal_user_endpoints.py): report success / failure requests in API

* fix(proxy/utils.py): default to success

status can be missing or none at times for successful requests

* feat(new_usage.tsx): show success/failure calls on UI

* style(new_usage.tsx): ui cleanup

* fix: fix linting error

* fix: fix linting error

* feat(litellm-proxy-extras/): add new migration files
2025-03-31 22:48:43 -07:00
Ishaan Jaff
eb4b8d9e7d fix linting on DataTableWrapper 2025-03-29 17:50:19 -07:00
Ishaan Jaff
09e073d57b ui mcp tools 2025-03-29 17:04:32 -07:00
Ishaan Jaff
f2885bfb65 add code example 2025-03-29 16:48:38 -07:00
Ishaan Jaff
fe6c033427 render MCP tools on ui logs page 2025-03-29 16:01:34 -07:00
Ishaan Jaff
a4a083041d working MCP call tool method 2025-03-29 14:42:19 -07:00
Ishaan Jaff
e0cff7595c endpoints to list and call tools 2025-03-29 14:31:35 -07:00
Ishaan Jaff
b381dde9ac basic UI rendering of MCP tools 2025-03-29 14:30:34 -07:00
Krish Dholakia
cdcc8ea9b7
Connect UI to "LiteLLM_DailyUserSpend" spend table - enables usage tab to work at 1m+ spend logs (#9603)
* feat(spend_management_endpoints.py): expose new endpoint for querying user's usage at 1m+ spend logs

Allows user to view their spend at 1m+ spend logs

* build(schema.prisma): add api_requests to dailyuserspend table

* build(migration.sql): add migration file for new column to daily user spend table

* build(prisma_client.py): add logic for copying over migration folder, if deploy/migrations present in expected location

enables easier testing of prisma migration flow

* build(ui/): initial commit successfully using the dailyuserspend table on the UI

* refactor(internal_user_endpoints.py): refactor `/user/daily/activity` to give breakdowns by provider/model/key

* feat: feature parity (cost page) with existing 'usage' page

* build(ui/): add activity tab to new_usage.tsx

gets to feature parity on 'All Up' page of 'usage.tsx'

* fix(proxy/utils.py): count number of api requests in daily user spend table

allows us to see activity by model on new usage tab

* style(new_usage.tsx): fix y-axis to be in ascending order of date

* fix: fix linting errors

* fix: fix ruff check errors
2025-03-27 23:29:15 -07:00
Krish Dholakia
fb83567a03
Litellm new UI build (#9601)
* build: new ui build

* build: new ui build

* fix(proxy_server.py): only show user models their key can access on `/models`

* fix(model_management_endpoints.py): ensure team admin can add models

* test: update unit testing to reflect changes

* fix(model_dashboard.tsx): fix sizing on models page

* build: fix ui
2025-03-27 17:15:25 -07:00
Krish Dholakia
63c9f59373
Allow team admins to add/update/delete models on UI + show api base and model id on request logs (#9572)
* feat(view_logs.tsx): show model id + api base in request logs

easier debugging

* fix(index.tsx): fix length of api base

easier viewing

* refactor(leftnav.tsx): show models tab to team admin

* feat(model_dashboard.tsx): add explainer for what the 'models' page is for team admin

helps them understand how they can use it

* feat(model_management_endpoints.py): restrict model add by team to just team admin

allow team admin to add models via non-team keys (e.g. ui token)

* test(test_add_update_models.py): update unit testing for new behaviour

* fix(model_dashboard.tsx): show user the models

* feat(proxy_server.py): add new query param 'user_models_only' to `/v2/model/info`

Allows user to retrieve just the models they've added

Used in UI to show internal users just the models they've added

* feat(model_dashboard.tsx): allow team admins to view their own models

* fix: allow ui user to fetch model cost map

* feat(add_model_tab.tsx): require team admins to specify team when onboarding models

* fix(_types.py): add `/v1/model/info` to info route

`/model/info` was already there

* fix(model_info_view.tsx): allow user to edit a model they created

* fix(model_management_endpoints.py): allow team admin to update team model

* feat(model_managament_endpoints.py): allow team admin to delete team models

* fix(model_management_endpoints.py): don't require team id to be set when adding a model

* fix(proxy_server.py): fix linting error

* fix: fix ui linting error

* fix(model_management_endpoints.py): ensure consistent auth checks on all model calls

* test: remove old test - function no longer exists in same form

* test: add updated mock testing
2025-03-27 12:06:31 -07:00
Krish Dholakia
6ba31e1d84
Allow viewing keyinfo on request logs (#9568)
* feat(view_logs.tsx): show model id + api base in request logs

easier debugging

* fix(index.tsx): fix length of api base

easier viewing

* build(ui/): initial commit allowing user to click into key from request logs

allows easier debugging of 'what key is this?
2025-03-26 23:11:15 -07:00
dependabot[bot]
d5242d0318
build(deps): bump next from 14.2.21 to 14.2.25 in /ui/litellm-dashboard
Bumps [next](https://github.com/vercel/next.js) from 14.2.21 to 14.2.25.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v14.2.21...v14.2.25)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-22 04:04:46 +00:00
Artur Zdolinski
f3e782e3aa
remove linter changes to match old code style 2025-03-19 22:35:14 +01:00
azdolinski
95c762e572 sync_latest_changes 2025-03-19 14:47:34 +00:00
Artur Zdolinski
3be8e07d46
Merge branch 'BerriAI:main' into litellm_fix_icons 2025-03-19 15:40:49 +01:00
azdolinski
044508e075 set_local_icons 2025-03-19 14:37:57 +00:00
Ishaan Jaff
5e892a1e92 ui new build
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 18s
Helm unit test / unit-test (push) Successful in 22s
2025-03-18 11:46:23 -07:00
Ishaan Jaff
807054cadd ui fix linting error 2025-03-18 11:45:22 -07:00
Ishaan Jaff
7577146fe5 fix linting error 2025-03-17 22:07:36 -07:00
Ishaan Jaff
e35aa444c3 show sso settings on ui 2025-03-17 22:00:33 -07:00
Ishaan Jaff
7a29c08f7b ui polish order of settings 2025-03-17 21:59:25 -07:00