Azure Content Filter returning content=None but no filter was triggered

1

I’m encountering an issue with the Azure OpenAI content filter (for responses from gpt-4o) where the content is returned as None, but all the content filters (hate, self-harm, sexual, violence) are evaluated as False. This is confusing because no content filter appears to be triggered, yet the finish_reason is ‘content_filter’.

Here’s the response I’m getting:

    finish_reason='content_filter', 
    index=0, 
    message=ChatCompletionMessage(
        content=None, 
        role='assistant', 
        function_call=None, 
        tool_calls=None
    ), 
    content_filter_results={
        'hate': {'filtered': False, 'severity': 'safe'}, 
        'self_harm': {'filtered': False, 'severity': 'safe'}, 
        'sexual': {'filtered': False, 'severity': 'safe'}, 
        'violence': {'filtered': False, 'severity': 'safe'}
    }

It seems like the content is being filtered, but all severity levels are marked as ‘safe’, and no individual filter is being triggered. Has anyone else encountered this issue? Any ideas on why the content would be None if no filters were actually triggered?

In my task I’m posting as input some email messages to the prompt and sometimes removing a link or other specific content helps, but I haven’t found any consistent global fix for this issue. In some cases, small content changes can get the filter to allow the message, but this feels more like a workaround than a solution.