Merge pull request #1701 from NousResearch/fix/gateway-yaml-pii-redaction

fix(gateway): PII redaction config never read — missing yaml import
This commit is contained in:
Teknium
2026-03-17 03:53:43 -07:00
committed by GitHub

View File

@@ -1552,8 +1552,9 @@ class GatewayRunner:
# Read privacy.redact_pii from config (re-read per message)
_redact_pii = False
try:
import yaml as _pii_yaml
with open(_config_path, encoding="utf-8") as _pf:
_pcfg = yaml.safe_load(_pf) or {}
_pcfg = _pii_yaml.safe_load(_pf) or {}
_redact_pii = bool((_pcfg.get("privacy") or {}).get("redact_pii", False))
except Exception:
pass