Skip to content

fix: handle updated OpenAI content filter error behavior #175#176

Merged
Fedir-Yatsenko merged 2 commits intodevelopmentfrom
fix/175-update-to-new-openai-behavior-when-content_filter-appears
Mar 2, 2026
Merged

fix: handle updated OpenAI content filter error behavior #175#176
Fedir-Yatsenko merged 2 commits intodevelopmentfrom
fix/175-update-to-new-openai-behavior-when-content_filter-appears

Conversation

@Fedir-Yatsenko
Copy link
Collaborator

@Fedir-Yatsenko Fedir-Yatsenko commented Feb 27, 2026

Applicable issues

Description of changes

  • Handle openai.BadRequestError with content_filter code by raising DIALException to propagate the error to the client.
  • Re-raise ContentFilterFinishReasonError as DIALException instead of silently appending a message to the response.
  • Add GPT-4.1 high content filter model variant.
  • Fix watcher loop not exiting after cancelling a disconnected request.

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

- Handle `openai.BadRequestError` with `content_filter` code by raising `DIALException` to propagate the error to the client
- Re-raise `ContentFilterFinishReasonError` as `DIALException` instead of silently appending a message to the response
- Add GPT-4.1 high content filter model variant
- Fix watcher loop not exiting after cancelling a disconnected request
@Fedir-Yatsenko Fedir-Yatsenko self-assigned this Feb 27, 2026
@Fedir-Yatsenko Fedir-Yatsenko added bug Something isn't working python Pull requests that update python code labels Feb 27, 2026
@Fedir-Yatsenko Fedir-Yatsenko linked an issue Feb 27, 2026 that may be closed by this pull request
@Fedir-Yatsenko
Copy link
Collaborator Author

Response example image

kryachkow
kryachkow previously approved these changes Feb 27, 2026
@Fedir-Yatsenko
Copy link
Collaborator Author

Fedir-Yatsenko commented Feb 27, 2026

/deploy-review

GitHub actions run: 22493239647
Environment URL: review-environment | pipeline

@Fedir-Yatsenko Fedir-Yatsenko merged commit d94bc34 into development Mar 2, 2026
10 checks passed
@Fedir-Yatsenko Fedir-Yatsenko deleted the fix/175-update-to-new-openai-behavior-when-content_filter-appears branch March 2, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update to new OpenAI behavior when content_filter appears

2 participants