Fix EU AI Act template: add missing category_file path

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)
This commit is contained in:
Ishaan Jaffer 2026-02-17 15:06:19 -08:00
parent 153af8b901
commit 97a91bca83
2 changed files with 2 additions and 0 deletions

View file

@ -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"

View file

@ -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"