[PR #6524] [CLOSED] fix: Remove max_completion_tokens restriction in title generation handler #21901

Closed
opened 2026-04-20 03:47:31 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/6524
Author: @Ryan526
Created: 10/28/2024
Status: Closed

Base: devHead: main


📝 Commits (1)

  • 213dbae Fix: Remove max_completion_tokens restriction in title generation handler

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 backend/open_webui/main.py (+1 -1)

📄 Description

Changelog Entry

Description

  • This commit removes the "max_completion_tokens": 50 line in backend/open_webui/main.py at line 1574. The restriction was causing issues with o1 models, where reasoning tokens were consuming significantly more and preventing valid titles from being generated. By setting the value to pass (removing the cap), the token limit is no longer enforced, preventing models from hitting the token ceiling before completion. This fix is needed to allow title generation when using o1 models.

Changed

  • Updated line 1574 in backend/open_webui/main.py

Fixed


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/6524 **Author:** [@Ryan526](https://github.com/Ryan526) **Created:** 10/28/2024 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `main` --- ### 📝 Commits (1) - [`213dbae`](https://github.com/open-webui/open-webui/commit/213dbae060dace5adc6248b4fcf169b6d590d2de) Fix: Remove max_completion_tokens restriction in title generation handler ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/main.py` (+1 -1) </details> ### 📄 Description # Changelog Entry ### Description - This commit removes the `"max_completion_tokens": 50` line in `backend/open_webui/main.py` at line 1574. The restriction was causing issues with o1 models, where reasoning tokens were consuming significantly more and preventing valid titles from being generated. By setting the value to `pass` (removing the cap), the token limit is no longer enforced, preventing models from hitting the token ceiling before completion. This fix is needed to allow title generation when using o1 models. ### Changed - Updated line 1574 in backend/open_webui/main.py ### Fixed - #5729 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-20 03:47:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#21901