Skip to content

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

Closed

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> }

Activity

  1. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Sep 8, 2025
  2. raymondhechen commented on Sep 10, 2025

    @raymondhechen

    Also encountering this issue

  3. RulaKhaled commented on Sep 10, 2025

    @RulaKhaled
    Collaborator

    Hello @JoeEnnever, thank you for reaching out, i was able to reproduce this and will work on a fix.

  4. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Sep 10, 2025
  5. self-assigned this
    on Sep 10, 2025
  6. github-actions commented on Sep 16, 2025

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #17580, which was included in the 10.12.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions