Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
On a long-running request, I see:
Unhandled response stream event: {"type":"keepalive","sequence_number":466}
I don't think OpenAI ever documented keepalive events but they definitely exist.
To Reproduce
- Send a request that will take a long time to the Responses API, such as using gpt-5.5-pro on xhigh or something. Must be a streaming request. Disable reasoning summaries to increase chance of repro.
- Wait
- SDK emits an error as soon as a
keepalive event is emitted because there's no case for it.
|
function assertNever(value: never): never { |
|
throw new OpenAIError(`Unhandled response stream event: ${JSON.stringify(value)}`); |
|
} |
Code snippets
OS
Windows
Node version
Node v24.14.0
Library version
openai v6.45.0
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
On a long-running request, I see:
I don't think OpenAI ever documented keepalive events but they definitely exist.
To Reproduce
keepaliveevent is emitted because there's no case for it.openai-node/src/lib/responses/ResponseAccumulator.ts
Lines 410 to 412 in 71d2347
Code snippets
OS
Windows
Node version
Node v24.14.0
Library version
openai v6.45.0