Request Header Fields Too Large

We are encountering an error while using our GPT instance hosted on Azure. We have set up our application to send prompts along with files encoded in base64. However, when we integrate Azure API Management to manage load balancing, we receive the following error: “Request Header Fields Too Large.” Interestingly, when we bypass the load balancer and directly interact with the GPT instance, the error does not occur.

Details:

  • Error occurs when sending a base64 encoded file with the prompt to our GPT instance through Azure API Management.
  • Without using the load balancer, the system functions as expected.
  • We suspect the header size exceeds what Azure API Management allows.

Could anyone suggest a workaround or a solution to handle large header sizes with Azure API Management? Any guidance or references to relevant documentation would be greatly appreciated.