-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
10.37.0
Framework Version
No response
Link to Sentry event
No response
Reproduction Example/SDK Setup
The OpenAI lib supports calling .withResponse() on the result of chat.completions.create() and responses.create() in order to get back both the stream and the raw response object from the request. It seems that Sentry's integration does not maintain this API interface, since trying to call withResponse() on a wrapped result ends up with the error: instance.chat.completions.create(...).withResponse is not a function
Steps to Reproduce
- Enable OpenAI Integration (on by default)
- Call
openAIInstance.completions.create({ ... }).withResponse() - Error is thrown.
Expected Result
Sentry's integration should not break this API.
Actual Result
err: {
"type": "TypeError",
"message": "instance.chat.completions.create(...).withResponse is not a function",
}
Additional Context
No response
Priority
React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.
Metadata
Metadata
Assignees
Projects
Status