Azure OpenAI (Microsoft Foundry) error
Azure OpenAI 431 (too many custom headers): what it means and how to fix it
431 (too many custom headers)Retry? Not statedLast verified 1 documented fix1 source
What it means
Current APIs allow up to 10 custom headers, which are passed through the pipeline and returned. Requests that exceed this header count result in HTTP 431 errors.
Causes
- More than 10 custom headers in an API request
How to fix it
- Fix 1.
Reduce header volume; Microsoft states there is no other solution and recommends not depending on custom headers.
More Azure OpenAI errors
All 15 Azure OpenAI errors400 Bad RequestRetry? Not stated400 content_filterRetry? Not stated200 finish_reason: content_filterRetry? Not stated200 content_filter_error (The contents are not filtered)Retry? Not stated401 UnauthorizedRetry? Not stated403 Forbidden (network access denied)Retry? Not stated403 Forbidden (resource has been temporarily blocked)Retry? Not stated404 Not FoundRetry? Not stated
FAQ
What does the Azure OpenAI error "431 (too many custom headers)" mean?
Current APIs allow up to 10 custom headers, which are passed through the pipeline and returned. Requests that exceed this header count result in HTTP 431 errors.
How do I fix Azure OpenAI "431 (too many custom headers)"?
Reduce header volume; Microsoft states there is no other solution and recommends not depending on custom headers.
Should I retry Azure OpenAI "431 (too many custom headers)"?
Not stated. The official docs do not say whether this error is retryable.
Sources
Last verified against 1 source: Azure OpenAI's official docs and official SDK repositories.
- learn.microsoft.comhttps://learn.microsoft.com/en-us/azure/foundry/openai/quotas-limits
Newsletter
Know when the APIs change
One email per week. New model releases, API changes, what broke, and how developers are working around it.