[GH-ISSUE #17111] issue: chat loads forever without user feedback on Exception in inlet filter #56834

Closed
opened 2026-05-05 20:09:13 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @destination-one on GitHub (Sep 1, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17111

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.26

Ollama Version (if applicable)

No response

Operating System

Ubuntu 24.04

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

When an exception in an inlet filter occurs, the error should be displayed like in i believe <=v0.6.22.

Actual Behavior

No error displayed, no visual feedback. The loading throbber/dot stays visible.
Error in Log: "Task exception was never retrieved"

Steps to Reproduce

have an inlet filter that throws an exception in some cases, simple example:

class Filter:
    async def inlet(self,body: dict) -> dict:
        raise Exception("something broke")

Logs & Screenshots

open-webui_1  | ... | ERROR    | open_webui.tasks:cleanup_task:88 - Task exception was never retrieved
open-webui_1  | future: <Task finished name='Task-46092' coro=<chat_completion.<locals>.process_chat() done, defined at /app/backend/open_webui/main.py:1495> exception=HTTPException(status_code=400, detail='something broke')>
open-webui_1  | Traceback (most recent call last):
open-webui_1  |
open-webui_1  |   File "/app/backend/open_webui/utils/middleware.py", line 880, in process_chat_payload
open-webui_1  |     form_data, flags = await process_filter_functions(
open-webui_1  |     │                        └ <function process_filter_functions at 0x7669d96e1b20>
open-webui_1  |     └ {'stream': True, 'model': '...', 'messages': [{'role': 'user', 'content': 'test'}], 'features': {'image_g...
open-webui_1  |
open-webui_1  |   File "/app/backend/open_webui/utils/filter.py", line 127, in process_filter_functions
open-webui_1  |     raise e
open-webui_1  |
open-webui_1  |   File "/app/backend/open_webui/utils/filter.py", line 121, in process_filter_functions
open-webui_1  |     form_data = await handler(**params)
open-webui_1  |                       │         └ {'body': {'stream': True, 'model': '...', 'messages': [{'role': 'user', 'content': 'test'}], 'features': ...
open-webui_1  |                       └ <bound method Filter.inlet of <....Filter object at 0x7669d49e0a10>>
open-webui_1  |
open-webui_1  |   File "<string>", line 193, in inlet
open-webui_1  |
open-webui_1  | Exception: something broke
open-webui_1  |
open-webui_1  |
open-webui_1  | During handling of the above exception, another exception occurred:
open-webui_1  |
open-webui_1  |
open-webui_1  | Traceback (most recent call last):
open-webui_1  |
open-webui_1  |   File "/app/backend/open_webui/main.py", line 1497, in process_chat
open-webui_1  |     form_data, metadata, events = await process_chat_payload(
open-webui_1  |     │          │                        └ <function process_chat_payload at 0x7669d5d56ac0>
open-webui_1  |     │          └ {'user_id': '...', 'chat_id': '...', 'message_id': '...
open-webui_1  |     └ {'stream': True, 'model': '...', 'messages': [{'role': 'user', 'content': 'test'}], 'features': {'image_g...
open-webui_1  |
open-webui_1  |   File "/app/backend/open_webui/utils/middleware.py", line 888, in process_chat_payload
open-webui_1  |     raise Exception(f"Error: {e}")
open-webui_1  |
open-webui_1  | Exception: Error: something broke
open-webui_1  |
open-webui_1  |
open-webui_1  | During handling of the above exception, another exception occurred:
open-webui_1  |
open-webui_1  |
open-webui_1  | Traceback (most recent call last):
open-webui_1  |
open-webui_1  | > File "/app/backend/open_webui/main.py", line 1541, in process_chat
open-webui_1  |     raise HTTPException(
open-webui_1  |           └ <class 'fastapi.exceptions.HTTPException'>
open-webui_1  |
open-webui_1  | fastapi.exceptions.HTTPException: 400: Error: something broke
open-webui_1  | ... | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - ...:0 - "POST /api/chat/completions HTTP/1.1" 200

Additional Information

Release notes of v0.6.26 say "Chat Error Feedback Restored", but I am using v0.6.26 and it is not fixed.
Similarly, there is issue https://github.com/open-webui/open-webui/issues/16974 but the patch there does not fix it.

As workaround, I disabled what I believe is "Asynchronous Chat Payload Processing" which was added in v0.6.23:

diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py
index d24bd5dcf..93d3e2e42 100644
--- a/backend/open_webui/main.py
+++ b/backend/open_webui/main.py
@@ -1547,6 +1547,7 @@ async def chat_completion(
         metadata.get("session_id")
         and metadata.get("chat_id")
         and metadata.get("message_id")
+        and False
     ):
         # Asynchronous Chat Processing
         task_id, _ = await create_task(

This makes the error message appear as expected, but is not a good solution.

Originally created by @destination-one on GitHub (Sep 1, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/17111 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.26 ### Ollama Version (if applicable) _No response_ ### Operating System Ubuntu 24.04 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior When an exception in an inlet filter occurs, the error should be displayed like in i believe <=v0.6.22. ### Actual Behavior No error displayed, no visual feedback. The loading throbber/dot stays visible. Error in Log: "Task exception was never retrieved" ### Steps to Reproduce have an inlet filter that throws an exception in some cases, simple example: ```python class Filter: async def inlet(self,body: dict) -> dict: raise Exception("something broke") ``` ### Logs & Screenshots ``` open-webui_1 | ... | ERROR | open_webui.tasks:cleanup_task:88 - Task exception was never retrieved open-webui_1 | future: <Task finished name='Task-46092' coro=<chat_completion.<locals>.process_chat() done, defined at /app/backend/open_webui/main.py:1495> exception=HTTPException(status_code=400, detail='something broke')> open-webui_1 | Traceback (most recent call last): open-webui_1 | open-webui_1 | File "/app/backend/open_webui/utils/middleware.py", line 880, in process_chat_payload open-webui_1 | form_data, flags = await process_filter_functions( open-webui_1 | │ └ <function process_filter_functions at 0x7669d96e1b20> open-webui_1 | └ {'stream': True, 'model': '...', 'messages': [{'role': 'user', 'content': 'test'}], 'features': {'image_g... open-webui_1 | open-webui_1 | File "/app/backend/open_webui/utils/filter.py", line 127, in process_filter_functions open-webui_1 | raise e open-webui_1 | open-webui_1 | File "/app/backend/open_webui/utils/filter.py", line 121, in process_filter_functions open-webui_1 | form_data = await handler(**params) open-webui_1 | │ └ {'body': {'stream': True, 'model': '...', 'messages': [{'role': 'user', 'content': 'test'}], 'features': ... open-webui_1 | └ <bound method Filter.inlet of <....Filter object at 0x7669d49e0a10>> open-webui_1 | open-webui_1 | File "<string>", line 193, in inlet open-webui_1 | open-webui_1 | Exception: something broke open-webui_1 | open-webui_1 | open-webui_1 | During handling of the above exception, another exception occurred: open-webui_1 | open-webui_1 | open-webui_1 | Traceback (most recent call last): open-webui_1 | open-webui_1 | File "/app/backend/open_webui/main.py", line 1497, in process_chat open-webui_1 | form_data, metadata, events = await process_chat_payload( open-webui_1 | │ │ └ <function process_chat_payload at 0x7669d5d56ac0> open-webui_1 | │ └ {'user_id': '...', 'chat_id': '...', 'message_id': '... open-webui_1 | └ {'stream': True, 'model': '...', 'messages': [{'role': 'user', 'content': 'test'}], 'features': {'image_g... open-webui_1 | open-webui_1 | File "/app/backend/open_webui/utils/middleware.py", line 888, in process_chat_payload open-webui_1 | raise Exception(f"Error: {e}") open-webui_1 | open-webui_1 | Exception: Error: something broke open-webui_1 | open-webui_1 | open-webui_1 | During handling of the above exception, another exception occurred: open-webui_1 | open-webui_1 | open-webui_1 | Traceback (most recent call last): open-webui_1 | open-webui_1 | > File "/app/backend/open_webui/main.py", line 1541, in process_chat open-webui_1 | raise HTTPException( open-webui_1 | └ <class 'fastapi.exceptions.HTTPException'> open-webui_1 | open-webui_1 | fastapi.exceptions.HTTPException: 400: Error: something broke open-webui_1 | ... | INFO | uvicorn.protocols.http.httptools_impl:send:476 - ...:0 - "POST /api/chat/completions HTTP/1.1" 200 ``` ### Additional Information Release notes of v0.6.26 say "Chat Error Feedback Restored", but I am using v0.6.26 and it is not fixed. Similarly, there is issue https://github.com/open-webui/open-webui/issues/16974 but the patch there does not fix it. As workaround, I disabled what I believe is "Asynchronous Chat Payload Processing" which was added in v0.6.23: ```patch diff --git a/backend/open_webui/main.py b/backend/open_webui/main.py index d24bd5dcf..93d3e2e42 100644 --- a/backend/open_webui/main.py +++ b/backend/open_webui/main.py @@ -1547,6 +1547,7 @@ async def chat_completion( metadata.get("session_id") and metadata.get("chat_id") and metadata.get("message_id") + and False ): # Asynchronous Chat Processing task_id, _ = await create_task( ``` This makes the error message appear as expected, but is not a good solution.
GiteaMirror added the bug label 2026-05-05 20:09:13 -05:00
Author
Owner

@tjbck commented on GitHub (Sep 1, 2025):

Should be addressed with f56889c5c7 in dev!

<!-- gh-comment-id:3241770791 --> @tjbck commented on GitHub (Sep 1, 2025): Should be addressed with f56889c5c7f0cf1a501c05d35dfa614e4f8b6958 in dev!
Author
Owner

@destination-one commented on GitHub (Sep 1, 2025):

Well, that was fast.
Since we're on main applied the patch, and it's fixed.
Thanks!

<!-- gh-comment-id:3241998839 --> @destination-one commented on GitHub (Sep 1, 2025): Well, that was fast. Since we're on main applied the patch, and it's fixed. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#56834