Added FIX for azure content filtering problem #4192
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Resolved the content filtering issue (jailbreak) caused by Azure's safety mechanisms when using current DeepSeek system prompts. The issue stemmed from certain strict terms like "only" and "refuse", which appeared to override Azure AI safety controls. By removing these terms, the problem was resolved, and the system functioned correctly.
Exact Error Message:
Error: HTTP 400 Bad Request from https://deepseek-r1-model01.eastus.models.ai.azure.com/chat/completions {"error":{"message":"The response was filtered due to the prompt triggering Microsoft's content management policy. Please modify your prompt and retry.","type":null,"param":"prompt","code":"content_filter","status":400,"innererror":{"code":"ResponsibleAIPolicyViolation","content_filter_result":{"hate":{"filtered":false,"severity":"safe"},
,"detected":true},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}}}}}
Having conversation on here : #3902
Checklist
N/A
Screenshots
Testing instructions
N/A