[GH-ISSUE #17058] issue: Response cannot be stopped after the tool is called #56823

Closed
opened 2026-05-05 20:08:32 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @EntropyYue on GitHub (Aug 30, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/17058

Check Existing Issues

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

Installation Method

Git Clone

Open WebUI Version

0.6.26

Ollama Version (if applicable)

No response

Operating System

Windows 10

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

The response should stop normally

Actual Behavior

Although the frontend response has stopped, the backend connection has not been closed

Steps to Reproduce

  1. Create Tool
  2. Switch to Native Tool Call
  3. Request Model to Call Tool
  4. Press the Stop Button Before the Model's Response Ends After Calling the Tool
  5. Observed that although the frontend has stopped outputting, the backend has shown an error of an unclosed session

Logs & Screenshots

2025-08-31 05:33:23.985 | WARNING | open_webui.utils.middleware:response_handler:2620 - Task was cancelled!
2025-08-31 05:33:23.998 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 127.0.0.1:63005 - "POST /api/tasks/stop/d2248229-dec7-44e9-87f8-8e73a36846dc HTTP/1.1" 200
2025-08-31 05:33:24.975 | ERROR | asyncio.base_events:default_exception_handler:1785 - Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x0000016702081850>
2025-08-31 05:33:24.976 | ERROR | asyncio.base_events:default_exception_handler:1785 - Unclosed connector
connections: ['deque([(<aiohttp.client_proto.ResponseHandler object at 0x0000016703F42CF0>, 391185.718)])']
connector: <aiohttp.connector.TCPConnector object at 0x0000016703E9BF10>

Additional Information

d6f709574e did not solve the problem

Originally created by @EntropyYue on GitHub (Aug 30, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/17058 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Git Clone ### Open WebUI Version 0.6.26 ### Ollama Version (if applicable) _No response_ ### Operating System Windows 10 ### 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 The response should stop normally ### Actual Behavior Although the frontend response has stopped, the backend connection has not been closed ### Steps to Reproduce 1. Create Tool 2. Switch to Native Tool Call 3. Request Model to Call Tool 4. Press the Stop Button Before the Model's Response Ends After Calling the Tool 5. Observed that although the frontend has stopped outputting, the backend has shown an error of an unclosed session ### Logs & Screenshots 2025-08-31 05:33:23.985 | WARNING | open_webui.utils.middleware:response_handler:2620 - Task was cancelled! 2025-08-31 05:33:23.998 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 127.0.0.1:63005 - "POST /api/tasks/stop/d2248229-dec7-44e9-87f8-8e73a36846dc HTTP/1.1" 200 2025-08-31 05:33:24.975 | ERROR | asyncio.base_events:default_exception_handler:1785 - Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x0000016702081850> 2025-08-31 05:33:24.976 | ERROR | asyncio.base_events:default_exception_handler:1785 - Unclosed connector connections: ['deque([(<aiohttp.client_proto.ResponseHandler object at 0x0000016703F42CF0>, 391185.718)])'] connector: <aiohttp.connector.TCPConnector object at 0x0000016703E9BF10> ### Additional Information https://github.com/open-webui/open-webui/commit/d6f709574e7809beea314424c295b1f38fcf3a9a did not solve the problem
GiteaMirror added the bugconfirmed issue labels 2026-05-05 20:08:33 -05:00
Author
Owner

@silentoplayz commented on GitHub (Dec 6, 2025):

I can confirm this issue, as I was able to reproduce it on my first attempt on the latest dev commit with the provided reproduction steps.

Here's the error reproduced from my logs:

2025-12-06 17:34:55.986 | WARNING  | open_webui.utils.middleware:response_handler:3228 - Task was cancelled!
2025-12-06 17:34:55.988 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 172.23.0.1:46540 - "POST /api/tasks/stop/3f31aea6-6b53-41fe-828f-e6ded9cc01f9 HTTP/1.1" 200
2025-12-06 17:34:59.803 | ERROR    | aiohttp.client:__del__:459 - Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x7bb6745b3610>
2025-12-06 17:34:59.803 | ERROR    | aiohttp.connector:__del__:388 - Unclosed connector
connections: ['deque([(<aiohttp.client_proto.ResponseHandler object at 0x7bb67424ba10>, 89007.931313384)])']
connector: <aiohttp.connector.TCPConnector object at 0x7bb67464dd10>
<!-- gh-comment-id:3621307638 --> @silentoplayz commented on GitHub (Dec 6, 2025): I can confirm this issue, as I was able to reproduce it on my first attempt on the latest `dev` commit with the provided reproduction steps. Here's the error reproduced from my logs: ```js 2025-12-06 17:34:55.986 | WARNING | open_webui.utils.middleware:response_handler:3228 - Task was cancelled! 2025-12-06 17:34:55.988 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 172.23.0.1:46540 - "POST /api/tasks/stop/3f31aea6-6b53-41fe-828f-e6ded9cc01f9 HTTP/1.1" 200 2025-12-06 17:34:59.803 | ERROR | aiohttp.client:__del__:459 - Unclosed client session client_session: <aiohttp.client.ClientSession object at 0x7bb6745b3610> 2025-12-06 17:34:59.803 | ERROR | aiohttp.connector:__del__:388 - Unclosed connector connections: ['deque([(<aiohttp.client_proto.ResponseHandler object at 0x7bb67424ba10>, 89007.931313384)])'] connector: <aiohttp.connector.TCPConnector object at 0x7bb67464dd10> ```
Author
Owner

@Classic298 commented on GitHub (Feb 12, 2026):

https://github.com/open-webui/open-webui/pull/20889

<!-- gh-comment-id:3889628186 --> @Classic298 commented on GitHub (Feb 12, 2026): https://github.com/open-webui/open-webui/pull/20889
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#56823