Commit graph

8121 commits

Author SHA1 Message Date
Sameer Kankute
a0538e3d54 Fix: properties: should be non-empty for OBJECT type 2025-12-19 14:28:40 +05:30
YutaSaito
3c380086b6
Merge pull request #18234 from BerriAI/litellm_fix_not_working_failure_logging
fix: not working log_failure_event in langfuse
2025-12-19 17:32:05 +09:00
Sameer Kankute
84e4fc3fab
Merge pull request #18226 from Chesars/fix/responses-api-tool-calls-transformation
fix(responses-api): fix tool calls transformation in completion bridge
2025-12-19 13:41:55 +05:30
Sameer Kankute
7d0f41f437 Add cost tracking for responses api in background mode 2025-12-19 13:35:48 +05:30
Yuta Saito
20bbfdd7cb fix: not working log_failure_event in langfuse 2025-12-19 16:54:57 +09:00
yuneng-jiang
19140506a9 Adding tests 2025-12-18 20:50:38 -08:00
Sameer Kankute
d1d008fb7e
Merge pull request #18194 from BerriAI/litellm_fix_cli_bugs
Fix: Claude code responses api bridge errors
2025-12-19 08:38:55 +05:30
Sameer Kankute
1fd4f1ba52
Merge pull request #18109 from BerriAI/litellm_fix_custom_gaurdrail_fix
Fix guardrails for passthrough endpoint
2025-12-19 08:36:58 +05:30
Chesars
bd36b1261f test: add tests for tool calls transformation fixes
- test_tool_message_output_is_string_not_list: verifies function_call_output.output is a string
- test_multiple_tool_calls_in_single_choice: verifies multiple tool calls are grouped in one choice
2025-12-18 22:01:29 -03:00
yuneng-jiang
41732696c6 replicate delete checks for regenerate 2025-12-18 13:25:11 -08:00
yuneng-jiang
0a1fb204cd Tests for /key/delete 2025-12-18 11:40:41 -08:00
Alexsander Hamir
2e7b554747
3[Fix] CI/CD - logging_testing (#18204)
* fix: enforce team member budget check in common_checks

- Add missing team member budget validation in common_checks() function
  - Checks team membership budget when team key is used
  - Raises BudgetExceededError when team member spend exceeds max_budget_in_team
  - Follows same pattern as other budget checks (team, user, end_user)
  - Uses cached get_team_membership() for performance

- Fix AttributeError in lowest_tpm_rpm.py
  - Add null check for model_info before accessing .get() method
  - Prevents 'NoneType' object has no attribute 'get' error

- Add unit tests for team member budget enforcement
  - Test budget exceeded scenario
  - Test within budget scenario
  - Test edge cases (no budget, no membership, personal keys)
  - Tests run without requiring proxy server

Fixes failing test: test_users_in_team_budget

* fix: mock get_async_httpx_client in test_langsmith_key_based_logging

- Mock get_async_httpx_client to return a mock AsyncHTTPHandler instance
- Fixes test failure where mock_post was never called
- LangsmithLogger creates its own httpx client instance via get_async_httpx_client,
  so we need to mock the factory function rather than the class method
- Use MagicMock for response.raise_for_status (sync method) instead of AsyncMock

* fix: resolve linting errors (PLR0915, F401)

- Remove unused imports (datetime, ServiceLoggerPayload) from arize_phoenix.py
- Extract health ping setup logic from RedisCache.__init__ to reduce statement count
- Extract team member budget check from common_checks to reduce statement count

* fix: resolve type errors in ChatCompletionToolCallChunk construction

- Cast type field to Literal['function'] to satisfy TypedDict requirements
- Ensure arguments field is explicitly str type to match TypedDict signature
- Fixes pyright errors for incompatible types in transformation.py
2025-12-18 10:52:24 -08:00
Ishaan Jaff
5ea0854eda
[Feat] Guardrails Load Balancing - Allow Platform admins to load balance between guardrails (#18181)
* add _aguardrail_helper for LB

* add _aguardrail_helper on router.py

* test_proxy_logging_pre_call_hook_load_balancing

* add _execute_guardrail_with_load_balancing

* add LB TEsting

* docs guard lb

* fix linting

* fix lint
2025-12-19 00:08:03 +05:30
Alexsander Hamir
f353bb6dba
[Fix] CI/CD - litellm_mapped_tests_llms | litellm_mapped_tests_core | caching_unit_tests (#18197) 2025-12-18 08:49:23 -08:00
Alexsander Hamir
28821427ce
[Fix] CI/CD #1 - mypy | check_code_and_doc_quality | guardrails_testing (#18195) 2025-12-18 06:31:01 -08:00
Sameer Kankute
dafd123756 Fix : tool calling with response api bridge 2025-12-18 19:54:15 +05:30
Rens
5705aaebbc Fix Gemini 3 imgs in tool response 2025-12-18 15:19:16 +02:00
Krish Dholakia
365762596b
Guardrails - LiteLLM Content Filter - add support for running content filters on images (#18044)
* feat(litellm_content_filter.py): add support for content filtering categories

make it easy for proxy admin to prevent messages about violence, self harm or illegal weapons going through litellm

* feat: initial commit adding bias detection

allows admin to block inappropriate content about sexual orientation, etc.

* refactor: simplify content_filter.py

use a more exhaustive set of keywords, instead of guessing at potential phrases user can use

* feat(content_filter.py): add new denied topics for in-built content filter guardrails

allow user to automatically block content relating to certain categories from being sent to the LLML

* refactor(content-filter): document new params to litellm content filter

* feat(ui/): litellm content filter - select content categories on ui

* docs: update documentation

* docs(litellm_content_filter.md): document new content filters

* feat: initial commit adding support for inappropriate images via litellm content filter

* feat(content_filter.py): support blocking images containing blocked content

prevent images which contain disallowed content from being sent to the llm api

* docs(litellm_content_filter.md): document new image capabilities of litellm_content_filter

* fix: fix expected error code
2025-12-18 16:46:14 +05:30
YutaSaito
630f3d828e
Merge pull request #18161 from BerriAI/litellm_fix_mcp_list_tool_not_working_without_db
Litellm fix mcp list tool not working without db
2025-12-18 18:27:19 +09:00
Ishaan Jaff
17403967ab
[Bug fix] Vertex Multimodal embeddings - Support text + base64 image combinations (#18172)
* TestVertexMultimodalEmbedding

* fix _try_merge_text_with_media

* ruff fix
2025-12-18 13:22:43 +05:30
yuneng-jiang
b0d371d864 delete route for cloudzero 2025-12-17 22:12:31 -08:00
yuneng-jiang
8ea7688d35 Adding tests 2025-12-17 21:59:28 -08:00
Lucas Sugi
9f88d61d10
fix: Change extra_headers to additional_headers (#17950) 2025-12-18 08:57:20 +05:30
yuneng-jiang
7b2f33b9b4
Merge pull request #17559 from BerriAI/litellm_new_user_collision_handling
[Fix] New user route user_id collision handling
2025-12-17 19:19:41 -08:00
yuneng-jiang
1db7492639
Merge pull request #18159 from BerriAI/litellm_login_500_fix
[Fix] Login Page Failed To Parse JSON Error
2025-12-17 19:19:27 -08:00
yuneng-jiang
866d1eded5
Merge pull request #17995 from BerriAI/litellm_email_budget_alerts_2
[Feature] Email Budget Alerts
2025-12-17 19:16:17 -08:00
Yuta Saito
847bbd4fda fix: prefer _get_key_object_permission for key lookups and remove redundant checks 2025-12-18 09:50:56 +09:00
yuneng-jiang
dd182a2ed0 Adding tests 2025-12-17 16:28:15 -08:00
yuneng-jiang
f4017a1986 Tests 2025-12-17 16:07:01 -08:00
YutaSaito
6595619906
Merge pull request #18150 from BerriAI/litellm_feat_vault-per-team-config
Litellm feat vault per team config
2025-12-18 06:57:24 +09:00
Yuta Saito
b7b22d559e feat: allow per-team Vault overrides when storing keys 2025-12-18 06:21:53 +09:00
Dmitri Tikhonov
844d0d47b7
Fix tag management to preserve encrypted fields in litellm_params (#17484)
The _add_tag_to_deployment function was directly modifying the
deployment's litellm_params in memory and writing it back to the
database, which caused encrypted API keys and other sensitive fields
to be lost. This fix retrieves the model from the database first,
preserves all existing fields including encrypted ones, adds only the
new tag to the tags array, and updates the database with the modified
params while keeping encrypted fields intact.

Added comprehensive unit tests covering preservation of encrypted
fields, handling of both string and dict litellm_params formats,
duplicate tag prevention, and error handling for missing models.

Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-18 02:28:39 +05:30
Ishaan Jaff
539f629eff
[Feat] New Logging Integration - Azure Sentinel Logger (#18146)
* add AzureSentinelLogger

* logging: AzureSentinelLogger

* test_azure_sentinel_signature_and_send_batch

* docs azure sentinel

* fix AzureSentinelLogger

* test fix

* docs fix

* fix: AzureSentinelLogger

* docs sentintel

* feat: add example SLP

* docs sentinel

* docs fix

* docs fix

* docs fix

* fix code qa

* QA fix

* fix test

* TestInitializeInteractionsEndpoints
2025-12-18 02:04:49 +05:30
yuneng-jiang
087dfbf648 Merge remote-tracking branch 'origin' into litellm_email_budget_alerts_2 2025-12-17 11:37:49 -08:00
yuneng-jiang
8cdb481832 Merge remote-tracking branch 'origin' into litellm_new_user_collision_handling 2025-12-17 11:34:46 -08:00
yuneng-jiang
49a1e50672
Merge pull request #17912 from BerriAI/litellm_dd_callback_fix
[Fix] Callback Environment Variables Casing
2025-12-17 11:33:41 -08:00
yuneng-jiang
202f71c13a
Merge pull request #17752 from BerriAI/litellm_ui_model_test_connection_fix
[Fix] /health/test_connection to resolve env variables like /chat/completions
2025-12-17 11:06:57 -08:00
yuneng-jiang
70f7c8b771 Merge remote-tracking branch 'origin' into litellm_dd_callback_fix 2025-12-17 11:05:46 -08:00
yuneng-jiang
358ee482e2
Merge pull request #18078 from BerriAI/litellm_sso_readiness_route
[Feature] SSO Readiness Health Check
2025-12-17 11:03:53 -08:00
Sameer Kankute
f5de678f4d
Merge branch 'main' into litellm_fix_custom_gaurdrail_fix 2025-12-17 23:00:46 +05:30
Sameer Kankute
a13611dcdb
Merge branch 'main' into litellm_image_edit_vertex_cred_fix 2025-12-17 22:38:07 +05:30
Sameer Kankute
230db7e161
Merge pull request #18100 from BerriAI/litellm_bedrock_qwen_arn_fix
fix: Add qwen 2 and qwen 3 in get_bedrock_model_id
2025-12-17 22:34:05 +05:30
Sameer Kankute
25f2213262
Merge pull request #18135 from BerriAI/litellm_gemini_flash_day_0
feat: gemini-3-flash-preview day 0 support
2025-12-17 22:30:10 +05:30
Sameer Kankute
95b2e72dfc
Merge pull request #18105 from BerriAI/litellm_staging_12_17_2025
Staging - 12/17/2025
2025-12-17 22:23:21 +05:30
Sameer Kankute
e3cf0110bb Rename: gemini-3-flash-preview 2025-12-17 21:48:15 +05:30
Alexsander Hamir
e96b301642
Fix: Prevent LiteLLM API key leakage on /health endpoint failures (#18133) 2025-12-17 08:08:05 -08:00
Sameer Kankute
ba90985300 Add reasoning effort mapping 2025-12-17 18:03:48 +05:30
Sameer Kankute
ed6c66c20c Add support for structured output thinkingConfig param 2025-12-17 18:02:15 +05:30
Sameer Kankute
969ed1efb8 fix: Vertex AI image edit credential source 2025-12-17 15:56:10 +05:30
Alexandros Solanos
ed5dc6a077
Improve model repetition detection performance 2025-12-17 10:02:41 +01:00