431 Error in GPT4o

Gaurav Kumar 45 Reputation points
2024-08-09T08:57:40.78+00:00

Hi

While sending an image url as body for GPT4o, I am getting "431 Request header Filed Too Large". The same request with same image url works in gpt4 turbo. I am not able to find the exact cause for this. What could be the reason behind this difference? If the content was large, it should have not worked in gpt4 turbo as well.

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,916 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 32,946 Reputation points
    2024-09-03T12:36:02.8566667+00:00

    Gaurav Kumar I'm glad that your issue is resolved and thank you for posting your solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that the question author cannot accept their own answer, they can only accept answers by others, I'll repost your solution in case you'd like to Accept the answer.

    Error Message:

    While sending an image url as body for GPT4o, I am getting "431 Request header Filed Too Large". The same request with same image url works in gpt4 turbo. I am not able to find the exact cause for this. What could be the reason behind this difference? If the content was large, it should have not worked in gpt4 turbo as well.

    Solution:

    I did some more troubleshoot and found this error was due to some additional headers being send by the code sdk/postman which led to surpassing the maximum number of allowed headers. We updated our proxy code to allow only the mandatory headers which resolved the issue.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.