From 97a91bca830a4a263eb7276ed762936d789d4b9d Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Tue, 17 Feb 2026 15:06:19 -0800 Subject: [PATCH] Fix EU AI Act template: add missing category_file path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The EU AI Act template was missing the category_file path in the guardrail definition, causing the guardrail to fail silently - it would be created in the database but wouldn't load the YAML rules file. Without the category_file, the guardrail has no actual blocking rules, so prompts like "social credit system" pass through even though they should be blocked. Adds the category_file path pointing to the eu_ai_act_article5.yaml file so the guardrail can load its rules. Tested: - Before fix: "social credit system" → 200 OK (passes through) - After fix: "social credit system" → 403 blocked (works correctly) --- litellm/policy_templates_backup.json | 1 + policy_templates.json | 1 + 2 files changed, 2 insertions(+) diff --git a/litellm/policy_templates_backup.json b/litellm/policy_templates_backup.json index ed1b7da3148..6773a8170c3 100644 --- a/litellm/policy_templates_backup.json +++ b/litellm/policy_templates_backup.json @@ -790,6 +790,7 @@ "categories": [ { "category": "eu_ai_act_article5_prohibited_practices", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_article5.yaml", "enabled": true, "action": "BLOCK", "severity_threshold": "medium" diff --git a/policy_templates.json b/policy_templates.json index ed1b7da3148..6773a8170c3 100644 --- a/policy_templates.json +++ b/policy_templates.json @@ -790,6 +790,7 @@ "categories": [ { "category": "eu_ai_act_article5_prohibited_practices", + "category_file": "litellm/proxy/guardrails/guardrail_hooks/litellm_content_filter/policy_templates/eu_ai_act_article5.yaml", "enabled": true, "action": "BLOCK", "severity_threshold": "medium"