litellm/litellm/types
Ishaan Jaff 371cabfebd
Add MCP Security guardrail to block unregistered MCP servers (#21429)
* Add MCP_SECURITY enum to SupportedGuardrailIntegrations

* Add MCP security guardrail initializer

* Add MCPSecurityGuardrail implementation

* Add MCP Security policy template

* Add Type filter to policy templates UI

* Add unit tests for MCP security guardrail

* fix(lint): remove unused Dict import from mcp_security_guardrail

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Add French language support for EU AI Act Article 5 guardrail (#21427)

* Add French language support for EU AI Act Article 5 template

- Create eu_ai_act_article5_fr.yaml with comprehensive French keywords
- Includes identifier words: concevoir, créer, développer, noter, classer, etc.
- Includes block words: crédit social, comportement social, émotion des employés, etc.
- Includes always-block keywords for explicit prohibited practices
- Includes exceptions for research, compliance, and legitimate use cases
- Catches circumvention attempts with phrase variations

* Add comprehensive tests for French EU AI Act guardrail

- Test 3 critical scenarios: blocked query, circumvention attempt, safe query
- Test edge cases: case-insensitive, mixed language, research exceptions
- All 7 tests passing
- Validates both blocking and allowing behavior

* Fix content filter to support conditional matching without inherit_from

- Enable conditional matching when identifier_words + additional_block_words are present
- Previously required inherit_from, but EU AI Act templates are self-contained
- Fixes Greptile feedback: conditional matching now works as documented

* Add pure conditional matching test for French guardrail

- Test identifier + block word combinations not in always_block_keywords
- Verifies conditional matching works independently
- Addresses Greptile feedback about test coverage gap

* Fix exception word bypass risk in French template

- Replace short words (film, jeu, juste) with context-specific phrases
- Prevents substring matching bypasses (e.g., enjeu matching jeu)
- Add tests for bypass prevention and legitimate game context
- Addresses Greptile security feedback

* Make conditional match assertion more robust

- Use getattr to safely access exception detail field
- Check if detail is dict before calling .get()
- Addresses Greptile feedback about brittle string assertion

* Add French EU AI Act Article 5 policy template to registry

- Add eu-ai-act-article5-fr template for French language support
- Includes French description and guardrail info
- Matches structure of English template

* Address greptile review feedback (greploop iteration 1)

- Use status_code=400 instead of 403 to match guardrail logging convention
- Use prefix stripping instead of split('/')[-1] for robust server name extraction

* remove French EU AI Act template from policy_templates.json

---------

Co-authored-by: Julio Quinteros Pro <jquinter@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-17 21:19:13 -08:00
..
containers [Feat] Containers API - add new container API file management + UI Interface (#17745) 2025-12-09 17:33:26 -08:00
google_genai
images
integrations fix(azure): preserve content_policy_violation error details from Azure OpenAI (#20883) 2026-02-10 22:47:03 -08:00
interactions [Feat] New Endpoint - Google Interactions API - added on litellm SDK (#18079) 2025-12-17 02:18:51 +04:00
litellm_core_utils include server_tool_use in streaming usage (#16826) 2025-11-25 14:50:17 -08:00
llms Add eval run endpoints methods 2026-02-17 19:32:15 +05:30
management_endpoints Add fallback endpoints support 2026-01-16 10:51:33 +05:30
mcp_server [Feat] MCP Oauth2 Fixes - Add support for MCP M2M Oauth2 support (#20788) 2026-02-09 17:35:11 -08:00
passthrough_endpoints
prompts Prompt Management - new API for integrating providers (#17829) 2025-12-11 15:43:40 -08:00
proxy Add compliance checker endpoints + UI panel (#21432) 2026-02-17 18:22:26 -08:00
responses Guardrails API - support LLM tool call response checks on /chat/completions, /v1/responses, /v1/messages on regular + streaming calls (#17619) 2025-12-15 18:19:52 +05:30
secret_managers [Feat] Adds IAM role assumption support for AWS Secret Manager (#16887) 2025-11-20 12:38:48 -08:00
videos Fix error about encoding video id for azure 2025-12-09 16:36:11 +05:30
access_group.py allow editing of access group names 2026-02-13 17:03:41 -08:00
adapter.py
agents.py [Feat] A2a Gateway - allow using bedrock agentcore, langgraph agents with A2a Gateway (#17786) 2025-12-10 13:08:43 -08:00
caching.py fix mypy error in caching.py 2026-01-15 08:35:08 +05:30
completion.py
embedding.py
files.py [Feat] Manus FILES API - Add File upload, get, delete, list (#18904) 2026-01-10 13:27:54 -08:00
fine_tuning.py
guardrails.py Add MCP Security guardrail to block unregistered MCP servers (#21429) 2026-02-17 21:19:13 -08:00
mcp.py MCP Hub - publish/discover MCP Servers within a company (#16857) 2025-11-19 19:06:21 -08:00
policy_engine.py [Feat] New LiteLLM Policy engine - create policies to manage guardrails, conditions - permissions per Key, Team (#19612) 2026-01-22 19:49:53 -08:00
rag.py [Feat] RAG API - Add support for using s3 Vectors as Vector Store Provider for /rag/ingest (#19888) 2026-01-27 14:45:26 -08:00
realtime.py
rerank.py
router.py feat: enforce model-level TPM/RPM limits (enforce_model_rate_limits) … (#19230) 2026-02-02 18:18:46 +05:30
scheduler.py
search.py search tools list includes config defined search tools 2026-02-03 15:57:13 -08:00
services.py [Fix] CI/CD - mypy & check_code_and_doc_quality & mcp_testing (#17920) 2025-12-13 08:18:43 -08:00
tag_management.py
utils.py feat: guardrail tracing UI - policy, detection method, match details (#21349) 2026-02-16 18:44:27 -08:00
vector_store_files.py Vector store files Stable Release (#16643) 2025-11-15 13:00:33 -08:00
vector_stores.py [Feat] LiteLLM Vector Stores - Add permission management for users, teams (#19972) 2026-01-28 18:55:40 -08:00