#34969 [Bug]: Noma v2 guardrail serializes a live model_call_details, raising 'dictionary changed size during iteration'
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
### What happened?
`NomaV2Guardrail._build_scan_payload` embeds `logging_obj.model_call_details` into the scan payload **by reference**, and that dict is concurrently mutated by the async logging handler on another thread. The payload is then JSON-serialized, so the serializer iterates a dict that is growing underneath it.
`litellm/proxy/guardrails/guardrail_hooks/noma/noma_v2.py`:
```python def _build_scan_payload( self, inputs: GenericGuardrailAPIInputs, request_data: dict, input_type: Literal["request", "response"], logging_obj: Optional["LiteLLMLoggingObj"], application_id: Optional[str], ) -> dict: payload_request_data = self._sanitize_payload_for_transport(request_data) if logging_obj is not None: payload_request_data["litellm_logging_obj"] = getattr(logging_obj, "model_call_details", None) ```
Three details make this reachable rather than theoretical:
1. **The `json.dumps` round-trip does not protect it.** `_sanitize_payload_for_transport(request_data)` runs on line 134, and `model_call_details` is assigned on li…