mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[PR #24687] [CLOSED] fix: fallback to first available model when model_id is missing or empty #131447
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/24687
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
Before submitting, make sure you have checked the following:
devbranch.dev, and contains no unrelated commits.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
Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.