open-webui/backend/open_webui
Classic298 3d6598fccb
fix: steer models to replace_range in the replace_note_content tool description (#30048)
Asked to add a section or change a few lines, models answer with a whole-note
replace_note_content call and the rest of the note is gone, with nothing to
undo because the editor only records versions on chat inserts. The tool
already supports replace_range operations with an expected guard, but its
description never said when to use them or how the offsets work, so models
defaulted to sending the whole note back.

The docstring, which is the description every model receives for this tool
in note chats and normal chats alike, now states the preference for range
edits and the offset, overlap and expected rules the handler enforces.
Verified the text lands in the generated tool spec unchanged and that range
edits, the expected mismatch rejection and whole-note replace behave as
described against a sqlite data dir.
2026-09-15 22:51:49 -04:00
..
data refac: mv backend files to /open_webui dir 2024-09-04 16:54:48 +02:00
internal refac 2026-09-06 17:13:32 -04:00
migrations chore: format 2026-08-25 16:53:53 -04:00
models refac 2026-09-15 22:47:03 -04:00
retrieval fix: sync Playwright loader spins a CPU core when a page opens a WebSocket (#30050) 2026-09-15 22:51:37 -04:00
routers refac 2026-09-15 22:47:03 -04:00
socket fix: keep a failed lock release from masking cancellation (#29979) 2026-09-13 20:37:51 -05:00
static refac 2026-09-06 17:27:30 -04:00
storage refac 2026-09-06 17:13:32 -04:00
tools fix: steer models to replace_range in the replace_note_content tool description (#30048) 2026-09-15 22:51:49 -04:00
utils refac 2026-09-15 22:47:03 -04:00
__init__.py perf: allow disabling websocket per-message-deflate (#28613) 2026-08-24 18:46:07 -04:00
alembic.ini fix: Alembic CLI commands from failing 2025-08-15 04:17:47 -04:00
config.py refac 2026-09-08 23:18:48 -04:00
constants.py refac 2026-08-29 16:14:32 -04:00
env.py refac 2026-09-14 15:46:23 -04:00
events.py refac 2026-08-16 23:21:00 -07:00
functions.py fix: honor bypass_system_prompt on the pipe route (#28739) 2026-08-19 11:08:02 -07:00
main.py refac 2026-09-06 19:36:17 -04:00
tasks.py fix: stop tracking tasks under an empty item id (#29980) 2026-09-13 20:28:54 -05:00