[GH-ISSUE #3273] enh: "413 Request Entity Too Large" not handled well, response HTML treated as JSON #100198

Closed
opened 2026-05-17 22:07:54 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @darkvertex on GitHub (Jun 18, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/3273

Bug Report

Description

Bug Summary:
The OpenAI /completions proxy endpoint is responding with HTTP status code 413 Request Entity Too Large:

<html>
<head><title>413 Request Entity Too Large</title></head>
<body>
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx/1.26.1</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

Steps to Reproduce:
Have a conversation in Call mode using the webcam feed and do a few pictures. After ~5-10 it should complain.

Expected Behavior:
I'd expect the UI to render a more correct error and maybe offer to continue without the full conversation context.

Actual Behavior:

It tries to interpret the raw HTML:
image

Environment

  • Open WebUI Version: v0.3.5

  • Ollama (if applicable): 0.1.44

  • Operating System: Windows 11

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.

Logs and Screenshots

Browser Console Logs:

  
        Failed to load resource: the server responded with a status of 413 ()
Chat.svelte:1099  SyntaxError: Unexpected token '<', "<html>
<h"... is not valid JSON
P @ Chat.svelte:1099
CallOverlay.svelte:506 Audio monitoring and playing stopped for message ID ea7f53d0-b8df-40c1-8102-202536b2ecc0
02fc276d-ae2a-45cd-9249-410da7b04522:1  [Deprecation] -ms-high-contrast-adjust is in the process of being deprecated. Please see https://blogs.windows.com/msedgedev/2020/09/17/styling-for-windows-high-contrast-with-new-standards-for-forced-colors/ for tips on updating to the new Forced Colors Mode standard.
onloadwff.js:71  Assertion failed: Input argument is not an HTMLInputElement
getFormProfile @ onloadwff.js:71
setFieldValue @ onloadwff.js:71
formKeydownListener @ onloadwff.js:71
Show 3 more frames
Show less
Chat.svelte:314 submitPrompt 02fc276d-ae2a-45cd-9249-410da7b04522
Chat.svelte:453 modelId gpt-4o
CallOverlay.svelte:518 Received chat start event for message ID ecb09279-d455-49d7-bbe2-bec818f082a6
/openai/chat/completions:1 
        
        
        Failed to load resource: the server responded with a status of 413 ()
Chat.svelte:1099  SyntaxError: Unexpected token '<', "<html>
<h"... is not valid JSON
P @ Chat.svelte:1099
st @ Chat.svelte:1051
CallOverlay.svelte:506 Audio monitoring and playing stopped for message ID da1475a2-f57f-48bf-8ef7-86bfa1941bc7
Audio.svelte:85 Object
Originally created by @darkvertex on GitHub (Jun 18, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/3273 # Bug Report ## Description **Bug Summary:** The OpenAI /completions proxy endpoint is responding with HTTP status code `413 Request Entity Too Large`: ```html <html> <head><title>413 Request Entity Too Large</title></head> <body> <center><h1>413 Request Entity Too Large</h1></center> <hr><center>nginx/1.26.1</center> </body> </html> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> ``` **Steps to Reproduce:** Have a conversation in Call mode using the webcam feed and do a few pictures. After ~5-10 it should complain. **Expected Behavior:** I'd expect the UI to render a more correct error and maybe offer to continue without the full conversation context. **Actual Behavior:** It tries to interpret the raw HTML: <img width="383" alt="image" src="https://github.com/open-webui/open-webui/assets/941331/df12d096-d8ef-430f-990b-499b646e88e7"> ## Environment - **Open WebUI Version:** v0.3.5 - **Ollama (if applicable):** 0.1.44 - **Operating System:** Windows 11 **Confirmation:** - [X] I have read and followed all the instructions provided in the README.md. - [X] I am on the latest version of both Open WebUI and Ollama. - [X] I have included the browser console logs. - [ ] I have included the Docker container logs. ## Logs and Screenshots **Browser Console Logs:** ``` Failed to load resource: the server responded with a status of 413 () Chat.svelte:1099 SyntaxError: Unexpected token '<', "<html> <h"... is not valid JSON P @ Chat.svelte:1099 CallOverlay.svelte:506 Audio monitoring and playing stopped for message ID ea7f53d0-b8df-40c1-8102-202536b2ecc0 02fc276d-ae2a-45cd-9249-410da7b04522:1 [Deprecation] -ms-high-contrast-adjust is in the process of being deprecated. Please see https://blogs.windows.com/msedgedev/2020/09/17/styling-for-windows-high-contrast-with-new-standards-for-forced-colors/ for tips on updating to the new Forced Colors Mode standard. onloadwff.js:71 Assertion failed: Input argument is not an HTMLInputElement getFormProfile @ onloadwff.js:71 setFieldValue @ onloadwff.js:71 formKeydownListener @ onloadwff.js:71 Show 3 more frames Show less Chat.svelte:314 submitPrompt 02fc276d-ae2a-45cd-9249-410da7b04522 Chat.svelte:453 modelId gpt-4o CallOverlay.svelte:518 Received chat start event for message ID ecb09279-d455-49d7-bbe2-bec818f082a6 /openai/chat/completions:1 Failed to load resource: the server responded with a status of 413 () Chat.svelte:1099 SyntaxError: Unexpected token '<', "<html> <h"... is not valid JSON P @ Chat.svelte:1099 st @ Chat.svelte:1051 CallOverlay.svelte:506 Audio monitoring and playing stopped for message ID da1475a2-f57f-48bf-8ef7-86bfa1941bc7 Audio.svelte:85 Object ```
Author
Owner

@FelixHuoEZ commented on GitHub (Jun 21, 2024):

same issue +1

<!-- gh-comment-id:2182365403 --> @FelixHuoEZ commented on GitHub (Jun 21, 2024): same issue +1
Author
Owner

@krinlove99 commented on GitHub (Jun 23, 2024):

same question ,Included in long conversations😂

<!-- gh-comment-id:2184677885 --> @krinlove99 commented on GitHub (Jun 23, 2024): same question ,Included in long conversations😂
Author
Owner

@wxjttxs commented on GitHub (Jul 12, 2024):

same question when upload a image using my own model

<!-- gh-comment-id:2224234537 --> @wxjttxs commented on GitHub (Jul 12, 2024): same question when upload a image using my own model
Author
Owner

@jonathangoorin commented on GitHub (Oct 22, 2024):

same issue, tried to change the context length to no use.
It happens every time, when there is very long messages.

<!-- gh-comment-id:2428568961 --> @jonathangoorin commented on GitHub (Oct 22, 2024): same issue, tried to change the context length to no use. It happens every time, when there is very long messages.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#100198