Files
open-webui/backend/open_webui/utils
Classic298 ee25b7d42d fix: cancelled responses no longer keep rendering as still running (#29495)
Pressing stop saved the assistant message as finished while its output items were still marked as running, so the affected block kept showing "Thinking...", "Analyzing..." or "Executing...". That state was written to the database, so it came back after every reload. A tool call cancelled mid-execution was affected as well: it is marked completed as soon as its arguments finish streaming, well before the tool returns, and the client reads that as still executing until the result item arrives.

Cancelling now closes those items before the message is saved, marking them incomplete, which is the status the client already treats as finished without flagging an error. Tool calls waiting for approval are left untouched so their approval prompt survives a reload. The corrected output is sent on the chat:tasks:cancel event that was already being emitted, so an open tab settles immediately instead of only after a reload.

Emitting a chat:completion event instead would have fired response auto-copy, text to speech playback and the chat finished listeners on a response the user had just cancelled.

Verified on a running instance against a mock upstream: cancelling mid-response leaves no item marked as running in the saved message, and the identical run on unpatched code leaves one.

Fixes #29281
2026-09-12 17:57:58 -05:00
..
2026-09-07 12:40:44 -04:00
2026-09-12 14:57:22 -04:00
2026-08-24 18:29:36 -04:00
2026-09-12 18:57:18 -04:00
2026-09-12 16:56:26 -04:00
2026-08-29 16:14:32 -04:00
2026-03-17 17:58:01 -05:00
2026-07-23 02:54:56 -04:00
2026-07-26 21:12:14 -04:00
2026-07-31 17:41:14 -04:00
2026-08-23 13:36:53 -04:00
2026-08-31 00:11:13 -04:00
2026-08-31 01:29:36 -04:00
2026-09-12 15:41:57 -04:00
2026-08-10 19:28:21 -06:00
2026-08-31 00:39:16 -04:00
2026-07-26 23:09:22 -04:00
2026-09-07 12:40:44 -04:00
2026-09-08 12:38:07 -04:00
2026-08-16 22:56:19 -07:00
2026-08-17 00:57:57 -07:00
2026-03-17 17:58:01 -05:00
2026-08-24 18:29:36 -04:00
2026-08-25 16:53:53 -04:00
2026-06-19 00:16:06 +02:00
2026-08-19 22:48:32 -07:00
2026-08-25 16:53:53 -04:00
2026-09-07 12:16:09 -04:00
2026-07-27 19:39:36 -04:00
2026-07-31 17:41:14 -04:00