Skip to content

Commit b398c1f

Browse files
committed
fix(pii): revert policy.go to upstream version to fix aibrix regression
The previous policy.go changes added a default_decision fallback mechanism that broke aibrix profile. Aibrix uses static YAML config and doesn't have a default_decision defined. Reverting to the upstream version from PR vllm-project#688 that passed aibrix tests successfully. Related to vllm-project#648 Signed-off-by: Yossi Ovadia <[email protected]>
1 parent 4ce1bbc commit b398c1f

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/semantic-router/pkg/utils/pii/policy.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ type PolicyChecker struct {
1414

1515
// IsPIIEnabled checks if PII detection is enabled for a given decision
1616
func (c *PolicyChecker) IsPIIEnabled(decisionName string) bool {
17-
// If no decision specified, try to use the default catch-all decision
1817
if decisionName == "" {
19-
decisionName = "default_decision"
20-
logging.Infof("No decision specified, trying default decision: %s", decisionName)
18+
logging.Infof("No decision specified, PII detection disabled")
19+
return false
2120
}
2221

2322
decision := c.Config.GetDecisionByName(decisionName)
@@ -50,12 +49,6 @@ func (pc *PolicyChecker) CheckPolicy(decisionName string, detectedPII []string)
5049
return true, nil, nil
5150
}
5251

53-
// Apply same default decision fallback as in IsPIIEnabled
54-
if decisionName == "" {
55-
decisionName = "default_decision"
56-
logging.Infof("No decision specified for CheckPolicy, trying default decision: %s", decisionName)
57-
}
58-
5952
decision := pc.Config.GetDecisionByName(decisionName)
6053
if decision == nil {
6154
logging.Infof("Decision %s not found, allowing request", decisionName)

0 commit comments

Comments
 (0)