mirror of
https://github.com/open-webui/open-webui.git
synced 2026-08-11 05:35:33 -05:00
[PR #23013] [CLOSED] fix: rewire orphan tool messages to preserve conversation context #130640
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/23013
Author: @Classic298
Created: 3/25/2026
Status: ❌ Closed
Base:
dev← Head:tool-call📝 Commits (6)
11c56f0fix: orphaned tool msg7ae05b5fix: rewire orphan tool messages instead of dropping them1b507aefix: rewire orphan tool messages with real tool names0650ebcfix: log and handle streaming provider error responses36f2b5bfix: surface provider errors that were silently swallowed4c1ac90fix: log provider errors from response body (non-exception path)📊 Changes
4 files changed (+167 additions, -9 deletions)
View changed files
📝
backend/open_webui/main.py(+2 -2)📝
backend/open_webui/routers/openai.py(+10 -0)📝
backend/open_webui/utils/middleware.py(+23 -3)📝
backend/open_webui/utils/misc.py(+132 -4)📄 Description
Summary
tool_resultmessages without a matchingtool_use(e.g. partial history, retries, edited chains), strict providers like Anthropic/Vertex reject the payload with HTTP 400tool_callinto the preceding assistant message so the sequence stays validconvert_output_to_messages) and the final message sanitization pass (rewire_orphan_tool_messages)Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.