Commit graph

1256 commits

Author SHA1 Message Date
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
Ishaan Jaff
2273b978f7 ui new build 2025-01-24 21:03:10 -08:00
Ishaan Jaff
c9a32ebf76
(UI) - Usage page show days when spend is 0 and round spend figures on charts to 2 sig figs (#7991)
* ui with cyan

* ui format usage tab better

* fix activity page

* ui fix activity page

* ui show correct usage

* ui  usage page
2025-01-24 18:49:32 -08:00
Ishaan Jaff
a835baacfc ui new build - 2025-01-23 21:11:23 -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
a38e62107d
(UI) Set guardrails on Team Create and Edit page (#7963)
* team edit guardrail

* LiteLLM_TeamTable
2025-01-23 20:57:34 -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
Krish Dholakia
c8aa876785
fix(proxy_server.py): fix get model info when litellm_model_id is set + move model analytics to free (#7886)
* fix(proxy_server.py): fix get model info when litellm_model_id is set

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

* test(test_models.py): add test to ensure get model info on specific deployment has same value as all model info

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

* fix(usage.tsx): make model analytics free

Fixes @iqballx's feedback

* fix(fix(invoke_handler.py):-fix-bedrock-error-chunk-parsing): return correct bedrock status code and error message if chunk in stream

Improves bedrock stream error handling

* fix(proxy_server.py): fix linting errors

* test(test_auth_checks.py): remove redundant test

* fix(proxy_server.py): fix linting errors

* test: fix flaky test

* test: fix test
2025-01-21 08:19:07 -08:00
Krish Dholakia
dca6904937
JWT Auth - enforce_rbac support + UI team view, spend calc fix (#7863)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 12s
* fix(user_dashboard.tsx): fix spend calculation when team selected

sum all team keys, not user keys

* docs(admin_ui_sso.md): fix docs tabbing

* feat(user_api_key_auth.py): introduce new 'enforce_rbac' param on jwt auth

allows proxy admin to prevent any unmapped yet authenticated jwt tokens from calling proxy

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

* test: more unit testing + refactoring

* fix: fix returning id when obj not found in db

* fix(user_api_key_auth.py): add end user id tracking from jwt auth

* docs(token_auth.md): add doc on rbac with JWTs

* fix: fix unused params

* test: remove old test
2025-01-19 21:28:55 -08:00
Ishaan Jaff
7b8fb990db ui new build 2025-01-18 12:56:31 -08:00
Ishaan Jaff
fd5cd422f0
Revert "Remove UI build output" (#7861) 2025-01-18 12:54:25 -08:00
Ishaan Jaff
f6a0bc8bdb
(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
f60756c815
(UI - View Logs Table) - Show country of origin for logs (#7856)
* fix remove emoji on logs page

* fix title of page

* ui - get countryIP

* ui lookup

* ui - get country from ip address
2025-01-18 12:44:26 -08:00
Krish Dholakia
5d065c2c35
fix(admins.tsx): fix logic for getting base url and create common get base url component (#7854)
Resolves https://github.com/BerriAI/litellm/issues/7761
2025-01-18 08:07:39 -08:00
yujonglee
f4803f63dc
refactor (#7851) 2025-01-18 07:25:41 -08:00
yujonglee
0aa8e4a703 fix 2025-01-18 22:13:07 +09:00
yujonglee
eb91ceb8d5 remore ui build 2025-01-18 16:55:45 +09:00