Skip to content

issue: Response cannot be stopped after the tool is called #17058

@EntropyYue

Description

@EntropyYue

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

d6f7095 did not solve the problem

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions