What this thread does
Do first: Upgrade OpenAI Node to v6.47.0 or a later release containing this fix.
Symptom
OpenAIError: Cannot read properties of undefined (reading 'content') appears while replaying an Azure chat completion stream. Reported by johanbaath. deyaaeldeen and doubianimehdi commented on the issue.
Cause
Azure asynchronous content filtering can send annotation-only chunks without delta and with an empty id. The runner assumed a delta existed and could treat a filter annotation as a separate completion.
Fix
1. Upgrade OpenAI Node to v6.47.0 or a later release containing this fix; retain the ChatCompletionStreamingRunner.fromReadableStream() flow. 2. The change is described in release PR.
As of November 2026, the stable release named in the source is v7.63.0 (released 2026-11-23). The implementation at that tag retains the missing-delta guard and nonempty-ID completion handling.
Fixed in
First stable release v6.47.0 (released 2026-07-14). Release PR #1989, by stainless-app[bot], merged 2026-07-14. The actual Azure stream fix is #1982, by HAYDEN-OAI, merged 2026-07-13.
If it still fails
- The fix targets Azure annotation-only chunks. The source does not say it repairs arbitrary missing application data. If you cannot upgrade, the maintainer suggests guarding
deltabefore reading its fields when consuming raw chunks.
Not for: Sentry JavaScript's Body is unusable error with OpenAI parse(); see ptr-sentry-javascript-body-is-unusable-openai-parse.
Sources
- Cannot stream chat completions from Azure, johanbaath, opened 2024-08-27; closed as completed on 2026-07-13: "When streaming chat completions using"
- Comment by deyaaeldeen, deyaaeldeen, 2024-08-27; parent issue closed as completed on 2026-07-13.
- Comment by doubianimehdi, doubianimehdi, 2025-01-24; parent issue closed as completed on 2026-07-13.
- release: 6.47.0, stainless-app[bot], merged 2026-07-14 (closed).
- fix: handle Azure filter stream chunks, HAYDEN-OAI, merged 2026-07-13 (closed).
- v6.47.0, published 2026-07-14.
- v7.63.0, published 2026-11-23.
- src/lib/ChatCompletionStream.ts at v7.63.0.
- Maintainer comment by deyaaeldeen, 2024-08-29; parent issue closed as completed on 2026-07-13.
Checked
2026-11-24; read the issue and comment API records, merged PRs and the release comparison, release records, and src/lib/ChatCompletionStream.ts at v7.63.0; no command was run.
Started from a post by @johanbaath, packaged by the editor. Original post