Closed spaceemotion closed 1 month ago
For readers looking for a workaround while this issue is open:
Setting "x-stainless-retry-count": null
individually, in each request, works. For example:
const openai = new OpenAI(/* ...client config... */);
const modelsList = await openai.models.list({
headers: {
"x-stainless-retry-count": null,
},
});
const completion = await openai.chat.completions.create(
{
/* ...completion config... */
},
{
headers: {
"x-stainless-retry-count": null,
},
},
);
Thanks for the report, this should be fixed in v4.68.1
!
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
The recent addition of the
x-stainless-retry-count
header (https://github.com/openai/openai-node/commit/33e5e9b88f2cdb2ae90e355b394cb8c79f5e22a8) uses the localheaders
object, which does not include the default headers:https://github.com/openai/openai-node/blob/785ef4b579637d3a6a205c0a9c51aa71987bf30e/src/core.ts#L391
To Reproduce
'x-stainless-retry-count': null
Code snippets
No response
OS
Windows
Node version
Node v20
Library version
openai 4.67.1