mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-15 21:19:39 -05:00
[PR #19039] [CLOSED] fix+feat: NOTES: Fix broken message submission to completions endpoint AND improve edit feature #11869
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/19039
Author: @Classic298
Created: 11/8/2025
Status: ❌ Closed
Base:
dev← Head:fix+feat-note-chat-editor📝 Commits (3)
7ee9b00Implement message cleaning before API callc149dcfUpdate Chat.svelte9ececd9Fix duplicate content and data declaration in submitHandler📊 Changes
1 file changed (+20 additions, -1 deletions)
View changed files
📝
src/lib/components/notes/NoteEditor/Chat.svelte(+20 -1)📄 Description
Before submitting, make sure you've checked the following:
devbranch. Not targeting thedevbranch will lead to immediate closure of the PR.Changelog Entry
Description
This PR fixes a bug in the Notes Chat feature that caused 400 Bad Request errors when sending messages to AI models. The issue was caused by internal UI state fields being incorrectly included in API requests. Additionally, implements a safety check to prevent accidental full-note rewrites when edit mode is enabled without text selection.
Root Cause:* The Notes Chat feature was creating placeholder assistant messages with internal UI state fields (
done: false) for streaming response management. These messages were being sent directly to the API without sanitization, violating the OpenAI message format specification.Solution: Implemented a message cleaning pipeline that:
UX Improvement: Added edit mode validation to prevent confusion where users enable edit mode without selecting text, which would result in the AI rewriting the entire note. Users must now either:
Added
Changed
Video
Screencast_20251108_145845.webm
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.