Commit graph

96 commits

Author SHA1 Message Date
Ishaan Jaff
0ced13aec8
Virtual Keys: Filter by key alias (#10035) (#10085)
Co-authored-by: Christian Owusu <36159205+crisshaker@users.noreply.github.com>
2025-04-16 19:46:05 -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
Ishaan Jaff
43b7460968 ui - instantly show new ui keys 2025-03-14 09:18:22 -07:00
Ishaan Jaff
04662c653f ui - instantly show changes to create key table 2025-03-14 09:12:30 -07:00
Ishaan Jaff
0e7fd162f4
(UI) - Keys Page - Show 100 Keys Per Page, Use full height, increase width of key alias (#9064)
* show 100 keys + increase height of keys

* fix key_alias

* litellm show key alias full width
2025-03-07 15:43:10 -08:00
Krish Dholakia
bdc1a72542
refactor(teams.tsx): refactor to display all teams, across all orgs (#8565)
* refactor(teams.tsx): refactor to display all teams, across all orgs

removes org switcher from navbar, simplifies viewing/creating teams on UI

* fix(key_list.tsx): show user keys across all orgs

make it easy to see flat list of keys across orgs on key table

* style(all_keys_table.tsx): cleanup keys table

* fix(user_dashboard.tsx): remove overflow-hidden in dashboard component

* fix(teams.tsx): move org id placement in create team flow

* fix(teams.tsx): support model selection on create team based on selected org

* feat(view_key_table.tsx): move to using a filter component on keys page

allows filtering keys by org and team

* fix(filter.tsx): handle reset filter

* fix: fix linting error

* (Feat) - return `x-litellm-attempted-fallbacks` in responses from litellm proxy  (#8558)

* add_fallback_headers_to_response

* test x-litellm-attempted-fallbacks

* unit test attempted fallbacks

* fix add_fallback_headers_to_response

* docs document response headers

* fix file name

* test fix use mock endpoints for e2e files and ft tests

* Revert "test fix use mock endpoints for e2e files and ft tests"

This reverts commit c921d8dd81.

* cleanup_azure_files

* Add remaining org CRUD endpoints + support deleting orgs on UI  (#8561)

* feat(organization_endpoints.py): expose new `/organization/delete` endpoint. Cascade org deletion to member, teams and keys

Ensures any org deletion is handled correctly

* test(test_organizations.py): add simple test to ensure org deletion works

* feat(organization_endpoints.py): expose /organization/update endpoint, and define response models for org delete + update

* fix(organizations.tsx): support org delete on UI + move org/delete endpoint to use DELETE

* feat(organization_endpoints.py): support `/organization/member_update` endpoint

Allow admin to update member's role within org

* feat(organization_endpoints.py): support deleting member from org

* test(test_organizations.py): add e2e test to ensure org member flow works

* fix(organization_endpoints.py): fix code qa check

* fix(schema.prisma): don't introduce ondelete:cascade - breaking change

* docs(organization_endpoints.py): document missing params

* refactor(organization_view.tsx): initial commit creating a generic update member component shared between org and team member classes

* feat(organization_view.tsx): support updating org member role on UI

* feat(organization_view.tsx): allow proxy admin to delete members from org

* Enable update/delete org members on UI  (#8560)

* feat(organization_endpoints.py): expose new `/organization/delete` endpoint. Cascade org deletion to member, teams and keys

Ensures any org deletion is handled correctly

* test(test_organizations.py): add simple test to ensure org deletion works

* feat(organization_endpoints.py): expose /organization/update endpoint, and define response models for org delete + update

* fix(organizations.tsx): support org delete on UI + move org/delete endpoint to use DELETE

* feat(organization_endpoints.py): support `/organization/member_update` endpoint

Allow admin to update member's role within org

* feat(organization_endpoints.py): support deleting member from org

* test(test_organizations.py): add e2e test to ensure org member flow works

* fix(organization_endpoints.py): fix code qa check

* fix(schema.prisma): don't introduce ondelete:cascade - breaking change

* docs(organization_endpoints.py): document missing params

* (Bug Fix) - Add Regenerate Key on Virtual Keys Tab (#8567)

* add regenerate key to ui

* ui fix key info

* (Bug Fix + Better Observability) - BudgetResetJob:  (#8562)

* use class ResetBudgetJob

* refactor reset budget job

* update reset_budget job

* refactor reset budget job

* fix LiteLLM_UserTable

* refactor reset budget job

* add telemetry for reset budget job

* dd - log service success/failure on DD

* add detailed reset budget reset info on DD

* initialize_scheduled_background_jobs

* refactor reset budget job

* trigger service failure hook when fails to reset a budget for team, key, user

* fix resetBudgetJob

* unit testing for ResetBudgetJob

* test_duration_in_seconds_basic

* testing for triggering service logging

* fix logs on test teams fail

* remove unused imports

* fix import duration in s

* duration_in_seconds

* (Patch/bug fix) - UI, filter out litellm ui session tokens on Virtual Keys Page (#8568)

* fix key list endpoint

* _get_condition_to_filter_out_ui_session_tokens

* duration_in_seconds

* test_list_key_helper_team_filtering

* bump: version 1.61.4 → 1.61.5

* ui fix tsx linting

* ui new build

* test_list_key_helper_team_filtering

* ui new build

* test_openai_fine_tuning

* test_openai_fine_tuning

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
2025-02-15 23:50:11 -08:00
Ishaan Jaff
3cfb44ba88
(UI) - Refactor View Key Table (#8526)
* new key table

* clean up

* fix view all team keys

* fixed create key button

* show all keys

* ui select team flow

* pagination on keys

* fix aligning of team and pagination

* show key hash

* allow clicking into key

* click into a key

* add current status

* fix key alias edit

* delete key

* fix(create_key_button.tsx): allow user to select team when creating key

* working edit key

* feat(create_key_button.tsx): switch available models based on selected team

enables user to create a key for a specific team

* fix(create_key_button.tsx): improve type safety of component

* fix(create_key_button.tsx): style cleanup

* pass team all the way thru

* refactor getTeamModels

* fix(columns.tsx): make cost easier to see

* ui fix edit key ui

* cleanup

* fix linting error

* fix filter

* fix linting

* ui fix all keys

* fix linting

* fix linting

* fix org id

* fix linting

* fix linting

* fix linting

* fix linting

* fix linting

* fix linting

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>
2025-02-13 21:51:54 -08:00
Krish Dholakia
1195fe2a44
Litellm UI stable version 02 12 2025 (#8497)
* fix(key_management_endpoints.py): fix `/key/list` to include `return_full_object` as a top-level query param

Allows user to specify they want the keys as a list of objects

* refactor(key_list.tsx): initial refactor of key table in user dashboard

offloads key filtering logic to backend api

prevents common error of user not being able to see their keys

* fix(key_management_endpoints.py): allow internal user to query `/key/list` to see their keys

* fix(key_management_endpoints.py): add validation checks and filtering to `/key/list` endpoint

allow internal user to see their keys. not anybody else's

* fix(view_key_table.tsx): fix issue where internal user could not see default team keys

* fix: fix linting error

* fix: fix linting error

* fix: fix linting error

* fix: fix linting error

* fix: fix linting error

* fix: fix linting error

* fix: fix linting error
2025-02-12 18:01:57 -08:00
Krish Dholakia
13a3e8630e
Org UI Improvements (#8436)
* feat(team_endpoints.py): support returning teams filtered by organization_id

allows user to just get teams they belong to, within the org

Enables org admin to see filtered list of teams on UI

* fix(teams.tsx): simple filter for team on ui - just filter team based on selected org id

* feat(ui/organizations): show 'default org' in switcher, filter teams based on selected org

* feat(user_dashboard.tsx): update team in switcher when org changes

* feat(schema.prisma): add new 'organization_id' value to key table

allow org admin to directly issue keys to a user within their org

* fix(view_key_table.tsx): fix regression where admin couldn't see keys

caused by bad console log statement

* fix(team_endpoints.py): handle default org value in /team/list

* fix(key_management_endpoints.py): allow proxy admin to create keys for team they're not in

* fix(team_endpoints.py): fix team endpoint to handle org id not being passed in

* build(config.yml): investigate what pkg is installing posthog in ci/cd

* ci(config.yml): uninstall posthog

prevent it from being added in ci/cd

* ci: auto-install ci
2025-02-10 19:13:32 -08:00
Ishaan Jaff
3eac1634fa
[Fix Ui ]: Taha-hexcode (#8082) (#8122)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 14s
* [Bug] UI: Newly created key does not display on the View Key Page (#8039)

- Fixed issue where all keys appeared blank for admin users.
- Implemented filtering of data via team settings to ensure all keys are displayed correctly.

* Fix:
- Updated the validator to allow model editing when `keyTeam.team_alias === "Default Team"`.
- Ensured other teams still follow the original validation rules.

Co-authored-by: Taha Ali <123803932+tahaali-dev@users.noreply.github.com>
2025-01-30 15:00:13 -08:00
Ishaan Jaff
7f2742334c
(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
744b7709ca
Litellm dev 01 23 2025 p2 (#7962)
* fix(ui/): revert user team key view

* fix(view_key_table.tsx): fix default team view - show all personal keys

* fix(navbar.tsx): fix custom logo

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

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
2025-01-23 21:02:15 -08:00
Ishaan Jaff
84fb5aead8
(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
yujonglee
293bb4c522
fix (#7769) 2025-01-14 14:31:44 -08:00
Krish Dholakia
599730960a
build: new ui build (#7685) 2025-01-10 22:12:17 -08:00
Krish Dholakia
c4780479a9
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
Ishaan Jaff
981efffa3b ui fix key table 2024-12-14 14:12:39 -08:00
Krish Dholakia
21156ff5d0
LiteLLM Minor Fixes & Improvements (11/27/2024) (#6943)
* fix(http_parsing_utils.py): remove `ast.literal_eval()` from http utils

Security fix - https://huntr.com/bounties/96a32812-213c-4819-ba4e-36143d35e95b?token=bf414bbd77f8b346556e
64ab2dd9301ea44339910877ea50401c76f977e36cdd78272f5fb4ca852a88a7e832828aae1192df98680544ee24aa98f3cf6980d8
bab641a66b7ccbc02c0e7d4ddba2db4dbe7318889dc0098d8db2d639f345f574159814627bb084563bad472e2f990f825bff0878a9
e281e72c88b4bc5884d637d186c0d67c9987c57c3f0caf395aff07b89ad2b7220d1dd7d1b427fd2260b5f01090efce5250f8b56ea2
c0ec19916c24b23825d85ce119911275944c840a1340d69e23ca6a462da610

* fix(converse/transformation.py): support bedrock apac cross region inference

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

* fix(user_api_key_auth.py): add auth check for websocket endpoint

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

* fix(user_api_key_auth.py): use `model` from query param

* fix: fix linting error

* test: run flaky tests first
2024-11-28 00:32:46 +05:30
Ishaan Jaff
bb16abc043
(UI) fix - allow editing key alias on Admin UI (#6776)
* fix allow editing key alias on UI

* fix non type for budget duration
2024-11-16 19:58:26 -08:00
Ishaan Jaff
2d2a2c35d8 ui show created at date 2024-10-25 09:23:08 +04:00
Ishaan Jaff
b345db5011 fix ui type 2024-09-06 17:04:03 -07:00
Ishaan Jaff
46b5a78c21 fix regen keys 2024-09-06 14:31:20 -07:00
Ishaan Jaff
5d9f2e7115 working regen flow 2024-09-06 14:10:02 -07:00
Ishaan Jaff
5c15e21a05 ui allow rotating keys 2024-09-06 10:34:50 -07:00
Ishaan Jaff
dd6c9df850 use form correctly 2024-09-06 10:27:47 -07:00
Ishaan Jaff
9bdb96ad9c allow correct fields on regenerate key 2024-09-06 10:19:37 -07:00
Ishaan Jaff
304a31ec8c ui show when key expires 2024-09-05 15:57:52 -07:00
Ishaan Jaff
2c0802126d fix ui 2024-08-28 11:59:32 -07:00
Ishaan Jaff
74b19ea9c5 ui fixes 2024-08-28 11:53:31 -07:00
Ishaan Jaff
8dc1af666b ui fix viewing budget info 2024-08-28 11:51:47 -07:00
Ishaan Jaff
228e028147 ui show Budget Reset 2024-08-28 11:48:33 -07:00
Ishaan Jaff
97392a28a3 stash change 2024-08-28 09:55:53 -07:00
Ishaan Jaff
4c54cad62d allow editing budget duration 2024-08-28 08:23:01 -07:00
Ishaan Jaff
a043676dc4 fix regen api key flow 2024-08-26 18:59:29 -07:00
Ishaan Jaff
b0ae0101f4 make regenerating api keys enterprise 2024-08-26 18:53:28 -07:00
Ishaan Jaff
83813af0a2 regenerate key 2024-08-26 18:44:46 -07:00
Ishaan Jaff
5c2c316919 update ui regen key 2024-08-26 18:41:20 -07:00
Ishaan Jaff
3527e47b59 ui regenerate an api key 2024-08-26 18:33:18 -07:00
Ishaan Jaff
40c018272c working regenerate key flow 2024-08-26 18:28:26 -07:00
Ishaan Jaff
d9769c393e ui new build 2024-08-24 16:45:53 -07:00
Ishaan Jaff
e8b9fbf9f9 fix allow setting per model tpm rpm limits 2024-08-24 15:34:25 -07:00
Ishaan Jaff
98d1113e89 ui allow setting tpm / rpm limits on ui 2024-08-24 12:42:39 -07:00
Ishaan Jaff
f618eb0a67 fix show user_id on table 2024-08-23 20:54:44 -07:00
Ishaan Jaff
896026c468 switch off prod logs on ui 2024-07-30 13:23:45 -07:00
Ishaan Jaff
67b85d9dda undo ui changes 2024-05-21 18:39:25 -07:00
Ishaan Jaff
7cbdf02a9b ui - set permissions on keys 2024-05-21 18:06:56 -07:00
Ishaan Jaff
69afc14a82 fix - show token hashes on ui 2024-05-11 12:42:14 -07:00
Ishaan Jaff
b146336e79 clean up key info tab 2024-05-11 11:30:10 -07:00
Ishaan Jaff
69452f003d ui - show token hashes on ui 2024-05-11 11:21:53 -07:00
Ishaan Jaff
6105522e55 fix - ui validation bug 2024-04-25 20:33:02 -07:00