Commit graph

1279 commits

Author SHA1 Message Date
Krrish Dholakia
acbc648537 feat(add_credentials_tab.tsx): style improvements 2025-03-12 18:36:13 -07:00
Krrish Dholakia
ad11131b63 feat(credentials.tsx): add modal for adding new credentials 2025-03-12 18:29:23 -07:00
Krrish Dholakia
a560e2d262 feat: re-add llm credentials to models page 2025-03-12 17:49:56 -07:00
Krrish Dholakia
3e47102567 feat(time_to_first_token.tsx): make viewing ttft free 2025-03-12 17:46:11 -07:00
Krrish Dholakia
6065a78702 feat(model_dashboard.tsx): re-add model analytics 2025-03-12 17:44:48 -07:00
Krrish Dholakia
c039a1e948 feat: initial commit adding support for credentials on proxy ui 2025-03-12 17:28:18 -07:00
Lucas Raschek
818ef51074 Fix Metadata not updating in UI 2025-03-12 19:09:39 +01:00
Ishaan Jaff
9692b2ed73 ui new build 2025-03-11 12:22:12 -07:00
Ishaan Jaff
1b6f0ed43b fix viewing page as internal user viewer 2025-03-11 11:50:33 -07:00
Ishaan Jaff
6096f3aa9f only show create key / actions for users with write access 2025-03-11 11:16:55 -07:00
Ishaan Jaff
01775bc95f don't show test key page to internal user 2025-03-11 11:07:42 -07:00
Ishaan Jaff
3ee6a3eaee ui new build 2025-03-10 21:05:00 -07:00
Ishaan Jaff
e7eb1708e8 Navbar logout url 2025-03-10 18:44:24 -07:00
Ishaan Jaff
afe0c03376 getProxyUISettings 2025-03-10 18:44:13 -07:00
Ishaan Jaff
c22b92439b use helper setProxySettings 2025-03-10 18:44:07 -07:00
Ishaan Jaff
05ad7a67a7 Revert "ui new build"
This reverts commit 34694d3057.
2025-03-10 13:56:10 -07:00
Ishaan Jaff
34694d3057 ui new build 2025-03-10 12:32:18 -07:00
Ishaan Jaff
e64b8a8baa ui linting fix 2025-03-10 12:31:32 -07:00
Ishaan Jaff
d0cda56c99 ui linting fixes #2 2025-03-10 12:31:27 -07:00
Ishaan Jaff
24a8dfd540 ui fix linting errors 2025-03-10 12:31:22 -07:00
Ishaan Jaff
629ce6c19a fix linting error 2025-03-10 12:31:13 -07:00
Ishaan Jaff
51f074682f show eu api base on openai + text 2025-03-10 10:40:48 -07:00
Ishaan Jaff
6d537aec48 OpenAI_Text 2025-03-10 10:36:50 -07:00
Ishaan Jaff
a7f6a95dd9
(UI) - Fix, Allow Filter Keys by Team Alias, Key Alias and Org (#9083)
* working team, key, org filters

* fix size of filter

* all keys filter

* 1 file for filter logic

* remove key alias check
2025-03-08 15:58:29 -08:00
Ishaan Jaff
b5ad968e8a
(UI) - Minor improvements to logs page (#9076)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 16s
* logs - make sure all cols have max width

* fix missing data message

* fix toggle handle responsive logs
2025-03-07 21:38:45 -08:00
Krrish Dholakia
2163d5c3e9 fix(transform_request.tsx): allow dev to file translation error 2025-03-07 19:43:49 -08:00
Krish Dholakia
0e3caf92b9
UI - new API Playground for testing LiteLLM translation (#9073)
* feat: initial commit - enable dev to see translated request

* feat(utils.py): expose new endpoint - `/utils/transform_request` to see the raw request sent by litellm

* feat(transform_request.tsx): allow user to see their transformed request

* refactor(litellm_logging.py): return raw request in 3 parts - api_base, headers, request body

easier to render each individually on UI vs. extracting from combined string

* feat: transform_request.tsx

working e2e raw request viewing

* fix(litellm_logging.py): fix transform viewing for bedrock models

* fix(litellm_logging.py): don't return sensitive headers in raw request headers

prevent accidental leak

* feat(transform_request.tsx): style improvements
2025-03-07 19:39:31 -08:00
Ishaan Jaff
1cf6f53a6c
(UI) - Allow adding Cerebras, Sambanova, Perplexity, Fireworks, Openrouter, TogetherAI Models on Admin UI (#9069)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 17s
* allow adding cerebras on litellm ui

* add perplexity

* add openrouter, fireworks, together
2025-03-07 17:01:53 -08:00
Ishaan Jaff
e753f61231
fix logs page selected log (#9061) 2025-03-07 17:01:11 -08: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
Ishaan Jaff
0fed8bcefd ui new build 2025-03-06 21:22:58 -08:00
Ishaan Jaff
73448412e1
ui allow ui or eu api base adding model (#9042) 2025-03-06 21:22:03 -08:00
Ishaan Jaff
8d6815ce98 Revert "(UI) - Security Improvement, move to JWT Auth for Admin UI Sessions (#8995)"
This reverts commit 01a44a4e47.
2025-03-05 08:49:20 -08:00
Ishaan Jaff
01a44a4e47
(UI) - Security Improvement, move to JWT Auth for Admin UI Sessions (#8995)
* (UI) - Improvements to session handling logic  (#8970)

* add cookieUtils

* use utils for clearing cookies

* on logout use clearTokenCookies

* ui use correct clearTokenCookies

* navbar show userEmail on UserID page

* add timestamp on token cookie

* update generate_authenticated_redirect_response

* use common getAuthToken

* fix clearTokenCookies

* fixes for get auth token

* fix invitation link sign in logic

* Revert "fix invitation link sign in logic"

This reverts commit 30e5308cb3.

* fix getAuthToken

* update setAuthToken

* fix ui session handling

* fix ui session handler

* bug fix stop generating LiteLLM Virtual keys for access

* working JWT insert into cookies

* use central place to build UI JWT token

* add _validate_ui_token

* fix ui session handler

* fix fetchWithCredentials

* check allowed routes for ui session tokens

* expose validate_session endpoint

* validate session endpoint

* call sso/session/validate

* getUISessionDetails

* ui move to getUISessionDetails

* /sso/session/validate

* fix cookie utils

* use getUISessionDetails

* use ui_session_id

* "/spend/logs/ui" in spend_tracking_routes

* working sign in JWT flow for proxy admin

* allow proxy admin to access ui routes

* use check_route_access

* update types

* update login method

* fixes to ui session handler

* working flow for admin and internal users

* fixes for invite links

* use JWTs for SSO sign in

* fix /invitation/new flow

* fix code quality checks

* fix _get_ui_session_token_from_cookies

* /organization/list

* ui sso sign in

* TestUISessionHandler

* TestUISessionHandler
2025-03-04 21:48:23 -08:00
Ishaan Jaff
4c8b4fefc9 Revert "(UI) - Improvements to session handling logic (#8970)"
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 15s
This reverts commit c015fb34f1.
2025-03-04 13:29:08 -08:00
Ishaan Jaff
772c2b1fff Revert "ui new build"
This reverts commit 94563ab1e7.
2025-03-04 13:28:54 -08:00
Ishaan Jaff
94563ab1e7 ui new build 2025-03-03 22:21:31 -08:00
Ishaan Jaff
c015fb34f1
(UI) - Improvements to session handling logic (#8970)
* add cookieUtils

* use utils for clearing cookies

* on logout use clearTokenCookies

* ui use correct clearTokenCookies

* navbar show userEmail on UserID page

* add timestamp on token cookie

* update generate_authenticated_redirect_response

* use common getAuthToken

* fix clearTokenCookies

* fixes for get auth token

* fix invitation link sign in logic

* Revert "fix invitation link sign in logic"

This reverts commit 30e5308cb3.

* fix getAuthToken

* update setAuthToken

* fix ui session handling

* fix ui session handler
2025-03-03 22:17:21 -08:00
Ishaan Jaff
79ed4b626e
(UI) Fix session handling with cookies (#8969)
* add cookieUtils

* use utils for clearing cookies

* on logout use clearTokenCookies

* ui use correct clearTokenCookies

* navbar show userEmail on UserID page
2025-03-03 21:20:59 -08:00
Ishaan Jaff
88b1e315c8 ui new build
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 14s
2025-03-01 17:52:14 -08:00
Ishaan Jaff
df095b6022
(UI) - Allow Internal Users to View their own logs (#8933)
* ui fix leftnav, allow internal users to view their own logs

* pass user_id in uiSpendLogs call

* ui filter logs for internal user

* fix internal users page

* ui show correct message when store prompts is disabled

* fix internal user logs

* test_ui_view_spend_logs_with_user_id

* test spend management endpoint
2025-03-01 17:26:02 -08:00
Ishaan Jaff
1008da7c41
(UI) Error Logs improvements - Store Raw proxy server request for success and failure (#8917)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 13s
* ui render error logs

* add proxy_server_request to spend logs metadata

* _add_proxy_server_request_to_metadata

* proxy track cost callback fixes

* _add_proxy_server_request_to_metadata

* test spend logs

* test_async_post_call_failure_hook
2025-03-01 16:26:47 -08:00
Ishaan Jaff
b72c48cefa
ui remove search button on internal users tab that does not (#8926) 2025-03-01 10:25:16 -08:00
Krish Dholakia
c1527ebf52
UI - Allow admin to control default model access for internal users (#8912)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 36s
* fix(create_user_button.tsx): allow admin to set models user has access to, on invite

Enables controlling model access on invite

* feat(auth_checks.py): enforce 'no-model-access' special model name on backend

prevent user from calling models if default key has no model access

* fix(chat_ui.tsx): allow user to input custom model

* fix(chat_ui.tsx): pull available models based on models key has access to

* style(create_user_button.tsx): move default model inside 'personal key creation' accordion

* fix(chat_ui.tsx): fix linting error

* test(test_auth_checks.py): add unit-test for special model name

* docs(internal_user_endpoints.py): update docstring

* fix test_moderations_bad_model

* Litellm dev 02 27 2025 p6 (#8891)

* fix(http_parsing_utils.py): orjson can throw errors on some emoji's in text, default to json.loads

* fix(sagemaker/handler.py): support passing model id on async streaming

* fix(litellm_pre_call_utils.py): Fixes https://github.com/BerriAI/litellm/issues/7237

* Fix calling claude via invoke route + response_format support for claude on invoke route (#8908)

* fix(anthropic_claude3_transformation.py): fix amazon anthropic claude 3 tool calling transformation on invoke route

move to using anthropic config as base

* fix(utils.py): expose anthropic config via providerconfigmanager

* fix(llm_http_handler.py): support json mode on async completion calls

* fix(invoke_handler/make_call): support json mode for anthropic called via bedrock invoke

* fix(anthropic/): handle 'response_format: {"type": "text"}` + migrate amazon claude 3 invoke config to inherit from anthropic config

Prevents error when passing in 'response_format: {"type": "text"}

* test: fix test

* fix(utils.py): fix base invoke provider check

* fix(anthropic_claude3_transformation.py): don't pass 'stream' param

* fix: fix linting errors

* fix(converse_transformation.py): handle response_format type=text for converse

* converse_transformation: pass 'description' if set in response_format (#8907)

* test(test_bedrock_completion.py): e2e test ensuring tool description is passed in

* fix(converse_transformation.py): pass description, if set

* fix(transformation.py): Fixes https://github.com/BerriAI/litellm/issues/8767#issuecomment-2689887663

* Fix bedrock passing `response_format: {"type": "text"}` (#8900)

* fix(converse_transformation.py): ignore type: text, value in response_format

no-op for bedrock

* fix(converse_transformation.py): handle adding response format value to tools

* fix(base_invoke_transformation.py): fix 'get_bedrock_invoke_provider' to handle cross-region-inferencing models

* test(test_bedrock_completion.py): add unit testing for bedrock invoke provider logic

* test: update test

* fix(exception_mapping_utils.py): add context window exceeded error handling for databricks provider route

* fix(fireworks_ai/): support passing tools + response_format together

* fix: cleanup

* fix(base_invoke_transformation.py): fix imports

* (Feat) - Show Error Logs on LiteLLM UI  (#8904)

* fix test_moderations_bad_model

* use async_post_call_failure_hook

* basic logging errors in DB

* show status on ui

* show status on ui

* ui show request / response side by side

* stash fixes

* working, track raw request

* track error info in metadata

* fix showing error / request / response logs

* show traceback on error viewer

* ui with traceback of error

* fix async_post_call_failure_hook

* fix(http_parsing_utils.py): orjson can throw errors on some emoji's in text, default to json.loads

* test_get_error_information

* fix code quality

* rename proxy track cost callback test

* _should_store_errors_in_spend_logs

* feature flag error logs

* Revert "_should_store_errors_in_spend_logs"

This reverts commit 7f345df477.

* Revert "feature flag error logs"

This reverts commit 0e90c022bb.

* test_spend_logs_payload

* fix OTEL log_db_metrics

* fix import json

* fix ui linting error

* test_async_post_call_failure_hook

* test_chat_completion_bad_model_with_spend_logs

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>

* ui new build

* test_chat_completion_bad_model_with_spend_logs

* docs(release_cycle.md): document release cycle

* bump: version 1.62.0 → 1.62.1

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
2025-02-28 23:23:03 -08:00
Ishaan Jaff
04f152ceb3 ui new build 2025-02-28 20:12:06 -08:00
Ishaan Jaff
3a086cee06
(Feat) - Show Error Logs on LiteLLM UI (#8904)
* fix test_moderations_bad_model

* use async_post_call_failure_hook

* basic logging errors in DB

* show status on ui

* show status on ui

* ui show request / response side by side

* stash fixes

* working, track raw request

* track error info in metadata

* fix showing error / request / response logs

* show traceback on error viewer

* ui with traceback of error

* fix async_post_call_failure_hook

* fix(http_parsing_utils.py): orjson can throw errors on some emoji's in text, default to json.loads

* test_get_error_information

* fix code quality

* rename proxy track cost callback test

* _should_store_errors_in_spend_logs

* feature flag error logs

* Revert "_should_store_errors_in_spend_logs"

This reverts commit 7f345df477.

* Revert "feature flag error logs"

This reverts commit 0e90c022bb.

* test_spend_logs_payload

* fix OTEL log_db_metrics

* fix import json

* fix ui linting error

* test_async_post_call_failure_hook

* test_chat_completion_bad_model_with_spend_logs

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>
2025-02-28 20:10:09 -08:00
Krish Dholakia
887c66c6b7
Show 'user_email' on key table on UI (#8887)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 35s
* refactor(internal_user_endpoints.py): refactor `/user/list` to accept 'user_ids' and use prisma for db calls

enables bulk search from UI

* fix(internal_user_endpoints.py): fix linting errors

* fix(all_keys_table.tsx): show user email on create key table

make it easier for admin to know which key is associated to which user

* docs(internal_user_endpoints.py): improve docstring

* fix: sync schema with main

* fix(columns.tsx): display SSO ID on Internal User Table

make it easy to identify what the SSO ID for a user is

* fix(columns.tsx): add tooltip to header

help user understand what SSO ID means

* style: add more tooltips in the management flows

make it easier to understand what you're seeing

* style(all_keys_table.tsx): replace 'Not Set' with '-'

reduces words on table

* fix(internal_user_endpoints.py): fix user ids check

* test: fix test

* fix(internal_user_endpoints.py): maintain returning key count in `/user/list`
2025-02-27 21:56:14 -08:00
Ishaan Jaff
51590742bd ui new build 2025-02-27 20:09:44 -08:00
Krish Dholakia
2d2d1b9df5
Add created_by and updated_by fields to Keys table (#8885)
* fix(proxy/_types.py): return created_by and updated_by on /key/list

enables better trail of who made a key

* fix(all_keys_table.tsx): add created by to key table

allows easier tracking of who generated the key

* fix(key_management_endpoints.py): track 'created_by' and 'updated_by' fields

enable easier tracking of who created proxy keys
2025-02-27 18:12:58 -08:00
Krish Dholakia
91cdc01149
Allow team/org filters to be searchable on the Create Key Page (#8881)
* fix(filtercomponent): always show apply filters button

fix hiding behavior

* style(create_key_button.tsx): style improvements on create key modal

remove the numbering

* feat(filter.tsx): allow searching team by team alias

* style(filter.tsx): style improvements to ensure dropdown + custom value works as expected

* style(filter.tsx): add explicit button allowing reset filters

* fix(filter.tsx): fix linting error

* feat(all_keys_table.tsx): show team alias on keys table

* style(all_keys_table.tsx): enforce length constraints on table

make it easier to see all columns
2025-02-27 18:11:03 -08:00