Commit Graph

64 Commits

Author SHA1 Message Date
YutaSaito eec4ed640b Revert "Stabilise mock tests" 2026-01-17 06:26:18 +09:00
Sameer Kankute 83e33944ef Fix: mock test tests 2026-01-15 22:02:42 +05:30
Sameer Kankute 4bdda9cc28 Fix: tests/test_litellm/proxy/test_proxy_server.py::test_embedding_input_array_of_tokens 2026-01-15 19:46:35 +05:30
yuneng-jiang 1b9c7deec6 Merge remote-tracking branch 'origin' into litellm_key_team_routing_3 2026-01-08 10:39:12 -08:00
yuneng-jiang 51759424a6 Key and Team Routing Setting 2026-01-07 17:17:30 -08:00
yuneng-jiang 1c84af8ae4 normalize proxy config callbacks 2026-01-07 12:22:57 -08:00
yuneng-jiang 564b2b51cc Fix for dev env 2025-12-23 16:09:17 -08:00
yuneng-jiang 05dd247ff5 Fix UI disappearing for development instances 2025-12-23 15:24:07 -08:00
yuneng-jiang 6bb5254c9b Revert "[Fix] UI - Disappears in Development Environments" 2025-12-23 15:08:07 -08:00
yuneng-jiang fccd2d1e87 Fix UI disappearing for development instances 2025-12-23 11:46:55 -08:00
yuneng-jiang ed4a4c13d6 Base commit 2025-12-23 11:46:35 -08:00
Alexsander Hamir 5534038e93 Fix CI: Revert security scan changes and add GitGuardian ignore rules (#18358) 2025-12-22 17:03:53 -08:00
Ishaan Jaffer 6112160a16 Revert "[Fix] Security - Remove example API keys with high entropy (#18255)"
This reverts commit 24edbccf5c.
2025-12-20 20:48:11 +05:30
Alexsander Hamir 24edbccf5c [Fix] Security - Remove example API keys with high entropy (#18255) 2025-12-19 10:09:50 -08:00
yuneng-jiang dd182a2ed0 Adding tests 2025-12-17 16:28:15 -08:00
yuneng-jiang 70f7c8b771 Merge remote-tracking branch 'origin' into litellm_dd_callback_fix 2025-12-17 11:05:46 -08:00
Jack Temple 9d420265ef fix: update UI path handling for non-root Docker and restructure HTML files 2025-12-15 10:09:05 -06:00
yuneng-jiang 4bcbd8b0a9 Fix callback env variables 2025-12-12 18:03:08 -08:00
YutaSaito e9571ddbc4 fix: MCP OAuth callback routing and URL handling (#17789)
* fix: MCP OAuth callback routing and URL handling

* test: add test for proxy_server
2025-12-11 08:22:59 -08:00
yuneng-jiang d99cf81386 Fixing test 2025-12-09 16:11:17 -08:00
yuneng-jiang 39bf7a9f7c Merge remote-tracking branch 'origin' into litellm_allow_custom_mount_paths 2025-12-09 11:58:05 -08:00
yuneng-jiang 8338bd9c53 Change deprecation banner to only show on /sso/key/generate 2025-12-08 16:30:37 -08:00
yuneng-jiang 6777a23a53 Merge remote-tracking branch 'origin' into litellm_allow_custom_mount_paths 2025-12-06 22:22:59 -08:00
yuneng-jiang 321ffd7258 Merge pull request #17180 from BerriAI/litellm_non_root_docker_logo_fix
[Fix] Add User Writable Directory to Non Root Docker for Logo
2025-12-06 22:22:27 -08:00
yuneng-jiang e2e35c3f87 Merge pull request #17522 from BerriAI/litellm_custom_webhook_fix
[Fix] Custom Callback on UI
2025-12-06 22:22:02 -08:00
yuneng-jiang 1d95595522 Merge remote-tracking branch 'origin' into litellm_non_root_docker_logo_fix 2025-12-06 20:00:33 -08:00
yuneng-jiang 539e3721f2 Merge remote-tracking branch 'origin' into litellm_add_model_fix_team_admin 2025-12-06 20:00:01 -08:00
yuneng-jiang 96f39484f1 Merge remote-tracking branch 'origin' into litellm_custom_webhook_fix 2025-12-06 19:59:15 -08:00
yuneng-jiang edf51a431a Fixed tests 2025-12-05 17:08:13 -08:00
yuneng-jiang 5afd03fef3 Mock server_root_path for test 2025-12-05 16:13:56 -08:00
yuneng-jiang 0dd4db34bd Working setting generic callbacks on UI 2025-12-05 14:37:48 -08:00
yuneng-jiang a96677c299 Fix /get/config/callbacks callback variables 2025-12-04 21:48:49 -08:00
yuneng-jiang 9bb292f478 V2 login route 2025-12-03 12:41:45 -08:00
yuneng-jiang 031677636a Add user writable file to non root docker for logo 2025-11-26 21:44:02 -08:00
yuneng-jiang b2916d0b58 Merge remote-tracking branch 'origin' into litellm_allow_custom_mount_paths 2025-11-21 16:34:32 -08:00
yuneng-jiang 38d9906029 Merge remote-tracking branch 'origin' into litellm_add_model_fix_team_admin 2025-11-21 16:31:53 -08:00
yuneng-jiang d672263fe3 Change litellm_model_cost_map to public route 2025-11-20 20:59:31 -08:00
Ishaan Jaff c7cf18cf67 [Feat] Prompt Management - Allow storing prompt version in DB (#16848)
* test_dotprompt_auto_detection_with_model_only

* fix _auto_detect_prompt_management_logger

* test_dotprompt_with_prompt_version

* add v1, v2 tests

* add _compile_prompt_helper

* fix _compile_prompt_helper

* test_dotprompt_with_prompt_version

* test_dotprompt_with_prompt_version, test_get_prompt_with_version

* add version in schema

* feat add _get_prompt_spec_for_db_prompt

* add _get_prompt_spec_for_db_prompt

* feat add _get_prompt_spec_for_db_prompt

* update prompt table

* add version in prompt DB

* test_get_prompt_spec_for_db_prompt_with_versions
2025-11-19 13:19:56 -08:00
yuneng-jiang dcf7daf629 Allow root to redirect when docs are not on root path 2025-11-19 12:05:41 -08:00
Alexsander Hamir c7847125c2 [Perf] Embeddings: Use router's O(1) lookup and shared sessions (#16344)
* Refactor proxy embeddings to use shared processor

- allow ProxyBaseLLMRequestProcessing to accept the aembedding route so embeddings requests reuse the base pipeline hooks

- route embeddings requests through base_process_llm_request, sharing logging, hook execution, retries, and header handling with chat/responses

- tighten token array decoding logic by using router deployment lookups and the unified error handler

* Fix: Correctly process embedding requests with token arrays

The `test_embedding_input_array_of_tokens` test was failing due to a regression that caused embedding requests with token arrays to be processed incorrectly. This prevented the `aembedding` function from being called as expected.

This was caused by a combination of three distinct issues:

1.  In `litellm/proxy/common_request_processing.py`, the `function_setup` utility was called with `aembedding` as the `original_function` for embedding routes. This has been corrected to `embedding` to ensure proper request setup.

2.  In `litellm/proxy/proxy_server.py`, a `TypeError` occurred because the `get_deployment` method was called with the `model_name` keyword argument instead of the expected `model_id`. This has been corrected. Additionally, the check for token arrays was improved to validate that all elements in the input subarray are integers.

3.  In `litellm/proxy/litellm_pre_call_utils.py`, the check for the `enforced_params` enterprise feature was too strict. It blocked valid requests even when the `enforced_params` list was empty. The condition has been adjusted to trigger the check only for non-empty lists.

Finally, the `test_embedding_input_array_of_tokens` assertion was updated to be more robust. The previous `assert_called_once_with` was overly strict, causing failures when unrelated internal parameters were added to the function call. The test now first asserts that `aembedding` is called and then separately verifies the `model` and `input` arguments. This makes the test more resilient to future changes without sacrificing its ability to catch regressions.

* test: align proxy embedding assertions

Update the embedding proxy test to match the new request pipeline: keep the data the proxy builds, expect the extra control kwargs, let the post-call hook return the actual response, and assert the normalized 'embeddings' hook type. This proves the refactor still forwards metadata and returns the mocked payload.

* Update proxy exception test

The proxy now forwards additional kwargs (request_timeout, litellm_call_id, litellm_logging_obj) to llm_router.aembedding. The test needs to accept these to match the real call signature and keep validating the error path instead of the kwargs list.

* testing: unsure of this change

I don't remember why I changed this, will revert and see if any tests fail since the manual test isn't failing without it.

* fix: remove unrelated change

This change was not related to the embeddings refactor and actually belonged to a different branch.
2025-11-14 09:21:45 -08:00
yuneng-jiang 720ba865fb [Infra] Litellm Backend SSO Changes (#16029)
* SSO Backend changes

* Encrypt and Decrypt, load into os env

* Linting and addressing comments
2025-10-30 14:32:08 -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
Achintya Rajan 169c1f0f21 moved test to test_proxy_server 2025-10-08 19:24:16 -07:00
Ishaan Jaff 1d468a59f3 [MCP Gateway] Fine-grained Database Object Storage Control (#15255)
* add supported_db_objects

* add _should_load_db_object

* add docs on storing MCP objects in DB

* test_should_load_db_object_with_supported_db_objects

* type fix
2025-10-06 19:31:44 -07:00
Ishaan Jaff 388761f52d [Fix] LiteLLM UI - Ensure OTEL settings are saved in DB after set on UI (#15118)
* fix: fix _add_callback_from_db_to_in_memory_litellm_callbacks

* test_add_callback_from_db_to_in_memory_litellm_callbacks

* fix otel

* fix: fix _add_callback_from_db_to_in_memory_litellm_callbacks
2025-10-01 15:33:22 -07:00
Ishaan Jaff 69a464fc97 [Fix Security] Ensure OCI secret fields not shared on /models and /v1/models endpoints (#15085)
* fix: remove_sensitive_info_from_deployment

* fix: remove_sensitive_info_from_deployment

* test_model_info_v1_oci_secrets_not_leaked
2025-09-30 14:55:54 -07:00
Krrish Dholakia b23e35f75e test: update tests 2025-08-23 12:09:19 -07:00
Krrish Dholakia e5c3e006c2 fix(proxy_server.py): fix merge config + db router settings logic 2025-08-20 16:33:31 -07:00
Jugal D. Bhatt 67833590d6 [Proxy changes] Litellm add model price reload schedule for multi-pod (#13470)
* added mcp guardrails doc in mcp.md

* add button to reload models

* Added button changes

* added button for scheduling reload

* add multi pod support to reloading the model price json

* fix ruff
2025-08-09 16:12:13 -07:00
Jugal D. Bhatt 1270df08a4 [Proxy + UI] Litellm add reload model api and button (#13464)
* added mcp guardrails doc in mcp.md

* add button to reload models

* Added button changes

* remove the model_reload
2025-08-09 13:52:56 -07:00