Commit Graph
768 Commits
Author SHA1 Message Date
yuneng-jiangandGitHub 9a81be690e Merge pull request #18359 from BerriAI/litellm_logs_add_filtering
[Feature] Allow Error code filtering on Spend Logs
2025-12-22 18:21:36 -08:00
yuneng-jiang a510654736 Allow Error code filtering on spend logs endpoint 2025-12-22 17:46:25 -08:00
Alexsander HamirandGitHub 5534038e93 Fix CI: Revert security scan changes and add GitGuardian ignore rules (#18358) 2025-12-22 17:03:53 -08:00
yuneng-jiang 81dc70673a Merge remote-tracking branch 'origin' into litellm_ui_unset_values 2025-12-22 11:44:41 -08:00
yuneng-jiangandGitHub a27db9f52d Merge pull request #18090 from BerriAI/litellm_sso_role_mapping
[Feature] SSO Role Mapping
2025-12-22 11:30:49 -08:00
Alexsander HamirandGitHub 30fa90f70d [Feat] Enable async_post_call_failure_hook to transform error responses (#18348) 2025-12-22 11:24:30 -08:00
yuneng-jiang 13adaa4a73 Merge remote-tracking branch 'origin' into litellm_sso_role_mapping 2025-12-22 09:44:04 -08:00
yuneng-jiang 31cc9654ce Merge remote-tracking branch 'origin' into litellm_ui_cloudzero_improvements 2025-12-22 09:43:23 -08:00
Ishaan JaffandGitHub 268ed11a01 Litellm content filter logs page (#18335)
* add view for litellm content filter

* add ContentFilterDetails

* test_apply_guardrail_logs_guardrail_information

* backend track litellm content filter

* ui view

* fix code qa check
2025-12-22 18:20:26 +05:30
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
yuneng-jiang ffcac2eebc Allow deleting key expiry 2025-12-19 18:04:04 -08:00
yuneng-jiang 74842de78e Adding backend 2025-12-19 13:04:59 -08:00
yuneng-jiangandGitHub 026c2ad693 Merge pull request #18167 from BerriAI/litellm_vector_store_config
[Feature] Auto Resolve Vector Store Embedding Model Config
2025-12-19 11:39:17 -08:00
yuneng-jiangandGitHub b1b488982d Merge pull request #18168 from BerriAI/litellm_cloudzero_delete
[Feature] Delete Cloudzero Settings Route
2025-12-19 11:38:10 -08:00
yuneng-jiang 02355f602c Merge remote-tracking branch 'origin' into litellm_sso_role_mapping 2025-12-19 11:03:30 -08:00
yuneng-jiang 313a613a13 Adding tests 2025-12-19 10:56:11 -08:00
Alexsander HamirandGitHub 24edbccf5c [Fix] Security - Remove example API keys with high entropy (#18255) 2025-12-19 10:09:50 -08: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 HamirandGitHub 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
Alexsander HamirandGitHub 28821427ce [Fix] CI/CD #1 - mypy | check_code_and_doc_quality | guardrails_testing (#18195) 2025-12-18 06:31:01 -08:00
Krish DholakiaandGitHub 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
YutaSaitoandGitHub 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
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
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
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
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-jiang 42d7d757a3 Adding role mappings to SSOConfig DB 2025-12-16 15:48:26 -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