Commit graph

1273 commits

Author SHA1 Message Date
Ishaan Jaff
1d4fea509d ui new build 2025-04-15 22:36:44 -07:00
Ishaan Jaff
bd88263b29
[Feat - Cost Tracking improvement] Track prompt caching metrics in DailyUserSpendTransactions (#10029)
* stash changes

* emit cache read/write tokens to daily spend update

* emit cache read/write tokens on daily activity

* update types.ts

* docs prompt caching

* undo ui change

* fix activity metrics

* fix prompt caching metrics

* fix typed dict fields

* fix get_aggregated_daily_spend_update_transactions

* fix aggregating cache tokens

* test_cache_token_fields_aggregation

* daily_transaction

* add cache_creation_input_tokens and cache_read_input_tokens to LiteLLM_DailyUserSpend

* test_daily_spend_update_queue.py
2025-04-15 21:40:57 -07:00
Ishaan Jaff
70d740332f
[UI Polish] UI fixes for cache control injection settings (#10031)
* ui fixes for cache control

* docs inject cache control settings
2025-04-15 21:10:08 -07:00
dependabot[bot]
81e7741107
build(deps): bump @babel/runtime in /ui/litellm-dashboard (#10001)
Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.23.9 to 7.27.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.27.0/packages/babel-runtime)

---
updated-dependencies:
- dependency-name: "@babel/runtime"
  dependency-version: 7.27.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-15 16:35:26 -07:00
Ishaan Jaff
09df3815b8 docs cache control injection points 2025-04-15 15:43:58 -07:00
Ishaan Jaff
b210639dce ui new build 2025-04-14 21:19:21 -07:00
Ishaan Jaff
c1a642ce20
[UI] Allow setting prompt cache_control_injection_points (#10000)
* test_anthropic_cache_control_hook_system_message

* test_anthropic_cache_control_hook.py

* should_run_prompt_management_hooks

* fix should_run_prompt_management_hooks

* test_anthropic_cache_control_hook_specific_index

* fix test

* fix linting errors

* ChatCompletionCachedContent

* initial commit for cache control

* fixes ui design

* fix inserting cache_control_injection_points

* fix entering cache control points

* fixes for using cache control on ui + backend

* update cache control settings on edit model page

* fix init custom logger compatible class

* fix linting errors

* fix linting errors

* fix get_chat_completion_prompt
2025-04-14 21:17:42 -07:00
Ishaan Jaff
0e99f83cc2 team info fix default index 2025-04-12 21:06:57 -07:00
Ishaan Jaff
72c1f7e09a ui new build 2025-04-12 20:42:43 -07:00
Ishaan Jaff
89dfb42697
[UI QA checklist] (#9957)
* fix typo on UI

* fix for edit user tab

* fix for user spend

* add /team/permissions_list to management routes

* fix auth check for team member permissions

* fix team endpoints test
2025-04-12 20:41:50 -07:00
Krish Dholakia
00e49380df
Litellm UI qa 04 12 2025 p1 (#9955)
* fix(model_info_view.tsx): cleanup text

* fix(key_management_endpoints.py): fix filtering litellm-dashboard keys for internal users

* fix(proxy_track_cost_callback.py): prevent flooding spend logs with admin endpoint errors

* test: add unit testing for logic

* test(test_auth_exception_handler.py): add more unit testing

* fix(router.py): correctly handle retrieving model info on get_model_group_info

fixes issue where model hub was showing None prices

* fix: fix linting errors
2025-04-12 19:30:48 -07:00
Ishaan Jaff
4e81b2cab4
[Team Member permissions] - Fixes (#9945)
* only load member permissions for non-admins

* run member permission checks on update + regenerate endpoints

* run check for /key/generate

* working test_default_member_permissions

* passing test with permissions on update delete endpoints

* test_create_permissions

* _team_key_generation_check

* fix TeamBase

* fix team endpoints

* fix api docs check
2025-04-12 11:17:51 -07:00
Ishaan Jaff
69a3aab4c8 ui new build 2025-04-12 09:13:00 -07:00
Ishaan Jaff
cc8eebe349
[UI] Linting fixes (#9933)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 16s
Helm unit test / unit-test (push) Successful in 22s
* bump openai js version used on ui

* fix linting
2025-04-11 21:23:59 -07:00
Ishaan Jaff
e62f27188c
[UI] - Add Managing Team Member permissions on UI (#9927)
* add getTeamPermissionsCall and teamPermissionsUpdateCall to networking

* add ui changes for team member permission management

* fix linting error
2025-04-11 21:08:35 -07:00
Ishaan Jaff
7fde06d8d3
[UI] Render Reasoning content, ttft, usage metrics on test key page (#9931)
* add BaseReasoningEffortTests

* BaseReasoningLLMTests

* fix test rename

* docs update thinking / reasoning content docs

* show reasoning content on chat ui

* chat ui allow pasting in content

* chat ui fix size

* chat ui, show num reasoning tokens used

* ui render usage metrics on test key page
2025-04-11 21:08:10 -07:00
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