Skip to content

AzureOpenAI do not pass down the retry counter on HTTP errors #1277

Closed
@sirtow

Description

@sirtow

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

The x-stainless-retry-count header, sent with OpenAI http request, always have 0 value.

As per stainless docs :
"Which retry number the request is for, such as 0 for the first request, 1 for the first retry, 2 for the second retry, and so on."

Upon expecting the code, the APIClient.buildRequest accepts the retry counter but AzureOpenAI.buildRequest doesn't accept retry parameter nor pass it down to APIClient.buildRequest

To Reproduce

Take any example and add arbitrary low timeout . Set retry number to 10.
Inspect outgoing requests and headers.
The value of x-stainless-retry-count header remains 0

Code snippets

OS

macOS

Node version

Node 22

Library version

4.79.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions