fix(openai): Avoid double exit causing an unraisable exception#4736
Merged
alexander-alderman-webb merged 2 commits intomasterfrom Sep 2, 2025
Merged
fix(openai): Avoid double exit causing an unraisable exception#4736alexander-alderman-webb merged 2 commits intomasterfrom
alexander-alderman-webb merged 2 commits intomasterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4736 +/- ##
==========================================
+ Coverage 84.85% 84.88% +0.03%
==========================================
Files 156 156
Lines 16115 16115
Branches 2741 2741
==========================================
+ Hits 13674 13679 +5
+ Misses 1651 1650 -1
+ Partials 790 786 -4
|
sentrivana
approved these changes
Sep 2, 2025
Contributor
sentrivana
left a comment
There was a problem hiding this comment.
Thanks for fixing -- please also close #4723 once this is merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The function
_new_embeddings_create_common()creates a span context with thewithkeyword, whereas_new_responses_create_common()and_new_chat_completion_common()manually call__enter__and setfinish_span=True. Reusing the same_capture_exception()for all scenarios caused a double-exit in_wrap_async_embeddings_create(), which calls_new_embeddings_create_common().Context:
AttributeErrorin openai tests #4723.