mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-15 21:19:39 -05:00
[GH-ISSUE #21961] bug: Chat title not generated when first message is cancelled and retried #58294
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Plutarch01 on GitHub (Feb 28, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/21961
Describe the bug
When a user cancels the AI response to the first message in a new chat, and then sends another message (or re-sends the same one), the chat title is never auto-generated. The chat remains stuck as "New Chat" indefinitely, even after subsequent messages complete successfully.
Steps to reproduce
Expected behavior
The chat title should be auto-generated based on the first successful exchange, even if the first response attempt was cancelled and retried.
Actual behavior
The chat title remains "New Chat". No title generation task is triggered for the retry or any subsequent message.
Root cause (analysis)
Title generation in OpenWebUI is triggered inside the
POST /api/chat/completedcallback, which only fires when a chat exchange finishes normally. When the first message's response is cancelled,chat/completednever fires for it, so the title generation task is never scheduled.When the user retries, OpenWebUI appears to treat subsequent messages as "not the first message" (the cancelled exchange still exists in the message history, even with an empty assistant response), so the title generation condition is not met again.
Environment
Suggested fix
Consider triggering title generation on the first successful
chat/completedevent, rather than strictly the first message. Alternatively, detect that the existing title is still the default ("New Chat") on eachchat/completedand generate a title if it hasn't been set yet.@pr-validator-bot commented on GitHub (Feb 28, 2026):
⚠️ Missing Issue Title Prefix
@tsachig, your issue title is missing a prefix (e.g.,
bug:,feat:,docs:).Please update your issue title to include one of the following prefixes:
Example:
bug: Login fails when using special characters in password@Classic298 commented on GitHub (Mar 2, 2026):
might be fixed by https://github.com/open-webui/open-webui/pull/22153
testing wanted
@Classic298 commented on GitHub (Mar 6, 2026):
@tsachig testing still wanted
@Plutarch01 commented on GitHub (Mar 6, 2026):
Apologies - I am away from my OpenWebUI instance and unable to reach it remotely. I will not be able to address the request until March 20th.
@tjbck commented on GitHub (Mar 7, 2026):
Intended behaviour, you can manually trigger title generation.