mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 06:03:26 -05:00
[PR #21736] [MERGED] fix: model fallback routing for all model types and default model selection #81125
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/21736
Author: @Classic298
Created: 2/22/2026
Status: ✅ Merged
Merged: 2/22/2026
Merged by: @tjbck
Base:
dev← Head:fix-fallbacks📝 Commits (1)
2f66693fix: model fallback routing for all model types and default model selection📊 Changes
2 files changed (+8 additions, -5 deletions)
View changed files
📝
backend/open_webui/main.py(+4 -2)📝
src/lib/components/chat/Chat.svelte(+4 -3)📄 Description
fix: model fallback routing for all model types and default model selection
Fixes a bug where you'd get model not found errors despite using the enable custom model fallback, because if the default model to fallback to was configured to be, for example, a pipe - then this pipe would not be found when falling back because it would only check in the connection's available models.
Backend: When ENABLE_CUSTOM_MODEL_FALLBACK is active and a custom model's base model is unavailable, the fallback now swaps the model and form data to the configured default model directly. This ensures routing uses the fallback model's type (pipe, Ollama, or OpenAI) instead of the original model's type, which previously caused "Model not found" errors when the fallback was a different backend type.
Frontend: Fixed default model selection in new chat initialization where the admin-configured default models were always overwritten by the first available model. The first-available fallback now only triggers when the configured defaults don't resolve to valid available models.
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.