Commit graph

152 commits

Author SHA1 Message Date
Ishaan Jaff
d0cf0a55bb (UI) - allow assigning wildcard models to a team / key (#8041)
* fix message.error

* fix add return_wildcard_routes

* ui edit modelAvailableCall

* fetchAvailableModelsForTeamOrKey

* ui set all models for a team

* ui define common helpers

* edit create key button

* fix viewing model display names

* fix editing team models

* update gitignore

* add jest testing for ui

* Revert "add jest testing for ui"

This reverts commit 98f9a3ebfd.
2025-01-27 18:06:22 -08:00
Krish Dholakia
82ba5b29f3 Litellm dev 01 24 2025 p4 (#7992)
* feat(team_endpoints.py): new `/teams/available` endpoint - allows proxy admin to expose available teams for users to join on UI

* build(ui/): available_teams.tsx

allow user to join available teams on UI

makes it easier to onboard new users to teams

* fix(navbar.tsx): cleanup title

* fix(team_endpoints.py): fix linting error

* test: update groq model in test

* build(model_prices_and_context_window.json): update groq 3.3 model with 'supports function calling'
2025-01-24 21:29:37 -08:00
Ishaan Jaff
607fe8ac63 (UI) - Set/edit guardrails on a virtual key (#7954)
* Revert "JWT Auth - `enforce_rbac` support + UI team view, spend calc fix (#7863)"

This reverts commit dca6904937.

* Revert "Litellm dev 01 10 2025 p2 (#7679)"

This reverts commit c4780479a9.

* ui - allow setting guardrails on a key

* working edit guardrails

* fix edit guardrails on a key

* Revert "Revert "JWT Auth - `enforce_rbac` support + UI team view, spend calc fix (#7863)""

This reverts commit 8f7b9ae1af.

* Revert "Revert "Litellm dev 01 10 2025 p2 (#7679)""

This reverts commit a609139dde.

* fix edit guardrail on ui

* fix list_guardrails
2025-01-23 18:01:54 -08:00
Ishaan Jaff
8e92cd48a2 (UI Logs) - add pagination + filtering by key name/team name (#7860)
* fix remove emoji on logs page

* fix title of page

* ui - get countryIP

* ui lookup

* ui - get country from ip address

* show team and key alias on root

* working team / key filter

* working filters

* ui filtering by key / team alias

* simple search

* fix add pagination on view logs page

* add start / end time filters

* add custom time filter
2025-01-18 12:47:01 -08:00
Ishaan Jaff
16673ab488 (UI - View SpendLogs Table) (#7842)
* litellm log messages / responses

* add messages/response to schema.prisma

* add support for logging messages / responses in DB

* test_spend_logs_payload_with_prompts_enabled

* _get_messages_for_spend_logs_payload

* ui_view_spend_logs endpoint

* add tanstack and moment

* add uiSpendLogsCall

* ui view logs table

* ui view spendLogs table

* ui_view_spend_logs

* fix code quality

* test_spend_logs_payload_with_prompts_enabled

* _get_messages_for_spend_logs_payload

* test_spend_logs_payload_with_prompts_enabled

* test_spend_logs_payload_with_prompts_enabled

* ui view spend logs

* minor ui fix

* ui - update leftnav

* ui - clean up ui

* fix leftnav

* ui fix navbar

* ui fix moving chat ui tab
2025-01-17 18:53:45 -08:00
Krish Dholakia
e54d23c919 Litellm dev 01 10 2025 p2 (#7679)
* test(test_basic_python_version.py): assert all optional dependencies are marked as extras on poetry

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

* docs(secret.md): clarify 'read_and_write' secret manager usage on aws

* docs(secret.md): fix doc

* build(ui/teams.tsx): add edit/delete button for updating user / team membership on ui

allows updating user role to admin on ui

* build(ui/teams.tsx): display edit member component on ui, when edit button on member clicked

* feat(team_endpoints.py): support updating team member role to admin via api endpoints

allows team member to become admin post-add

* build(ui/user_dashboard.tsx): if team admin - show all team keys

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

* test(config.yml): add tomli to ci/cd

* test: don't call python_basic_testing in local testing (covered by python 3.13 testing)
2025-01-10 21:50:53 -08:00
Krish Dholakia
ebe113810b Create and view organizations + assign org admins on the Proxy UI (#7557)
* feat: initial commit for new 'organizations' tab on ui

* build(ui/): create generic card for rendering complete org data table

can be reused in teams as well

simplifies things

* build(ui/): display created orgs on ui

* build(ui/): support adding orgs via UI

* build(ui/): add org in selection dropdown

* build(organizations.tsx): allow assigning org admins

* build(ui/): show org members on ui

* build(ui/): cleanup + show actual models on org dropdown

* build(ui/): explain user roles within organization
2025-01-04 17:31:24 -08:00
Krish Dholakia
f832eb18ec Litellm dev 12 27 2024 p2 1 (#7449)
* fix(azure_ai/transformation.py): route ai.services.azure calls to the azure provider route

requires token to be passed in as 'api-key'

Closes https://github.com/BerriAI/litellm/issues/7275

* fix(key_management_endpoints.py): enforce user is member of team, if team_id set and team_id exists in team table

* fix(key_management_endpoints.py): handle assigned_user_id = none

* feat(create_key_button.tsx): allow assigning keys to other users

allows proxy admin to easily assign other people keys

* build(create_key_button.tsx): fix error message display

don't swallow the error message for key creation failure

* build(create_key_button.tsx): allow proxy admin to edit team id

* build(create_key_button.tsx): allow proxy admin to assign keys to other users

* build(edit_user.tsx): clarify how 'user budgets' are applied

* test: remove dup test

* fix(key_management_endpoints.py): don't raise error if team not in db

'

* test: fix test
2024-12-27 20:02:32 -08:00
Ishaan Jaff
b1c3e2d4ef (feat) UI - Disable Usage Tab once SpendLogs is 1M+ Rows (#7208)
* use utils to set proxy spend logs row count

* store proxy state variables

* fix check for _has_user_setup_sso

* fix proxyStateVariables

* fix dup code

* rename getProxyUISettings

* add fixes

* ui emit num spend logs rows

* test_proxy_server_prisma_setup

* use MAX_SPENDLOG_ROWS_TO_QUERY to constants

* test_get_ui_settings_spend_logs_threshold
2024-12-12 18:43:17 -08:00
Krish Dholakia
df3da2e5d2 Litellm dev 12 06 2024 (#7067)
* fix(edit_budget_modal.tsx): call `/budget/update` endpoint instead of `/budget/new`

allows updating existing budget on ui

* fix(user_api_key_auth.py): support cost tracking for end user via jwt field

* fix(presidio.py): support pii masking on sync logging callbacks

enables masking before logging to langfuse

* feat(utils.py): support retry policy logic inside '.completion()'

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

* fix(utils.py): support retry by retry policy on async logic as well

* fix(handle_jwt.py): set leeway default leeway value

* test: fix test to handle jwt audience claim
2024-12-06 22:44:18 -08:00
Krish Dholakia
c9318e08ad Litellm dev 11 23 2024 (#6881)
* build(ui/create_key_button.tsx): support adding tags for cost tracking/routing when making key

* LiteLLM Minor Fixes & Improvements (11/23/2024)  (#6870)

* feat(pass_through_endpoints/): support logging anthropic/gemini pass through calls to langfuse/s3/etc.

* fix(utils.py): allow disabling end user cost tracking with new param

Allows proxy admin to disable cost tracking for end user - keeps prometheus metrics small

* docs(configs.md): add disable_end_user_cost_tracking reference to docs

* feat(key_management_endpoints.py): add support for restricting access to `/key/generate` by team/proxy level role

Enables admin to restrict key creation, and assign team admins to handle distributing keys

* test(test_key_management.py): add unit testing for personal / team key restriction checks

* docs: add docs on restricting key creation

* docs(finetuned_models.md): add new guide on calling finetuned models

* docs(input.md): cleanup anthropic supported params

Closes https://github.com/BerriAI/litellm/issues/6856

* test(test_embedding.py): add test for passing extra headers via embedding

* feat(cohere/embed): pass client to async embedding

* feat(rerank.py): add `/v1/rerank` if missing for cohere base url

Closes https://github.com/BerriAI/litellm/issues/6844

* fix(main.py): pass extra_headers param to openai

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

* fix(litellm_logging.py): don't disable global callbacks when dynamic callbacks are set

Fixes issue where global callbacks - e.g. prometheus were overriden when langfuse was set dynamically

* fix(handler.py): fix linting error

* fix: fix typing

* build: add conftest to proxy_admin_ui_tests/

* test: fix test

* fix: fix linting errors

* test: fix test

* fix: fix pass through testing

* feat(key_management_endpoints.py): allow proxy_admin to enforce params on key creation

allows admin to force team keys to have tags

* build(ui/): show teams in leftnav + allow team admin to add new members

* build(ui/): show created tags in dropdown

makes it easier for admin to add tags to keys

* test(test_key_management.py): fix test

* test: fix test

* fix playwright e2e ui test

* fix e2e ui testing deps

* fix: fix linting errors

* fix e2e ui testing

* fix e2e ui testing, only run e2e ui testing in playwright

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
2024-11-23 22:37:16 +05:30
Ishaan Jaff
1542bf5908 (UI) Delete Internal Users on Admin UI (#6442)
* add /user/delete call

* ui show modal asking if you want to delete user

* fix delete user modal
2024-10-26 11:41:37 +04:00
Ishaan Jaff
dd2cbee48a ui networking list all teams (#5851) 2024-09-23 13:16:18 -07:00
Ishaan Jaff
80e0a4f8fb [SSO-UI] Set new sso users as internal_view role users (#5824)
* use /user/list endpoint on admin ui

* sso insert user with role when user does not exist

* add sso sign in test

* linting fix

* rename self serve doc

* add doc for self serve flow

* test - sso sign in default values

* add test for /user/list endpoint
2024-09-21 16:43:52 -07:00
Ishaan Jaff
cbab903d52 ui fix correct team not loading (#5804)
* ui fix correct team not loading

* ui fix
2024-09-20 08:08:56 -07:00
Ishaan Jaff
36018a8e59 [ Proxy - User Management]: If user assigned to a team don't show Default Team (#5791)
* rename endpoint to ui_settings

* ui allow DEFAULT_TEAM_DISABLED

* fix logic

* docs Set `default_team_disabled: true` on your litellm config.yaml
2024-09-19 17:13:58 -07:00
Ishaan Jaff
24db6f94aa working regen flow 2024-09-06 14:10:02 -07:00
Ishaan Jaff
0aacf6d7e7 working regenerate key flow 2024-08-26 18:28:26 -07:00
Krrish Dholakia
1c2decbfdd feat(ui): for adding pass-through endpoints 2024-08-15 21:58:11 -07:00
Ishaan Jaff
d5755e1932 ui - handle session expired on ui 2024-08-13 17:09:56 -07:00
Krrish Dholakia
0b8cade30d fix(teams.tsx): reduce network calls to /team/info 2024-08-10 15:24:23 -07:00
Krrish Dholakia
cbad9e7502 build(ui): allow admin_viewer to view teams tab
Allows admin viewe role to see available teams on proxy ui
2024-08-02 16:19:40 -07:00
Ishaan Jaff
f9e6ac0542 switch off prod logs on ui 2024-07-30 13:23:45 -07:00
Ishaan Jaff
c2289afee8 swithc off console log in prod 2024-07-30 13:02:55 -07:00
Ishaan Jaff
5979c17d07 ui new build 2024-07-29 21:20:27 -07:00
Ishaan Jaff
571974cdbb ui use setGlobalLitellmHeaderName 2024-07-29 16:58:56 -07:00
Ishaan Jaff
d98dd53755 add litellm_header_name endpoint 2024-07-26 21:04:31 -07:00
Ishaan Jaff
1aabe3ceb4 ui new build 2024-07-19 11:00:13 -07:00
Ishaan Jaff
0c3ed2441f ui - only show 1 message when session expires + redirect 2024-07-19 10:47:53 -07:00
Ishaan Jaff
7e2dae55d8 ui - get, set, delete allowed ip addresses 2024-07-09 15:43:44 -07:00
Ishaan Jaff
1657619ab9 fix don't spam model hub when model list is not defined 2024-07-06 10:39:16 -07:00
Ishaan Jaff
afa146fc4d fix - don't spam users when model list not defined 2024-07-06 10:36:14 -07:00
Ishaan Jaff
5235be4fcf ui fix - load litellm model list 2024-07-06 10:12:14 -07:00
Ishaan Jaff
1a22ee9152 ui - add new cache hits page 2024-06-21 13:10:40 -07:00
Ishaan Jaff
09603ae9ff fix modelCostMap on ui 2024-06-12 19:57:52 -07:00
Ishaan Jaff
3fba3cf8b7 fix - don't raise error when logout url does not load 2024-06-12 19:30:37 -07:00
Ishaan Jaff
141775279e ui -set custom base url and logout url 2024-06-07 19:00:09 -07:00
Krrish Dholakia
eb1f244b90 feat(create_user_button.tsx): allow admin to invite user to proxy via invite-links
makes it easier for proxy admin to debug what different roles can/can't do
2024-06-05 15:55:39 -07:00
Ishaan Jaff
5567cf7683 ui - filter analytics by customer 2024-06-03 20:41:31 -07:00
Ishaan Jaff
f6353a39de ui - view all end-users on admin ui 2024-06-03 20:26:09 -07:00
Ishaan Jaff
7d20000c3e ui - update model metrics by api key / service 2024-06-03 19:48:01 -07:00
Ishaan Jaff
d00f02a75a feat - clea up usage tab 2024-06-03 15:42:37 -07:00
Ishaan Jaff
8c5b3c6492 ui - working filter by tag 2024-06-03 14:15:51 -07:00
Ishaan Jaff
28b4e61a28 ui - new build 2024-05-31 16:20:45 -07:00
Ishaan Jaff
2d81ecdf8b Merge branch 'main' into litellm_invite_link_flow_2 2024-05-31 08:14:52 -07:00
Ishaan Jaff
5088024dc6 fix -show num rate limit errors 2024-05-30 20:50:52 -07:00
Ishaan Jaff
d78492b050 fix adminGlobalActivityExceptions 2024-05-30 18:08:20 -07:00
Ishaan Jaff
fab3b889e4 fix - edit user role on admin ui 2024-05-30 16:11:58 -07:00
Krrish Dholakia
991fc9563a feat: e2e flow complete - admin can invite new users to proxy via invite links
Completes https://github.com/BerriAI/litellm/issues/3863
2024-05-27 23:19:30 -07:00
Krrish Dholakia
abdc5b357f feat(model_hub.tsx): enable admin to expose a public model hub 2024-05-27 17:45:45 -07:00