Commit Graph
741 Commits
Author SHA1 Message Date
yuneng-jiangandGitHub 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-jiangandGitHub 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-jiangandGitHub 866d1eded5 Merge pull request #17995 from BerriAI/litellm_email_budget_alerts_2
[Feature] Email Budget Alerts
2025-12-17 19:16:17 -08: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
YutaSaitoandGitHub 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
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
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-jiangandGitHub 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-jiangandGitHub 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-jiangandGitHub 358ee482e2 Merge pull request #18078 from BerriAI/litellm_sso_readiness_route
[Feature] SSO Readiness Health Check
2025-12-17 11:03:53 -08:00
yuneng-jiangandGitHub 9faee8bba6 Merge pull request #17989 from Jetemple/non-root-ui-path-fix
fix: update UI path handling for non-root Docker and restructure HTML…
2025-12-16 21:57:31 -08:00
yuneng-jiangandGitHub f316caa088 Merge pull request #18033 from BerriAI/litellm_ui_logs_overhead
[Feature] Add LiteLLM Overhead to Logs
2025-12-16 14:51:50 -08:00
yuneng-jiang 2d8f5111af add /sso/readiness route 2025-12-16 13:16:13 -08:00
yuneng-jiang 0e5b56eddf Fixing tests 2025-12-16 12:51:44 -08:00
Sameer KankuteandGitHub 3661f8010f Revert "fix(proxy): extract model from vertex ai passthrough url pattern (#17…"
This reverts commit ae7c994526.
2025-12-16 21:44:10 +05:30
Sameer KankuteandGitHub 215857cce3 Merge branch 'main' into litellm_staging_12_16_2025 2025-12-16 21:38:14 +05:30
Nicolai van der SmagtandGitHub 09ba89d4fe fix: add headers to metadata for guardrails on pass-through endpoints (#17992)
Fixes #17477

Guardrails couldn't access request headers (like User-Agent) on Bedrock
pass-through endpoints because headers were only stored in
data["proxy_server_request"]["headers"] but not in data["metadata"]["headers"]
where guardrails typically look for them.

This fix adds headers to metadata in add_litellm_data_to_request() so
guardrails can access User-Agent, API keys, and other header-based checks
on all endpoints including Bedrock pass-through.

Test added to verify headers are available in metadata for guardrails.
2025-12-16 13:41:34 +05:30
yuneng-jiang c5e25a1728 Merge remote-tracking branch 'origin' into litellm_ui_model_test_connection_fix 2025-12-15 21:07:32 -08:00
yuneng-jiang 66306f21b1 Add litellm overhead to spend logs metadata 2025-12-15 20:56:55 -08:00
Igal BoxermanandGitHub 636efb7795 feat(pillar): add masking support and MCP call support (#17959)
- Add 'mask' action to SUPPORTED_ON_FLAGGED_ACTIONS
  - Automatically sanitizes sensitive content using masked_session_messages
  - Allows requests to proceed with masked content instead of blocking

- Add MCP call support
  - Add pre_mcp_call and during_mcp_call to supported_event_hooks
  - Verify mcp_call is supported in call_type Literal types

- Control exception details based on config
  - Conditionally include scanners/evidence in exceptions based on
    include_scanners and include_evidence settings
  - Reduces payload size when detailed exception info isn't needed

- Add comprehensive test coverage
  - Tests for masking functionality
  - Tests for conditional exception details
  - Tests for MCP call support

- Update documentation
  - Add Mask section explaining masking functionality
  - Clarify exception details control

All changes maintain backward compatibility.
2025-12-16 08:49:03 +05:30
Kris XiaandGitHub ae7c994526 fix(proxy): extract model from vertex ai passthrough url pattern (#17970)
extract model id from vertex ai passthrough routes that follow the pattern:
/vertex_ai/*/models/{model_id}:*

the model extraction now handles vertex ai routes by regex matching the model
segment from the url path, which allows proper model identification for
authentication and authorization in proxy pass-through endpoints.

adds comprehensive test coverage for vertex ai model extraction including:
- various vertex api versions (v1, v1beta1)
- different locations (us-central1, asia-southeast1)
- model names with special suffixes (gemini-1.5-pro, gemini-2.0-flash)
- precedence verification (request body model over url)
- non-vertex route isolation
2025-12-16 08:42:57 +05:30
Krish DholakiaandGitHub f58b76aee8 Revert "Revert "Litellm bedrock guardrails block precedence over masking (#17…" (#18023)
This reverts commit 0abe5cdce9.
2025-12-16 08:42:10 +05:30
Krish DholakiaandGitHub 0abe5cdce9 Revert "Litellm bedrock guardrails block precedence over masking (#17968)" (#18022)
This reverts commit a0754f1c88.
2025-12-16 08:41:36 +05:30
kothamahandGitHub a0754f1c88 Litellm bedrock guardrails block precedence over masking (#17968)
* prioritized bedrock guardrail blocking by removing early return based on masking flags

When mask_request_content: true or mask_response_content: true, the method immediately returning False.

The Result: Even when Bedrock Guardrails returned action: "BLOCKED" for dangerous content, LiteLLM would not raise an exception and allowing the content through the response. 

So removed that early condition which will return true for the blocked actions based on guardrails.

* Added test case for bedrock guardrail block content precedence
2025-12-16 08:41:13 +05:30
yuneng-jiang 9907a0d93c Tests 2025-12-15 18:04:27 -08:00
Yuta Saito defea8b887 fix: mcp deepcopy error 2025-12-16 07:02:07 +09: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
Krish DholakiaandGitHub 26fd6d5362 Guardrails API - support LLM tool call response checks on /chat/completions, /v1/responses, /v1/messages on regular + streaming calls (#17619)
* fix(unified_guardrails.py): send all chunks on completion of final stream

* feat(generic_guardrail_api.py): handle tool call response on streaming LLM responses

* fix(anthropic/chat/guardrail_translation): initial commit adding anthropic tool response streaming guardrails

enables guardrail checks on tool response from llm's to work via `/v1/messages`

* feat(anthropic/): working guardrail checks on tool response from LLMs

ensures guardrail checks on anthropic /v1/messages works as expected

* feat(responses/guardrail_translation): support tool call response guardrails on streaming for /v1/responses

ensures complete coverage of tool call responses

* refactor(openai.py): refactor to use consistent pydantic model for responses api tool response on streaming

enables non-openai model tool call response to work correctly with guardrail checks on /v1/responses

* test: update tests

* fix: fix linting error

* fix: fix failing tests

* fix: fix import errors

* fix(openai/chat/guardrail_transformation): fix final chunk returned on streaming
2025-12-15 18:19:52 +05:30
Yuta Saito 73e00c1382 fix: add MCP auth header propagation 2025-12-15 07:45:35 +09:00
Ishaan Jaffer f6c4ad92e4 async def test_update_team_guardrails_with_org_id(): 2025-12-13 16:24:58 -08:00
yuneng-jiang 61767779f8 Adding tests 2025-12-13 14:44:26 -08:00
yuneng-jiang 4bcbd8b0a9 Fix callback env variables 2025-12-12 18:03:08 -08:00
Ishaan JaffandGitHub d38f241032 [Feat] JWT Auth - auth allow selecting team_id from request header (#17884)
* feat: add get_team_id_from_header for JWT Auth

* fix Auth builder JWT Auth

* test_get_team_id_from_header

* test_auth_builder_uses_team_from_header_e2e

* Select Team via Request Header
2025-12-12 10:18:20 -08:00
Sameer KankuteandGitHub da81ab6d97 Merge pull request #17758 from BerriAI/litellm_managed_files_target_storage
Add v0 support for target storage
2025-12-12 22:26:34 +05:30
Sameer KankuteandGitHub abbf8be07b Merge pull request #17864 from BerriAI/litellm_fix_x-litellm-key-spend
Fix x-litellm-key-spend header update
2025-12-12 22:23:42 +05:30
Sameer KankuteandGitHub e0428388a7 Merge pull request #17860 from BerriAI/litellm_openai_files_expire_after_support
Add support for expires after param in Files endpoint
2025-12-12 22:23:11 +05:30
Alexsander HamirandGitHub d9cf53b555 fix: remove dependency on database and redis from health test (#17880) 2025-12-12 08:21:48 -08:00
Alexsander HamirandGitHub c9063d13b1 Add health endpoint tests to CI with database and Redis support (#17877)
- Add database and Redis setup to litellm_mapped_tests_proxy job in CircleCI
- Create shared test helpers in tests/test_litellm/proxy/conftest.py for proxy test setup
- Refactor health endpoint tests to use shared helpers from conftest
- Support automatic Redis cache configuration when REDIS_HOST is set
- Ensure minimal config is created when Redis/database is needed
2025-12-12 07:35:50 -08:00
ArielandGitHub 5df701d15c [feat]: Add opt-in evidence results for Pillar Security guardrail during monitoring (#17812)
* add evidence headers to litellm

* ensure that evidence is surface-able, even in opt-in mode

* update the docs
2025-12-12 04:09:13 -08:00
Sameer Kankute caaf8a6784 Fix x-litellm-key-spend update 2025-12-12 11:44:51 +05:30
Sameer Kankute 49e0f8e95f Add support for expires after param 2025-12-12 10:01:18 +05:30
Jason RobertsandGitHub 6fc39d31b4 feat(guardrails): add configurable fail-open, timeout, and app_user to PANW Prisma AIRS guardrail (#17785)
Add configurable fail-open/fail-closed behavior, timeout settings, and app_user
metadata tracking. Includes security hardening, enhanced
observability (:unscanned header), and comprehensive test coverage (44/44 passing).

No breaking changes.
2025-12-11 15:23:59 -08:00
yuneng-jiangandGitHub cb9bae1aba Merge pull request #16764 from BerriAI/litellm_tag_spend_dedupe
[Fix] Deduplicate /tag/daily/activity metadata
2025-12-11 15:20:16 -08:00
Dominic FallowsandGitHub 756c60540e feat: add support for configurable confidence score thresholds and scope in Presidio PII masking (#17817)
* feat: add support for configurable confidence score thresholds in Presidio PII masking

* feat: enhance Presidio PII masking with configurable score thresholds and behavior documentation

* feat: add configurable output masking and filter scope for Presidio PII guardrail
2025-12-11 15:19:11 -08:00
yuneng-jiangandGitHub 2a864e25f8 Merge pull request #17668 from BerriAI/litellm_sso_config_2
[Fix] Remove SSO Config Values from Config Table on SSO Update
2025-12-11 15:17:33 -08:00
yuneng-jiangandGitHub de9a195d8c Merge pull request #17781 from BerriAI/litellm_daily_agent_table
[Feature] Daily Agent Usage Backend
2025-12-11 15:01:50 -08:00