Commit Graph

27 Commits

Author SHA1 Message Date
Richard Song 099ccf56a7 Refactor add_schema_to_components to move definitions to components/schemas and add corresponding unit test (#17389) 2025-12-02 21:57:07 -08:00
Cesar Garcia 01dfc3561a Fix AttributeError when metadata is null in request body (#17263) (#17306)
Handle the case where metadata is explicitly set to null/None in the
request body. This was causing a 401 error with "'NoneType' object
has no attribute 'get'" when calling /v1/batches with metadata: null.

The fix uses `or {}` instead of a default dict value since the key
exists but has a None value.
2025-12-01 19:58:27 -08:00
Saar wintrov cfd35d3b14 Metadata: fix 401 when audio/transcriptions (#17023)
* Metadata: fix 401 when audio/transcriptions

* check if str, CR fixes
2025-11-24 20:56:27 -08:00
yuneng-jiang 6881594632 [Fix] Exclude litellm_credential_name from Sensitive Data Masker (Updated) (#16958)
* Exclude litellm_credential_name from sensitive masker

* Adding missing file
2025-11-21 19:09:48 -08:00
yuneng-jiang eb48d5cc42 Revert "Exclude litellm_credential_name from sensitive masker (#16950)" (#16956)
This reverts commit 5cfacb96e6.
2025-11-21 18:09:54 -08:00
yuneng-jiang 5cfacb96e6 Exclude litellm_credential_name from sensitive masker (#16950) 2025-11-21 16:40:17 -08:00
Ishaan Jaff c3c6cef6d8 [Fix] Fixes Swagger UI resolver errors for chat completion endpoints caused by Pydantic v2 $defs not being properly exposed in the OpenAPI schema. (#16784)
* fix add_request_body_to_paths

* test_move_defs_to_components
2025-11-18 17:39:28 -08:00
yuneng-jiang cb27d6c456 [Fix] UI - Delete Callbacks Failing (#16473)
* Temp commit for branch switching

* Created normalize callback name util function and tests
2025-11-12 18:43:37 -08:00
Ishaan Jaff 6c26971cd4 [Bug Fix] Tags as metadata dicts were raising exceptions (#15625)
* fix get_tags_from_request_body

* Revert "fix get_tags_from_request_body"

This reverts commit 1c044dad999500b5c11ec96f528212c248f72f61.

* fix get_tags_from_request_body

* test_get_tags_from_request_body_with_dict_tags
2025-10-17 13:20:07 -07:00
Ishaan Jaff 527c8f59fa [Feat] Tag Management - Add support for setting tag based budgets (#15433)
* feat: add LiteLLM_TagTable

* fix: use new table for tag management

* fix - allow setting budgets for tags

* working tag creation

* fix schema.prisma

* add tag info

* ui fixes

* ui fix tag info

* TAG_CACHE_IN_MEMORY_TTL_SECONDS

* add Litellm_EntityType

* fix get_aggregated_db_spend_update_transactions

* fix: _update_entity_spend_in_db

* fix _tag_max_budget_check

* add tag budget check

* add tag_list_transactions

* test_get_tag_objects_batch

* test_update_tag_db_without_prisma_client

* fix get_tags_from_request_body

* get_tags_from_request_body

* fix get_tags_from_request_body

* fix spend tracking utils

* get_tags_from_request_body

* test_get_tags_from_request_body_with_metadata_tags

* feat: add _update_tag_cache spend tracking

* fix _PROXY_track_cost_callback

* test_tag_cache_update_multiple_tags

* fix tag info

* docs fix

* docs tag budgets

* doc fix

* docs fix

* fix tag budget

* docs tag budgets

* docs fix

* ruff fix
2025-10-10 19:24:50 -07:00
Ishaan Jaff 628cd13755 [Feat] UI - Allow scheduling key rotations when creating virtual keys (#14960)
* fix design of key reset interval

* fix: LiteLLM_VerificationToken

* fix key manager

* add key_rotation_at

* ui fix

* fix ui view

* set key_rotation_at  on creation

* add key_rotation_at

* fix info

* fix: _set_key_rotation_fields

* fix KeyRotationManager

* fix key edit view

* test_update_key_fn_auto_rotate_enable

* fix KeyRotationManager
2025-09-26 16:24:40 -07:00
Ishaan Jaff ea8d0bb7d5 fix: re-add scheduled rotations 2025-09-26 11:40:46 -07:00
Ishaan Jaffer b1e56c55ad merge 2025-09-24 22:11:37 -07:00
Ishaan Jaff ded823a3a3 [Feat] Initial support for scheduled key rotations (#14877)
* add KeyRotationSettings

* add KeyRotationManager

* add key rotation manager

* add KeyRotationManager

* fix _initialize_spend_tracking_background_jobs

* fix add_key_rotation_fields

* fixes

* new fields in schema

* update schema

* fix fixes for init key rotation manager

* fixes for init key rotation manager

* fix KeyRotationManager

* tests for key rotation

* fix key_rotation_settings

* fix KeyRotationManager

* fix LITELLM_KEY_ROTATION_CHECK_INTERVAL_SECONDS

* fix fixes for init key rotation manager

* ruff check fix

* fix LITELLM_KEY_ROTATION_CHECK_INTERVAL_SECONDS

* fix _initialize_spend_tracking_background_jobs

* docs fix

* docs auto rotate

* schema fix

* bump proxy extras

* fix config.yml
2025-09-24 21:37:56 -07:00
kayoch1n 76555cad81 Format code 2025-09-03 11:20:52 +08:00
kayoch1n ffbe5cd899 Add a testcase 2025-09-03 11:08:23 +08:00
Ishaan Jaff 40395598da [Feat] UI - Allow editing team member rpm/tpm limits (#13669)
* show team member tpm/rpm limits

* ui - allow setting team settings

* fix better debugging

* fix types: TeamMemberUpdateRequest

* add _upsert_budget_and_membership

* allow updating team member RPM/TPM in teamMemberUpdateCall

* editing team member rpm/tpm

* UI - fixes for team member component

* fix info

* test_upsert_rpm_only_creates_new_budget
2025-08-15 17:29:44 -07:00
Krzysztof Gąsiorowski 0b28930ad4 [Fix] Hide sensitive data in /model/info - azure entra client_secret (#13577)
* Remove litellm_params.client_secret from /model/info

Added pop of client_secret (Azure provider secret) from litellm_params in remove_sensitive_info_from_deployment used by /model/info endpoints

* Added test for litellm.proxy.common_utils.openai_endpoint_utils.remove_sensitive_info_from_deployment
2025-08-13 07:35:53 -07:00
Ishaan Jaff eb4bd26f24 [Bug Fix] - Get Routes (#13466)
* fixes get_routes_for_mounted_app

* fix - use _safe_get_endpoint_name

* fix code QA check

* test_get_routes_for_mounted_app_with_static_files

* test fixes
2025-08-09 12:52:23 -07:00
Ishaan Jaff 46c950b17b [Bug Fix] Add swagger docs for LiteLLM /chat/completions, /embeddings, /responses (#12618)
* update ProxyChatCompletionRequest

* use custom OpenAPI schema

* use customize_openapi_schema

* add_llm_api_request_schema_body

* add embeddings and response spec

* fix add_llm_api_request_schema_body

* TestCustomOpenAPISpec

* fixes linting

* fix linting

* bump timeout
2025-07-15 13:37:22 -07:00
Ishaan Jaff d2fe8894c8 [Bug Fix] Include /mcp in list of available routes on proxy (#12612)
* create GetRoutes helper class

* update get routes

* TestGetRoutes

* fix get_routes_for_mounted_app
2025-07-15 09:24:48 -07:00
Krish Dholakia d202ce229b Prevent writing default user setting updates to yaml (error in non-root env) + Use central team member budget when max_budget_in_team set on UI (#12533)
* fix(proxy_setting_endpoints.py): require store model in db is enabled for setting user default settings

* test(test_proxy_server.py): update test

* fix(reset_budget_job.py): initial commit adding reset budget logic for team members

* test: update unit testing

* test(test_proxy_budget_reset.py): validate team member budget was reset

* test(test_reset_budget_job.py): update unit tests

* test: update tests
2025-07-12 10:13:07 -07:00
Jugal D. Bhatt 0691ff8d13 Added validate payload error (#12494)
* Added validate payload error

* added logger

* added test case
2025-07-10 15:54:48 -07:00
Ishaan Jaff 0a36f89009 [Bug Fix] s3 config.yaml file - ensure yaml safe load is used (#12373)
* use yaml safe load

* test_get_file_contents_from_s3_no_temp_file_creation
2025-07-07 14:42:33 -07:00
Laurien 0c50f8bcc9 Update enduser spend and budget reset date based on budget duration (#8460) 2025-06-08 08:39:14 -07:00
hagan 0f449bf038 [Bug Fix] Create/Update team member api 500 errror (#10479)
* Fixes issue with team_endpoints on member budget update

* refactored location of budget membership fix

* added test for _upsert_budget_membership func
2025-06-03 15:57:33 -07:00
Krish Dholakia ef42461c1e Litellm fix GitHub action testing (#11163)
* test: add __init__.py files

* refactor: rename test folder to avoid naming conflict

* test: update workflows

* test: update tests

* test: update imports

* test: update tests

* test: remove unused import

* ci(test-litellm.yml): add pytest retry to github workflow

* test: fix test
2025-05-26 14:41:42 -07:00