GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — OpenAI integration drops streamed tool calls that have no `index` · Issue #25620 · getsentry/sentry-javascript

OpenAI integration drops streamed tool calls that have no index #25620

New issue
Copy link
New issue
Copy link
Closed
#25622
Closed
OpenAI integration drops streamed tool calls that have no index#25620
#25622
Copy link
Labels
BugNode.jsSpans

Description

@pcbeingused333
pcbeingused333
opened on Oct 21, 2026
Issue body actions

Is there an existing issue for this?

  • I have checked for existing issues
  • I have reviewed the documentation
  • I am using the latest SDK release

How do you use Sentry?

Sentry SaaS (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

11.8.0 (also develop at 6fb6b07)

Framework Version

Node 24, openai SDK pointed at an OpenAI-compatible endpoint (Gemini's /v1beta/openai)

Link to Sentry event

No response

Reproduction Example/SDK Setup

Sentry.init({ integrations: [Sentry.openAIIntegration()], tracesSampleRate: 1 });
const client = new OpenAI({ baseURL: 'https://generativelanguage.googleapis.com/v1beta/openai/', apiKey });
const stream = await client.chat.completions.create({ model, messages, tools, stream: true });
for await (const _ of stream) {}

Steps to Reproduce

  1. Stream a chat completion from an OpenAI-compatible endpoint that sends each tool call whole in its own delta without index (Gemini's OpenAI endpoint does; a mocked stream with two tool_calls deltas that carry id, function.name and function.arguments but no index reproduces it).
  2. Look at the tool-call attribute of the resulting span.

Expected Result

Both tool calls are recorded on the span, as they are for the same request without stream: true.

Actual Result

No tool calls are recorded. processChatCompletionToolCalls in packages/server-utils/src/ai/openai/streaming.ts skips every delta whose index is undefined.

Additional Context

Proposed fix: match unindexed deltas by id, start a new call on a new id or a function name, and otherwise append to the latest call; indexed deltas are grouped exactly as before. A patch with tests is ready; happy to open the PR.

Activity

  1. getsantry
    added
    Waiting for: Product Owner
    on Oct 21, 2026
  2. linear-code commented on Oct 21, 2026

    @linear-code
    linear-codeBot
    on Oct 21, 2026 – with Linear Code
    More actions

    JS-3984

  3. getsantry
    added this to GitHub Issues with 👀 3on Oct 21, 2026
  4. getsantry
    moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Oct 21, 2026
  5. github-actions
    added
    Node.js
    on Oct 21, 2026
  6. linear-code
    added
    Bug
    Spans
    on Oct 21, 2026
  7. andreiborza commented on Oct 22, 2026

    @andreiborza
    andreiborza
    on Oct 22, 2026
    Member
    More actions

    Hi @pcbeingused333, thanks for filing this. We'll look into it.

  8. getsantry
    removed
    Waiting for: Product Owner
    on Oct 22, 2026
  9. getsantry
    moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Oct 22, 2026
  10. RulaKhaled
    closed this as completedin #25622on Oct 28, 2026
  11. Lms24
    added a commit that references this issue on Oct 28, 2026

    fix(server-utils): Keep OpenAI streamed tool calls that have no index (…

    This issue will close once commit be6a16f is merged into the 'develop' branch.
    be6a16f
  12. github-actions commented on Oct 28, 2026

    @github-actions
    github-actionsBot
    on Oct 28, 2026 – with GitHub Actions
    Contributor
    More actions

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #25622, which was included in the 11.10.0 release.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugNode.jsSpans

    Projects

    • GitHub Issues with 👀 3
      Status
      No status
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.