Skip to content

Open AI chat completion API "Retry-After" header is not exposed to the browser #24904

Open

Description

Hi, I'm trying to use stay within the tokens per minute limited enforced by the Open AI Chat Completion API.

When server responded with 429 error, I'm expecting the Retry-After field in the header exposed to the browser so the caller can retry after the server suggested period of time. The documentation here specially calls for such retry strategy

General best practices to remain within rate limits

To minimize issues related to rate limits, it's a good idea to use the following techniques:

  • Implement retry logic in your application.
  • ...

The problem is that the response header is set such that the Retry-After header field is hidden from the browser. See screenshot below:

image

This makes it difficult for the client to set the right timeout. Please consider adding Retry-After to the Access-Control-Expose-Headers field.

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Service AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions