Commit graph

1272 commits

Author SHA1 Message Date
Ishaan Jaff
5cd20d2abc
(UI) allow adding model aliases for teams (#8471)
* update team info endpoint

* clean up model alias

* fix model alias

* fix model alias card

* clean up naming on docs

* fix model alias card

* fix _model_in_team_aliases

* fix key_model_access_denied

* test_can_key_call_model_with_aliases

* fix test_aview_spend_per_user
2025-02-11 16:18:43 -08:00
Taha Ali
727283a3bc
Ui Fixes Teams Setting #8347 (#8353)
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.

* - added some classes in global.css
- added text wrap in output of request,response and metadata in index.tsx
- fixed styles of table in table.tsx

* - added full payload when we open single log entry
- added Combined Info Card in index.tsx

* fix: keys not showing on refresh for internal user

* fix: btns and input fix
2025-02-11 12:39:03 -08:00
Krrish Dholakia
184ee6c252 style(guardrails.tsx): style improvements to guardrails ui 2025-02-10 22:13:58 -08:00
Krrish Dholakia
0dfcf325b4 fix(guardrails.tsx): show guardrail name, status, mode on ui 2025-02-10 22:13:58 -08:00
Krrish Dholakia
93595826fb fix(guardrails.tsx): style improvements 2025-02-10 22:13:58 -08:00
Krrish Dholakia
c7a3e5b4b2 feat(guardrails.tsx): show configured guardrails on proxy ui
'
2025-02-10 22:13:58 -08:00
Krrish Dholakia
892c32cd39 feat(leftnav.tsx): initial commit adding guardrails tab on UI
allow proxy admin to see currently set up guardrails
2025-02-10 22:13:54 -08:00
Ishaan Jaff
40f51bf81f new ui build 2025-02-10 20:42:23 -08:00
Ishaan Jaff
00c596a852
(Feat) - Allow viewing Request/Response Logs stored in GCS Bucket (#8449)
* BaseRequestResponseFetchFromCustomLogger

* get_active_base_request_response_fetch_from_custom_logger

* get_request_response_payload

* ui_view_request_response_for_request_id

* fix uiSpendLogDetailsCall

* fix get_request_response_payload

* ui fix RequestViewer

* use 1 class AdditionalLoggingUtils

* ui_view_request_response_for_request_id

* cache the prefetch logs details

* refactor prefetch

* test view request/resp logs

* fix code quality

* fix get_request_response_payload

* uninstall posthog
prevent it from being added in ci/cd

* fix posthog

* fix traceloop test

* fix linting error
2025-02-10 20:38:55 -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
Krrish Dholakia
802c6e58cc build: ui updates 2025-02-09 00:08:25 -08:00
Krish Dholakia
9c4c7813fb
Allow org admin to create teams on UI (#8407)
* fix(client_initialization_utils.py): handle custom llm provider set with valid value not from model name

* fix(handle_jwt.py): handle groups not existing in jwt token

if user not in group, this won't exist

* fix(handle_jwt.py): add new `enforce_team_based_model_access` flag to jwt auth

allows proxy admin to enforce user can only call model if team has access

* feat(navbar.tsx): expose new dropdown in navbar - allow org admin to create teams within org context

* fix(navbar.tsx): remove non-functional cogicon

* fix(proxy/utils.py): include user-org memberships in `/user/info` response

return orgs user is a member of and the user role within org

* feat(organization_endpoints.py): allow internal user to query `/organizations/list` and get all orgs they belong to

enables org admin to select org they belong to, to create teams

* fix(navbar.tsx): show change in ui when org switcher clicked

* feat(page.tsx): update user role based on org they're in

allows org admin to create teams in the org context

* feat(teams.tsx): working e2e flow for allowing org admin to add new teams

* style(navbar.tsx): clarify switching orgs on UI is in BETA

* fix(organization_endpoints.py): handle getting but not setting members

* test: fix test

* fix(client_initialization_utils.py): revert custom llm provider handling fix - causing unintended issues

* docs(token_auth.md): cleanup docs
2025-02-09 00:07:15 -08:00
Krish Dholakia
e4411e4815
Allow editing model api key + provider on UI (#8406)
* fix(parallel_request_limiter.py): add back parallel request information to max parallel request limiter

Resolves https://github.com/BerriAI/litellm/issues/8392

* test: mark flaky test to handle time based tracking issues

* feat(model_management_endpoints.py): expose new patch `/model/{model_id}/update` endpoint

Allows updating specific values of a model in db - makes it easy for admin to know this by calling it a PA
TCH

* feat(edit_model_modal.tsx): allow user to update llm provider + api key on the ui

* fix: fix linting error
2025-02-08 23:50:47 -08:00
Krish Dholakia
0d2e723e95
Revert "Added filter in Teams and fixed spacing & height issues in Teams tabs…" (#8416)
This reverts commit 352cfaa12c.
2025-02-08 23:25:56 -08:00
Taha Ali
352cfaa12c
Added filter in Teams and fixed spacing & height issues in Teams tabs (#6192) (#8357)
* [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.

* - added some classes in global.css
- added text wrap in output of request,response and metadata in index.tsx
- fixed styles of table in table.tsx

* - added full payload when we open single log entry
- added Combined Info Card in index.tsx

* fix: keys not showing on refresh for internal user

* add: search added in teams
2025-02-08 23:25:41 -08:00
Krrish Dholakia
9f426a6b1a build(ui/): update ui build 2025-02-06 23:24:25 -08:00
Krish Dholakia
f87ab251b0
UI Updates (#8345)
* fix(.globals.css): revert .md hard set

caused regression in invitation link display (and possibly other places)

* Fix keys not showing on refresh for internal users  (#8312)

* [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.

* - added some classes in global.css
- added text wrap in output of request,response and metadata in index.tsx
- fixed styles of table in table.tsx

* - added full payload when we open single log entry
- added Combined Info Card in index.tsx

* fix: keys not showing on refresh for internal user

* fixed user id passed as null when keyuser is you (#8271)

* fix(user_dashboard.tsx): ensure non admin can't view other keys

---------

Co-authored-by: Taha Ali <123803932+tahaali-dev@users.noreply.github.com>
Co-authored-by: Jaswanth Karani <karani.jaswanth@gmail.com>
2025-02-06 22:41:20 -08:00
Ishaan Jaff
7706ff1f1e ui new build 2025-02-06 18:31:21 -08:00
Ishaan Jaff
65c91cbbbc
(QA+UI) - e2e flow for adding assembly ai passthrough endpoints (#8337)
* add initial test for assembly ai

* start using PassthroughEndpointRouter

* migrate to lllm passthrough endpoints

* add assembly ai as a known provider

* fix PassthroughEndpointRouter

* fix set_pass_through_credentials

* working EU request to assembly ai pass through endpoint

* add e2e test assembly

* test_assemblyai_routes_with_bad_api_key

* clean up pass through endpoint router

* e2e testing for assembly ai pass through

* test assembly ai e2e testing

* delete assembly ai models

* fix code quality

* ui working assembly ai api base flow

* fix install assembly ai

* update model call details with kwargs for pass through logging

* fix tracking assembly ai model in response

* _handle_assemblyai_passthrough_logging

* fix test_initialize_deployment_for_pass_through_unsupported_provider

* TestPassthroughEndpointRouter

* _get_assembly_transcript

* fix assembly ai pt logging tests

* fix assemblyai_proxy_route

* fix _get_assembly_region_from_url
2025-02-06 18:27:54 -08:00
Krish Dholakia
7e873538f6
Fix edit team on ui (#8295)
* fix(columns.tsx): fix request logs team column to indicate the value is the alias not the id

* fix(team_info.tsx): add edit team logic to team info page

* fix(team_info.tsx): re-enable updating team settings on UI

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

* fix(team_info.tsx): fix save changes on team update

* fix(teams.tsx): allow edit button to still act as a quick action button -> drop user into settings page for team

* test(config.yml): run dev ui during testing

make sure no ui regressions are pushed on main

* build: update ci/cd

* ci(config.yml): fix test

* ci: fix ci

* ci: update

* ci: fix

* ci: another attempt to get nvm working in ci/cd

* ci: fix ci

* ci: test update

* ci: test update 2

* ci: test 3

* fix(team_info.tsx): fix linting error
2025-02-05 20:13:17 -08:00
Ishaan Jaff
e41bc5f32b
fixed issues #8126 and #8127 (#8275) (#8299)
Co-authored-by: Jaswanth Karani <karani.jaswanth@gmail.com>
2025-02-05 18:52:58 -08:00
Ishaan Jaff
e42fcf4d03
(UI) - Add Assembly AI provider to UI (#8297)
* add assembly ai to ui

* specify api base for assembly ai
2025-02-05 18:42:51 -08:00
Ishaan Jaff
d367f42887 ui new build 2025-02-04 21:12:39 -08:00
Ishaan Jaff
0b1eb038e3
Litellm UI fixes 8123 v2 (#8208) (#8245)
* Litellm UI fixes 8123 v2 (#8208)

* [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.

* - added some classes in global.css
- added text wrap in output of request,response and metadata in index.tsx
- fixed styles of table in table.tsx

* Enhance Request Viewer UI with Detailed Log Information

- Added a comprehensive "Request Details" card displaying key log.
- Introduced a new "Request Tags" section
- Removed commented-out buttons for expanded/JSON views
- Improved overall layout and readability of log information

* only include Request Details

---------

Co-authored-by: Taha Ali <123803932+tahaali-dev@users.noreply.github.com>
2025-02-04 06:48:32 -08:00
Ishaan Jaff
ec614be6c4 ui new build
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 13s
2025-02-03 08:23:44 -08:00
Ishaan Jaff
b3154be6f5
(UI Fixes for add new model flow) (#8216)
* ui fix add model flow

* fix provider info + add flow

* cleanup add model setup

* use 1 file for ProviderSpecificFields

* use 1 file for ProviderSpecificFields

* use antd select for model / providers

* fix selectedProviderEnum

* fix upload vertex models
2025-02-03 08:21:00 -08:00
Krish Dholakia
e7b81f84de
build: ui updates (#8206) 2025-02-03 07:26:58 -08:00
Krish Dholakia
6834c5ecaf
Easier user onboarding via SSO (#8187)
* fix(ui_sso.py): use common `get_user_object` logic across jwt + ui sso auth

Allows finding users by their email, and attaching the sso user id to the user if found

* Improve Team Management flow on UI  (#8204)

* build(teams.tsx): refactor teams page to make it easier to add members to a team

make a row in table clickable -> allows user to add users to team they intended

* build(teams.tsx): make it clear user should click on team id to view team details

simplifies team management by putting team details on separate page

* build(team_info.tsx): separately show user id and user email

make it easy for user to understand the information they're seeing

* build(team_info.tsx): add back in 'add member' button

* build(team_info.tsx): working team member update on team_info.tsx

* build(team_info.tsx): enable team member delete on ui

allow user to delete accidental adds

* build(internal_user_endpoints.py): expose new endpoint for ui to allow filtering on user table

allows proxy admin to quickly find user they're looking for

* feat(team_endpoints.py): expose new team filter endpoint for ui

allows proxy admin to easily find team they're looking for

* feat(user_search_modal.tsx): allow admin to filter on users when adding new user to teams

* test: mark flaky test

* test: mark flaky test

* fix(exception_mapping_utils.py): fix anthropic text route error

* fix(ui_sso.py): handle situation when user not in db
2025-02-02 23:02:33 -08:00
Ishaan Jaff
8ba60bf13c
(UI + SpendLogs) - Store SpendLogs in UTC Timezone, Fix filtering logs by start/end time (#8190)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 15s
* fix request_id field

* spend logs store time in UTC

* fix ui_view_spend_logs

* UI make time filter queries in UTC

* fix time filters

* fix TimeCellProps

* ui use UTC for filtering time
2025-02-01 17:26:18 -08:00
Ishaan Jaff
a713d7dfeb ui new build 2025-02-01 11:41:30 -08:00
Ishaan Jaff
29a8a613a7
(UI) Allow adding custom pricing when adding new model (#8165)
* ui custom pricing

* fix validateJSON

* ui allow entering custom pricing

* ui fix add model form

* working edit model modal

* working edit custom pricing

* ui add custom pricing on ui
2025-01-31 17:54:29 -08:00
Ishaan Jaff
dad6c8f09c ui new build 2025-01-30 21:19:39 -08:00
Ishaan Jaff
4005a51db2
(UI) fix adding Vertex Models (#8129)
* fix handleSubmit

* update handleAddModelSubmit

* add jest testing for ui

* add step for running ui unit tests

* add validate json step to add model

* ui jest testing fixes

* update package lock

* ci/cd run again

* fix antd import

* run jest tests first

* fix antd install

* fix ui unit tests

* fix unit test ui
2025-01-30 21:11:08 -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
c501ec9b6d
(UI) Fix SpendLogs page - truncate bedrock models + show end_user (#8118)
* ui spend logs table truncate bedrock page

* ui - show user / internal user fields
2025-01-30 13:59:13 -08:00
Ishaan Jaff
d10bd67d33
ui chat ui fixes (#8105) 2025-01-29 18:53:49 -08:00
Ishaan Jaff
6c2a87552a ui new build 2025-01-29 18:02:30 -08:00
Ishaan Jaff
bce8c74810 ui new build 2025-01-29 18:01:55 -08:00
Ishaan Jaff
79c54256a0
(UI) Allow using a model / credentials for pass through routes (#8099)
* test_add_vertex_pass_through_deployment

* VertexPassThroughRouter

* fix use_in_pass_through

* VertexPassThroughRouter

* fix vertex_credentials

* allow using _initialize_deployment_for_pass_through

* test_add_vertex_pass_through_deployment

* _set_default_vertex_config

* fix verbose_proxy_logger

* fix use_in_pass_through

* fix _get_token_and_url

* test_get_vertex_location_from_url

* test_get_vertex_credentials_none

* run pt unit testing again

* fix add_vertex_credentials

* test_adding_deployments.py

* rename file

* revert to og add model flow

* move placement

* ui somewhat working wildcard

* separate out code for slecting model name

* fix ConditionalPublicModelName

* ui fix confitional render public model name

* fix litellm model name page

* fix advanced settings page page

* ui fix litellm model name flow

* adding pas through models ui

* fix passing litellm params

* ui fix advanced settings

* ui fix order of provider info
2025-01-29 17:54:20 -08:00
Ishaan Jaff
892581ffc3
(UI) - View Logs Page - Refinement (#8087)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 14s
* working refetch interval

* ui show provider logo in SpendLogs Table

* fix padding

* improve time range filter

* ui fix diff minutes

* fix refresh button placement
2025-01-29 08:46:20 -08:00
Ishaan Jaff
2141a2e3f1 ui new build 2025-01-28 22:15:08 -08:00
Ishaan Jaff
64a3d08e1a
(UI) Fixes for Adding model page - keep existing page as default, have 2nd tab for wildcard models (#8073)
* use basic / advanced setup

* fix providerKey

* ui tab wildcard models

* ui fix entering api keys
2025-01-28 22:13:04 -08:00
Ishaan Jaff
ae7b042bc2
(beta ui - spend logs view fixes & Improvements 1) (#8062)
* ui 1 - show correct msg on no logs

* fix dup country col

* backend - allow filtering by team_id and api_key

* fix ui_view_spend_logs

* ui update query params

* working team id and key hash filters

* fix filter ref - don't hold on them as they are

* fix _model_custom_llm_provider_matches_wildcard_pattern

* fix test test_stream_chunk_builder_openai_audio_output_usage - use direct dict comparison
2025-01-28 20:34:22 -08:00
Ishaan Jaff
311997ee40 ui new build 2025-01-28 18:25:45 -08:00
Ishaan Jaff
727046c5aa ui fix selecting a provider 2025-01-28 18:23:57 -08:00
Ishaan Jaff
bd69226165 ui new build 2025-01-27 18:35:04 -08:00
Ishaan Jaff
a626cd01e5
fix add model flow (#8043) 2025-01-27 18:34:12 -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
Ishaan Jaff
c0cc2ea4bb
(UI) - Adding new models enhancement - show provider logo (#8033)
* ui allow wildcard models

* ui show model dashboard

* add advanced settings in card

* fix button

* ui - add provider logos on admin ui
2025-01-27 13:15:42 -08:00
Krish Dholakia
1ab10d8f72
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