Azure AI Foundry (Classic) Content Filters not working

Nazarii Klymok 0 Reputation points
2025-12-05T10:03:24.7266667+00:00

Greetings! I tried adding Content Filter to Azure AI Foundry (Classic experience) and it doesn't work.

Steps to reproduce:

  1. Created an AI Agent with Azure AI Foundry using a pre-created gpt-4.1 model deployment
  2. Create a content filter (both input/output are set to blocking-medium).
  3. Apply content filter to gpt-4.1 model deployment that is used by the AI agent.
  4. Save the content filter.

I tried triggering every category from the filters, and unfortunately the filters never trigger. I expect the agent to give a fallback reply and have some logs that mention that a content filter has been triggered, but the agent just replies following the prompt and behaving normally.

I tried both in the Playground and using API. But no luck.

Please help!

Azure AI Content Safety
Azure AI Content Safety
An Azure service that enables users to identify content that is potentially offensive, risky, or otherwise undesirable. Previously known as Azure Content Moderator.
{count} votes

1 answer

Sort by: Most helpful
  1. Anshika Varshney 4,345 Reputation points Microsoft External Staff Moderator
    2025-12-05T13:38:41.9733333+00:00

    Hi Nazarii Klymok,

    Thank you for reaching out on the Microsoft Q&A.
    The issue you’re experiencing is related to how Azure AI Foundry (Classic) applies content filters when used through agents. Even though you’ve correctly created and attached a custom content filter to your deployment, the filter only triggers in the “Try it out” interface and not when the same model is called through an agent. This behavior indicates that the filter is working at the model level but may not be consistently applied within the Classic agent workflow.

    Based on current documentation, custom content filters should block or annotate content according to the severity levels you configure. Since the filter behaves correctly in direct tests, your setup itself is likely fine. The inconsistency shows that the agent path may not be enforcing the filtering layer as expected. Other users have reported very similar experiences, and Microsoft has acknowledged that they are checking with the product team to investigate the underlying cause.

    you can verify that the correct deployment is being called by the agent and test the same deployment through a direct API or Playground call. If it works in those paths but not with agents as it seems that confirms the issue is on the platform side.

    In the meantime, if filtering is essential to your scenario, you may want to use the updated (non-classic) Foundry experience or apply filtering separately via Azure AI Content Safety until the product team resolves the issue.

    Reference:

    I Hope this helps. Do let me know if you have any further queries.

    Thankyou!

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.