mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-29 01:41:47 +00:00
fix: hide hidden base models in the automations model selector
The `/api/models` response intentionally includes base models marked as hidden (`info.meta.hidden`) because they may be required to resolve Workspace Models. Every user-facing model selector therefore filters them out client-side, but the Automations model dropdown listed the raw `$models` store and so exposed hidden base models for selection. Filter the dropdown's selectable list with the same `!(model?.info?.meta?.hidden ?? false)` predicate already used by the chat, notes and pinned-model selectors. The label lookup is left untouched so an automation already configured with a hidden model keeps displaying its name. Closes #24869
This commit is contained in:
parent
42783881e9
commit
af861a7aa5
1 changed files with 8 additions and 2 deletions
|
|
@ -24,13 +24,19 @@
|
|||
? $models.find((m) => m.id === model_id)?.name || model_id
|
||||
: $i18n.t('Select model');
|
||||
|
||||
// Hidden base models are returned by the API for resolving Workspace Models,
|
||||
// but should not be user-selectable here (consistent with the chat, notes and
|
||||
// pinned-model selectors). The label above intentionally still resolves a
|
||||
// hidden model so existing automations keep showing the correct name.
|
||||
$: selectableModels = $models.filter((m) => !(m?.info?.meta?.hidden ?? false));
|
||||
|
||||
$: filteredModels = modelSearch
|
||||
? $models.filter(
|
||||
? selectableModels.filter(
|
||||
(m) =>
|
||||
m.name.toLowerCase().includes(modelSearch.toLowerCase()) ||
|
||||
m.id.toLowerCase().includes(modelSearch.toLowerCase())
|
||||
)
|
||||
: $models;
|
||||
: selectableModels;
|
||||
</script>
|
||||
|
||||
<Dropdown bind:show={showDropdown} {side} {align}>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue