mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-16 09:41:23 +00:00
fix: message ignores the Web Search toggle after switching models (#33275)
After changing the model or adding a second one to compare, the Web Search toggle showed the new default but the next message still went out with the previous model's setting. A model without Web Search as a default feature could search, and one with it did not. The message now follows what the toggle shows. Fixes #33265
This commit is contained in:
parent
e3ad014fb2
commit
3febf25d84
1 changed files with 5 additions and 4 deletions
|
|
@ -368,6 +368,11 @@
|
|||
let pendingWebSearchPrompt: string | null = null;
|
||||
let webSearchConfirmed = false;
|
||||
|
||||
// Before webSearchActive, so it sees the new defaults in the same update
|
||||
$: if (!loading && modelDefaults && !equal(selectedModelIds, defaultsModelIds)) {
|
||||
setDefaults(true);
|
||||
}
|
||||
|
||||
$: {
|
||||
const currentModels = atSelectedModel?.id ? [atSelectedModel.id] : selectedModels;
|
||||
const allModelsSupportWebSearch =
|
||||
|
|
@ -1103,10 +1108,6 @@
|
|||
let modelDefaults: Record<string, any> | null = null;
|
||||
let settingDefaults: Promise<void> | null = null;
|
||||
|
||||
$: if (!loading && modelDefaults && !equal(selectedModelIds, defaultsModelIds)) {
|
||||
setDefaults(true);
|
||||
}
|
||||
|
||||
const setDefaults = async (preserveSelections = false) => {
|
||||
const modelIds = atSelectedModel ? [atSelectedModel.id] : [...selectedModels];
|
||||
const id = $chatId;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue