Skip to content

Commit 14ed091

Browse files
authored
Merge branch 'main' into e2e-llmd
2 parents f3998d5 + c3ce62e commit 14ed091

File tree

15 files changed

+1037
-434
lines changed

15 files changed

+1037
-434
lines changed

config/testing/config.e2e.yaml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ classifier:
6969
use_cpu: true
7070
category_mapping_path: "models/lora_intent_classifier_bert-base-uncased_model/category_mapping.json"
7171
pii_model:
72-
model_id: "models/pii_classifier_modernbert-base_presidio_token_model" # TODO: Use local model for now before the code can download the entire model from huggingface
73-
use_modernbert: true
72+
model_id: "models/lora_pii_detector_bert-base-uncased_model"
73+
use_modernbert: false # BERT-based LoRA model (this field is ignored - always auto-detects)
7474
threshold: 0.7
7575
use_cpu: true
76-
pii_mapping_path: "models/pii_classifier_modernbert-base_presidio_token_model/pii_type_mapping.json"
76+
pii_mapping_path: "models/lora_pii_detector_bert-base-uncased_model/pii_type_mapping.json"
7777
categories:
7878
- name: business
7979
description: "Business and management related queries"
@@ -359,6 +359,24 @@ decisions:
359359
enabled: true
360360
pii_types_allowed: ["EMAIL_ADDRESS", "PERSON", "GPE", "PHONE_NUMBER", "US_SSN", "CREDIT_CARD"]
361361

362+
# Default catch-all decision for unmatched requests (E2E PII test fix)
363+
# This ensures PII detection is always enabled, even when no specific decision matches
364+
- name: "default_decision"
365+
description: "Default catch-all decision - blocks all PII for safety"
366+
priority: 1 # Lowest priority - only matches if nothing else does
367+
rules:
368+
operator: "OR"
369+
conditions:
370+
- type: "always" # Always matches as fallback
371+
modelRefs:
372+
- model: "Model-B"
373+
use_reasoning: false
374+
plugins:
375+
- type: "pii"
376+
configuration:
377+
enabled: true
378+
pii_types_allowed: [] # Block ALL PII - empty list means nothing allowed
379+
362380
default_model: "Model-A"
363381

364382
# API Configuration

deploy/helm/semantic-router/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ initContainer:
167167
repo: LLM-Semantic-Router/jailbreak_classifier_modernbert-base_model
168168
- name: pii_classifier_modernbert-base_presidio_token_model
169169
repo: LLM-Semantic-Router/pii_classifier_modernbert-base_presidio_token_model
170+
# LoRA PII detector (for auto-detection feature)
171+
- name: lora_pii_detector_bert-base-uncased_model
172+
repo: LLM-Semantic-Router/lora_pii_detector_bert-base-uncased_model
170173

171174

172175
# Autoscaling configuration

deploy/kubernetes/aibrix/semantic-router-values/values.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,10 @@ config:
437437
use_cpu: true
438438
category_mapping_path: "models/category_classifier_modernbert-base_model/category_mapping.json"
439439
pii_model:
440-
model_id: "models/pii_classifier_modernbert-base_presidio_token_model"
441-
use_modernbert: true
440+
# Support both traditional (modernbert) and LoRA-based PII detection
441+
# When model_type is "auto", the system will auto-detect LoRA configuration
442+
model_id: "models/lora_pii_detector_bert-base-uncased_model"
443+
use_modernbert: false # Use LoRA PII model with auto-detection
442444
threshold: 0.7
443445
use_cpu: true
444446
pii_mapping_path: "models/pii_classifier_modernbert-base_presidio_token_model/pii_type_mapping.json"

0 commit comments

Comments
 (0)