[PR #24687] [CLOSED] fix: fallback to first available model when model_id is missing or empty #131447

Closed
opened 2026-05-21 16:58:43 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/24687
Author: @yahyasaqban-lab
Created: 5/13/2026
Status: Closed

Base: devHead: fix/clean-title-fix


📝 Commits (1)

  • 471a68a fix: fallback to first available model when model_id is missing or empty

📊 Changes

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

View changed files

📝 backend/open_webui/routers/tasks.py (+84 -56)

📄 Description

Before submitting, make sure you have checked the following:

  • Linked Issue/Discussion: Closes [PR #17932] [CLOSED] Update Base (#24604)
  • Target branch: The pull request targets the dev branch.
  • Description: A concise description of the changes is provided below.
  • Git Hygiene: The PR is atomic (one logical change), rebased on dev, and contains no unrelated commits.
  • Title Prefix: fix

Description

When the frontend sends an empty or missing model_id (e.g., when clicking the title regenerate icon on a chat with no model assigned), the backend now gracefully falls back to the first available model instead of returning a 404 MODEL_NOT_FOUND error. This fix is applied consistently across all 7 task endpoints in tasks.py.

Fixed

  • Auto-title generation no longer errors on chats without a model assigned
  • Graceful fallback to first available model when model_id is empty or not found
  • Consistent fix across all task endpoints (title, follow-up, query, image_prompt, emoji, tags, MOA)

Contributor License Agreement


🔄 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/24687 **Author:** [@yahyasaqban-lab](https://github.com/yahyasaqban-lab) **Created:** 5/13/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix/clean-title-fix` --- ### 📝 Commits (1) - [`471a68a`](https://github.com/open-webui/open-webui/commit/471a68a18637e31eb08e040654c791cdeb60ca89) fix: fallback to first available model when model_id is missing or empty ### 📊 Changes **1 file changed** (+84 additions, -56 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/routers/tasks.py` (+84 -56) </details> ### 📄 Description **Before submitting, make sure you have checked the following:** - [x] **Linked Issue/Discussion:** Closes #24604 - [x] **Target branch:** The pull request targets the `dev` branch. - [x] **Description:** A concise description of the changes is provided below. - [x] **Git Hygiene:** The PR is atomic (one logical change), rebased on `dev`, and contains no unrelated commits. - [x] **Title Prefix:** fix ### Description When the frontend sends an empty or missing model_id (e.g., when clicking the title regenerate icon on a chat with no model assigned), the backend now gracefully falls back to the first available model instead of returning a 404 MODEL_NOT_FOUND error. This fix is applied consistently across all 7 task endpoints in tasks.py. ### Fixed - Auto-title generation no longer errors on chats without a model assigned - Graceful fallback to first available model when model_id is empty or not found - Consistent fix across all task endpoints (title, follow-up, query, image_prompt, emoji, tags, MOA) ### Contributor License Agreement - [x] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <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-05-21 16:58:43 -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#131447