Skip to content

Patched AI method returns a promise when it shouldn't #17553

@JoeEnnever

Description

@JoeEnnever

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

10.10.0

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

No response

Steps to Reproduce

  1. Create a new Node.js project

  2. Install the required dependencies:

    npm install @sentry/node ai

  3. Create the following files:

// index.js
import * as Sentry from '@sentry/node'

Sentry.init({
  tracesSampler: (ctx) => {
    return 0.01
  },
  spotlight: true,
})

await import("./otherfile.js")
// otherfile.js
import { streamText } from "ai";

console.log(streamText({model: "gpt-5"}))
  1. Run the application with:

    $ node index.js

Expected Result

DefaultStreamTextResult {
  // snip
}

Actual Result

Promise { <pending> }

Metadata

Metadata

Assignees

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions