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:
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: