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

Closed
opened 2026-05-18 16:02:24 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/24686
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

Summary

Fixes auto-title generation when the frontend sends an empty or missing model_id. Instead of returning a 404 error, the backend gracefully falls back to the first available model.

Changes

Applied to all task endpoints in tasks.py:

  • If model_id is empty or missing and there are no models, still return 404
  • If model_id is not found but models exist, fall back to the first available model

Closes #24604

CLA

I agree that my contributions to Open WebUI are licensed under the MIT License.
By submitting this pull request, I confirm that:

  • I have read and agree to the Contributor License Agreement
  • This contribution is my own original work
  • I have the right to submit it under the MIT License

🔄 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/24686 **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 ## Summary Fixes auto-title generation when the frontend sends an empty or missing model_id. Instead of returning a 404 error, the backend gracefully falls back to the first available model. ## Changes Applied to all task endpoints in `tasks.py`: - If `model_id` is empty or missing and there are no models, still return 404 - If `model_id` is not found but models exist, fall back to the first available model Closes #24604 ## CLA I agree that my contributions to Open WebUI are licensed under the MIT License. By submitting this pull request, I confirm that: - I have read and agree to the Contributor License Agreement - This contribution is my own original work - I have the right to submit it under the MIT License --- <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-18 16:02:24 -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#115090