litellm/tests/test_litellm/proxy/utils
Deepanshu ec52c22aef fix(guardrails): harden scan_raw_request against review findings
- Use safe_deep_copy instead of a bare deepcopy for the raw-request
  snapshot; request payloads commonly carry unpicklable objects (e.g. an
  otel span in metadata), which previously raised on every guarded
  request when tracing was enabled (Bugbot, High).
- Only compute the snapshot when a guardrail actually opted in, and take
  it before _maybe_execute_pipelines runs, so a pipeline-mutated payload
  can't hide a violation from a scan_raw_request guardrail outside the
  pipeline (veria-ai).
- Log a warning when a scan_raw_request guardrail returns a modified
  payload, since that mutation is discarded and the combination is
  otherwise silently exploitable for a masking-capable integration
  misconfigured this way (veria-ai).
2026-08-27 21:14:58 -04:00
..
helpers test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
prisma_and_spend Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_decrease_anys_opus5_round2 2026-08-25 16:17:29 -07:00
proxy_logging fix(guardrails): harden scan_raw_request against review findings 2026-08-27 21:14:58 -04:00
__init__.py test(proxy/utils): pin bottom-of-file helper behavior (#29509) 2026-06-02 17:45:19 -07:00