Skip to content

FIX: Adding openai invalid_prompt safety blocks as content filters#1463

Merged
rlundeen2 merged 1 commit intoAzure:mainfrom
rlundeen2:users/rlundeen/fix-invalid-prompt-handling
Mar 13, 2026
Merged

FIX: Adding openai invalid_prompt safety blocks as content filters#1463
rlundeen2 merged 1 commit intoAzure:mainfrom
rlundeen2:users/rlundeen/fix-invalid-prompt-handling

Conversation

@rlundeen2
Copy link
Contributor

When running against GPT-5.4, it raises this filter at the model level:

Root cause: BadRequestError: Error code: 400 - {'error': {'message': "Invalid prompt: we've limited access to this content for safety reasons. This type of information may be used to benefit or to harm people. We are continuously refining our work in this area, and you can read more about our approach in our blog post (https://openai.com/index/preparing-for-future-ai-capabilities-in-biology) and Model Spec (https://openai.com/index/introducing-the-model-spec).", 'type': 'invalid_request_error', 'param': None, 'code': 'invalid_prompt'}}

This PR handles this as a filter.

@rlundeen2 rlundeen2 merged commit 351d790 into Azure:main Mar 13, 2026
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants