refactor(policies): prefix SG guardrail policy IDs with country code#21974
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryRenames Singapore guardrail policy IDs from regulation-first (
Confidence Score: 4/5
|
| Filename | Overview |
|---|---|
| policy_templates.json | Renames SG guardrail IDs from pdpa-sg-*/mas-sg-* to sg-pdpa-*/sg-mas-* across guardrails arrays, guardrailDefinitions, and policy guardrails_add lists. JSON remains valid. Note: naming convention is inconsistent with existing EU policies that use gdpr-eu-*. |
| litellm/policy_templates_backup.json | Mirror of the same guardrail ID renames as policy_templates.json. Backup file stays in sync with the primary template. JSON is valid. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[policy_templates.json] -->|"defines guardrail IDs"| B["SG PDPA Policy\n(pdpa-singapore)"]
A -->|"defines guardrail IDs"| C["SG MAS Policy\n(mas-ai-risk-management)"]
B -->|"renamed: pdpa-sg-* → sg-pdpa-*"| D["sg-pdpa-pii-identifiers\nsg-pdpa-contact-information\nsg-pdpa-financial-data\nsg-pdpa-business-identifiers\nsg-pdpa-personal-identifiers\nsg-pdpa-sensitive-data\nsg-pdpa-do-not-call\nsg-pdpa-data-transfer\nsg-pdpa-profiling-automated-decisions"]
C -->|"renamed: mas-sg-* → sg-mas-*"| E["sg-mas-fairness-bias\nsg-mas-transparency-explainability\nsg-mas-human-oversight\nsg-mas-data-governance\nsg-mas-model-security"]
A -.->|"synced to"| F[litellm/policy_templates_backup.json]
Last reviewed commit: d15423d
| "guardrailDefinitions": [ | ||
| { | ||
| "guardrail_name": "pdpa-sg-pii-identifiers", | ||
| "guardrail_name": "sg-pdpa-pii-identifiers", |
There was a problem hiding this comment.
Inconsistent naming convention across regions
The SG guardrails now use country-first naming (sg-pdpa-*, sg-mas-*), but existing EU GDPR guardrails still use regulation-first naming (gdpr-eu-*) — see lines 950–1024. The EU AI Act guardrails use eu-ai-act-* (region-first, consistent with this PR), but the GDPR ones do not.
If the intent is to standardize on country/region-first, consider also renaming gdpr-eu-* → eu-gdpr-* for full consistency. Otherwise, the codebase will have two different conventions for the same concept.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Type
🧹 Refactoring
Changes