mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[PR #24686] [CLOSED] fix: fallback to first available model when model_id is missing or empty #131446
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/24686
Author: @yahyasaqban-lab
Created: 5/13/2026
Status: ❌ Closed
Base:
dev← Head:fix/clean-title-fix📝 Commits (1)
471a68afix: 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:model_idis empty or missing and there are no models, still return 404model_idis not found but models exist, fall back to the first available modelCloses #24604
CLA
I agree that my contributions to Open WebUI are licensed under the MIT License.
By submitting this pull request, I confirm that:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.