-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed as not planned
Labels
bugSomething isn't workingSomething isn't working
Description
Confirm this is a Node library issue and not an underlying OpenAI API issue
- This is an issue with the Node library
Describe the bug
When using OpenAI client to stream completions, the process fails to shutdown gracefully.
To Reproduce
Stream and attempt to gracefully shutdown.
Active handles show instances of agentkeepalive, which is coming from OpenAI SDK.
{
resource: {
_parent: '[Object: TCP]',
_parentWrap: null,
_secureContext: '[Object: SecureContext]',
onerror: '[Function: onerror]',
onhandshakedone: '[Function: ]',
onhandshakestart: '[Function: noop]',
onkeylog: '[Function: onkeylog]',
onnewsession: '[Function: onnewsessionclient]',
onocspresponse: '[Function: onocspresponse]',
reading: true
},
stacks: [
'node:internal/async_hooks:202:43 [emitInitNative]',
'node:_tls_wrap:699:24 [TLSSocket._wrapHandle]',
'node:_tls_wrap:570:18 [TLSSocket]',
'node:_tls_wrap:1766:19 [connect]',
'node:https:173:22 [createConnection]',
'/Users/frank/Developer/glama/node_modules/.pnpm/agentkeepalive@4.6.0/node_modules/agentkeepalive/lib/https_agent.js:29:49 [createConnection]',
'node:_http_agent:324:26 [createSocket]',
'node:_http_agent:276:10 [addRequest]',
'node:_http_client:347:16 [ClientRequest]'
],
type: 'TLSWRAP'
},
Code snippets
OS
macOS
Node version
22
Library version
4.83.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working