Skip to content

Conversation

@antonpirker
Copy link
Contributor

@antonpirker antonpirker commented Jul 9, 2025

Add support for the new preferred way of using OpenAI, the /responses API (see https://platform.openai.com/docs/guides/responses-vs-chat-completions)

Also makes sure the current span is captured when an error is raised.

@codecov
Copy link

codecov bot commented Jul 9, 2025

Codecov Report

Attention: Patch coverage is 83.75000% with 13 lines in your changes missing coverage. Please review.

Please upload report for BASE (antonpirker/openai-overhaul@c263e02). Learn more about missing BASE report.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
sentry_sdk/integrations/openai.py 83.54% 8 Missing and 5 partials ⚠️
Additional details and impacted files
@@                      Coverage Diff                       @@
##             antonpirker/openai-overhaul    #4564   +/-   ##
==============================================================
  Coverage                               ?   80.73%           
==============================================================
  Files                                  ?      156           
  Lines                                  ?    16581           
  Branches                               ?     2814           
==============================================================
  Hits                                   ?    13387           
  Misses                                 ?     2304           
  Partials                               ?      890           
Files with missing lines Coverage Δ
sentry_sdk/consts.py 94.66% <100.00%> (ø)
sentry_sdk/integrations/openai.py 81.50% <83.54%> (ø)

@antonpirker
Copy link
Contributor Author

Waiting on #4566

@antonpirker antonpirker marked this pull request as ready for review July 21, 2025 15:27
@antonpirker antonpirker requested a review from a team as a code owner July 21, 2025 15:27
Copy link
Contributor

@sentrivana sentrivana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall lgtm! Just two small improvement suggestions

@antonpirker antonpirker merged commit f0b3d95 into antonpirker/openai-overhaul Jul 23, 2025
119 checks passed
@antonpirker antonpirker deleted the antonpirker/openai-responses-api branch July 23, 2025 07:59
antonpirker added a commit that referenced this pull request Jul 29, 2025
Update our OpenAI integration to support new APIs (`/responses`) and be OTel and Sentry AI Agents insights module compatible.

Contains:
- #4563
- #4564
- #4628

---------

Co-authored-by: Ivana Kellyer <[email protected]>
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.

3 participants