mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[PR #21810] [CLOSED] fix: preserve assistant pre-fill for Continue Response #65143
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?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/21810
Author: @andrewmm511
Created: 2/24/2026
Status: ❌ Closed
Base:
dev← Head:fix/continue-response-prefill📝 Commits (1)
17601bdfix: preserve assistant pre-fill when loading messages from DB📊 Changes
1 file changed (+13 additions, -1 deletions)
View changed files
📝
backend/open_webui/utils/middleware.py(+13 -1)📄 Description
Pull Request Checklist
devbranch.dev.fix:Changelog Entry
Description
Since v0.8.0, the "Continue Response" feature no longer works. Models that support pre-fill respond as if answering the user's question fresh instead of continuing from existing content. Editing an assistant message and clicking Continue also fails to use the edited content.
The root cause is
load_messages_from_db(introduced inf2aca781c), which replaces frontend-sent messages with DB-loaded messages. It loads the message chain up toparent_message_id(the user message), which excludes the trailing assistant message the frontend includes as a pre-fill for continuation. The LLM therefore receives no assistant pre-fill and generates a fresh response.Fixed
load_messages_from_dbreplaces frontend messages, so "Continue Response" correctly provides existing content to the model for continuation.Additional Information
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.