mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[PR #13078] [CLOSED] fix ollama reasoning #61947
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/13078
Author: @sylac
Created: 4/20/2025
Status: ❌ Closed
Base:
dev← Head:feature/fix-reasoning-blocks-for-ollama📝 Commits (1)
0716617fix ollama reasoning📊 Changes
1 file changed (+54 additions, -22 deletions)
View changed files
📝
backend/open_webui/utils/middleware.py(+54 -22)📄 Description
Pull Request Checklist
Note to first-time contributors: Please open a discussion post in Discussions and describe your changes before submitting a pull request.
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
This change updates the
tag_content_handlerto correctly detect and escape literal closing tags like</think>. Previously the parser treated</think>as part of the reasoning block, causing all subsequent assistant output to be swallowed inside the “thinking” section. Now the closing tag is recognized and content after it is rendered normally.Key Changes
Changed
Fixed
Breaking Changes
Screenshots or Videos
Wrong escaped block screenshots:
After refactor
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the CONTRIBUTOR_LICENSE_AGREEMENT, 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.