mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-20 00:11:50 +00:00
Maintainer finding on BerriAI/litellm#34940: guardrails for the same hook run sequentially over one shared, progressively-mutated request dict, so declaring a masking guardrail before a blocking one hides the violation from it (200 vs 400 depending purely on YAML order). scan_raw_request opts a guardrail into always evaluating a snapshot taken before any guardrail in the hook ran, regardless of its declared position. Same contract as run_in_parallel: block-only, its own mutations discarded. Verified live: real proxy, real Gemini call, two custom guardrails (a redactor then a blocker). Same request, same declared order -- without the flag the blocker never sees the raw secret (200); with it, the blocker correctly rejects before any provider call (400).
38 lines
437 B
JSON
38 lines
437 B
JSON
{
|
|
"LIT001": {
|
|
"limit": 22733
|
|
},
|
|
"LIT002": {
|
|
"limit": 26859
|
|
},
|
|
"LIT003": {
|
|
"limit": 269
|
|
},
|
|
"LIT004": {
|
|
"limit": 43
|
|
},
|
|
"LIT005": {
|
|
"limit": 0
|
|
},
|
|
"LIT006": {
|
|
"limit": 1065
|
|
},
|
|
"LIT007": {
|
|
"limit": 0
|
|
},
|
|
"LIT008": {
|
|
"limit": 948
|
|
},
|
|
"LIT009": {
|
|
"limit": 0
|
|
},
|
|
"LIT010": {
|
|
"limit": 16616
|
|
},
|
|
"LIT011": {
|
|
"limit": 5583
|
|
},
|
|
"LIT012": {
|
|
"limit": 4509
|
|
}
|
|
}
|