Commit Graph
19524 Commits
Author SHA1 Message Date
Krish DholakiaandGitHub ea985dda0b fix(model_cost_map): fix json parse error on model cost map + add unit test (#8629)
Fixes https://github.com/BerriAI/litellm/pull/8619#issuecomment-2666693045
2025-02-18 11:18:16 -08:00
Krish DholakiaandGitHub 49610485a2 feat: add oss license check for related packages (#8623)
ensure all packages used are permissable
2025-02-18 10:40:00 -08:00
HeMulingandGitHub 369b636b5a add openrouter/google/gemini-2.0-flash-001 (#8619) 2025-02-18 10:14:49 -08:00
Ishaan JaffandGitHub 8d7937fd7a (Fix) Redis async context usage for Redis Cluster + 94% lower median latency when using Redis Cluster (#8622)
* fix redis async usage

* re- use redis client across requests
2025-02-18 09:22:27 -08:00
Krish DholakiaandGitHub 2340f1b31f Pass router tags in request headers - x-litellm-tags (#8609)
* feat(litellm_pre_call_utils.py): support `x-litellm-tags` request header

allow tag based routing + spend tracking via request headers

* docs(request_headers.md): document new `x-litellm-tags` for tag based routing and spend tracking

* docs(tag_routing.md): add to docs

* fix(utils.py): only pass str values for openai metadata param

* fix(utils.py): drop non-str values for metadata param to openai

preview-feature, otel span was being sent in
2025-02-18 08:26:22 -08:00
Krrish Dholakia 7bfd816d3b build: merge commit 1b15568af7f8923a014e6e49f5ec09e5abf5f981
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Mon Feb 17 21:37:36 2025 -0800

    fix(proxy/_types.py): fix linting error

commit dc4d5cffa69bbcde5a3de17aa7dc934238d81034
Author: Krrish Dholakia <krrishdholakia@gmail.com>
v1.61.7.dev1
2025-02-17 21:56:00 -08:00
Ishaan Jaff e8f387200a ci/cd run again 2025-02-17 21:37:52 -08:00
Ishaan Jaff 52450e9f61 test_openai_fine_tuning v1.61.8-nightly 2025-02-17 21:29:59 -08:00
Ishaan Jaff 296013f722 test_openai_fine_tuning 2025-02-17 21:20:09 -08:00
Ishaan Jaff 04ebca1166 test_openai_fine_tuning 2025-02-17 21:12:40 -08:00
Ishaan Jaff 0ee54908c1 bump: version 1.61.7 → 1.61.8 2025-02-17 21:10:21 -08:00
Ishaan Jaff 3d0f67b260 ui new build 2025-02-17 18:46:09 -08:00
Ishaan Jaff afa2a2b0a3 fix linting 2025-02-17 18:44:46 -08:00
Ishaan JaffandGitHub 8024300825 (UI) Improvements to Add Team Model Flow (#8603)
* ui - use common team dropdown component

* re-use team component

* rename org field on add model

* handle add model submit

* working view model_id and team_id on root models page

* cleaner

* show all fields

* working model info view

* working team info selector

* clean up team id

* new component for model dashboard

* ui show table with dropdown

* make public model names like email

* revert changes to litellm model name

* fix litellm model name

* ui fix public model

* fix mappings

* fix conditional text input

* fix message

* ui fix bulk add models

* _add_team_model_to_db

* move model mgmt helper funcs

* test_add_team_model_to_db

* ui - display model team model name

* fix add model tab

* fix remove redundant info tab on models page

* dont pass model mappings all the way through

* fix jarring model name when adding team models

* fix edit model button

* delete button on model info

* ui fix model dashboard

* fix DeploymentTypedDict

* _is_model_access_group_for_wildcard_route

* test _get_public_model_name

* ui fix viewing public model name

* fix linting error

* fix linting errors

* fix selectedModel logic
2025-02-17 18:37:14 -08:00
Ishaan JaffandGitHub 4a1476792c (UI) Refactor Add Models for Specific Teams (#8592)
* ui - use common team dropdown component

* re-use team component

* rename org field on add model

* handle add model submit

* working view model_id and team_id on root models page

* cleaner

* show all fields

* working model info view

* working team info selector

* clean up team id

* new component for model dashboard

* ui show table with dropdown

* make public model names like email

* revert changes to litellm model name

* fix litellm model name

* ui fix public model

* fix mappings

* fix conditional text input

* fix message

* ui fix bulk add models
2025-02-17 17:58:29 -08:00
Ishaan JaffandGitHub 341a63cf8b (UI) Allow adding models for a Team (#8598) (#8601)
* ui - use common team dropdown component

* re-use team component

* rename org field on add model

* handle add model submit

* working view model_id and team_id on root models page

* cleaner

* show all fields

* working model info view

* working team info selector

* clean up team id
2025-02-17 17:57:56 -08:00
Krrish Dholakia ce1d8026d9 bump: version 1.61.6 → 1.61.7 v1.61.7 v1.61.7-nightly 2025-02-17 17:56:44 -08:00
Krrish Dholakia d328140676 build: build ui 2025-02-17 17:56:31 -08:00
Krish DholakiaandGitHub 51cb3c84e3 Litellm stable UI 02 17 2025 p1 (#8599)
* fix(key_management_endpoints.py): initial commit with logic to get all keys for teams user is an admin for

* fix(key_managements_endpoints.py): return all keys for teams user is an admin for

* fix(key_management_endpoints.py): add query param to ensure user opts into seeing all team keys (not just their own)

* fix(regenerate_key_modal.tsx): fix key regenerate

* fix(proxy_server.py): fix model metrics check on none api base

* test(test_key_generate_prisma.py): remove redundant test

* test(test_proxy_utils.py): add unit test covering new management endpoint helper util

* fix: fix test

* test(test_proxy_server.py): fix test
2025-02-17 17:55:05 -08:00
Krrish Dholakia d0413ec96b docs(routing.md): add section on weighted deployments 2025-02-17 17:02:06 -08:00
Ishaan JaffandGitHub 5c2839a744 Revert "(UI) Allow adding models for a Team (#8598)" (#8600)
This reverts commit 5f6f62a34f.
2025-02-17 15:09:40 -08:00
Aditya Kumar KasaudhanandGitHub 0839880f4a feat(ui): alert when adding model without STORE_MODEL_IN_DB (#8591)
This commit show user-friendly error using message.error when a
model is added via the UI and STORE_MODEL_IN_DB is not True.

Fixes: #8516.
2025-02-17 14:54:53 -08:00
Ishaan JaffandGitHub 5f6f62a34f (UI) Allow adding models for a Team (#8598)
* ui - use common team dropdown component

* re-use team component

* rename org field on add model

* handle add model submit

* working view model_id and team_id on root models page

* cleaner

* show all fields

* working model info view

* working team info selector

* clean up team id
2025-02-17 14:44:10 -08:00
Steve CosmanandGitHub 37cfa0f70a Fix typo in main readme (#8574) 2025-02-17 08:19:40 -08:00
Cole McIntoshandGitHub f352ed5b70 fix: update README.md API key and model example typos (#8590) 2025-02-17 07:34:15 -08:00
Krrish Dholakia 048dd995dc docs: update litellm user management heirarchy doc 2025-02-16 00:31:13 -08:00
Krrish Dholakia c2e0c2f0bc docs(request_headers.md): document openai org id header handling in request_headers.md 2025-02-16 00:04:38 -08:00
Krrish Dholakia 4a2e4133c3 test: fix test v1.61.6-nightly 2025-02-15 23:57:04 -08:00
Krrish Dholakia ce551946c4 bump: version 1.61.5 → 1.61.6 2025-02-15 23:51:15 -08:00
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 8923304e85 test_openai_fine_tuning v1.61.5-nightly 2025-02-15 17:14:29 -08:00
Ishaan Jaff 8f8ed69fff test_openai_fine_tuning 2025-02-15 16:59:27 -08:00
Ishaan Jaff 5fc008626f ui new build 2025-02-15 16:47:54 -08:00
Ishaan Jaff ec09fe9221 fix edit key 2025-02-15 16:47:10 -08:00
Ishaan Jaff 707b885a3f test_list_key_helper_team_filtering 2025-02-15 16:43:15 -08:00
Ishaan Jaff a0a1784997 ui new build 2025-02-15 16:30:57 -08:00
Ishaan Jaff 610cd15ea1 ui fix tsx linting 2025-02-15 16:29:39 -08:00
Ishaan Jaff 66201a829f bump: version 1.61.4 → 1.61.5 2025-02-15 16:28:26 -08:00
Ishaan JaffandGitHub 4d49b50f71 (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
2025-02-15 16:25:57 -08:00
Ishaan JaffandGitHub 2753de1458 (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
2025-02-15 16:13:08 -08:00
Ishaan JaffandGitHub 5a6ccb0c48 (Bug Fix) - Add Regenerate Key on Virtual Keys Tab (#8567)
* add regenerate key to ui

* ui fix key info
2025-02-15 16:11:45 -08:00
Krish DholakiaandGitHub 7cc9b364b4 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
2025-02-15 15:48:32 -08:00
Krish DholakiaandGitHub 01ace78dcc 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
2025-02-15 15:48:06 -08:00
Ishaan Jaff 1bac18a98c cleanup_azure_files 2025-02-15 15:32:42 -08:00
Ishaan Jaff b8977f5e10 Revert "test fix use mock endpoints for e2e files and ft tests"
This reverts commit c921d8dd81.
2025-02-15 15:28:18 -08:00
Ishaan Jaff c921d8dd81 test fix use mock endpoints for e2e files and ft tests 2025-02-15 15:08:46 -08:00
Ishaan JaffandGitHub 6b3bfa2b42 (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
2025-02-15 14:54:23 -08:00
Krish DholakiaandGitHub a9276f27f9 fix(main.py): fix key leak error when unknown provider given (#8556)
* fix(main.py): fix key leak error when unknown provider given

don't return passed in args if unknown route on embedding

* fix(main.py): remove instances of {args} being passed in exception

prevent potential key leaks

* test(code_coverage/prevent_key_leaks_in_codebase.py): ban usage of {args} in codebase

* fix: fix linting errors

* fix: remove unused variable
2025-02-15 14:02:55 -08:00
Peter Dave HelloandGitHub c6026ea6f9 Optimize Alpine Dockerfile by removing redundant apk commands (#5016)
Remove unnecessary `apk update` and manual cache cleanup steps in the
Alpine Dockerfile. By using `apk add --no-cache`, we avoid manual cache
management, making the Dockerfile simpler and easier to maintain.
2025-02-15 08:55:12 -08:00
Ishaan Jaff 0ffd99afff test_avertex_batch_prediction v1.61.3.dev1 v1.61.4-nightly 2025-02-14 22:03:24 -08:00