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:
- How to use content filters with Azure OpenAI Service
- Azure OpenAI Service content filtering
- Azure AI Content Safety
- Data, privacy, and security for Azure OpenAI Service
- Configure content filters - Azure OpenAI | Microsoft Learn (There is an option to configure content filters, and if you are eligible, you can apply to modify these filters as mentioned on the page.)
I Hope this helps. Do let me know if you have any further queries.
Thankyou!