mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-15 21:19:39 -05:00
[PR #9088] [CLOSED] **feat** Support CoT models for title generation. #45363
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/9088
Author: @joshuawu
Created: 1/29/2025
Status: ❌ Closed
Base:
dev← Head:title-generation-cot📝 Commits (1)
666398fSupport CoT models for title generation.📊 Changes
6 files changed (+62 additions, -24 deletions)
View changed files
📝
backend/open_webui/config.py(+6 -0)📝
backend/open_webui/main.py(+2 -0)📝
backend/open_webui/models/chats.py(+3 -1)📝
backend/open_webui/routers/tasks.py(+14 -7)📝
backend/open_webui/utils/middleware.py(+29 -16)📝
src/lib/components/admin/Settings/Interface.svelte(+8 -0)📄 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
Added
Changed
max_tokens/max_completion_tokenswhile adding the new behaviorDeprecated
Removed
Fixed
<think>...Security
Breaking Changes
Additional Information
Currently, running chain-of-thought (CoT) models will generate unhelpful titles in the sidebar unless a different model is selected for title generation in the interface settings. For example:

This PR lets CoT models generate helpful titles by 1) adding a default behavior to fall back to the original assistant message if a CoT is detected and 2) through a new setting, letting a CoT model fully generate a message before extracting just the generated title.
Screenshots or Videos
Example new default behavior running a CoT model:
New interface setting "Title generation model uses chain of thought"
After enabling the setting:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.