fix(_model_config): restore utility preset provider fallback and empty option
keyboardstaff committed
Mar 29, 2026 at 06:27 UTC
e48ee68bf64778aba136122d73bc3d2d6d4fc04d
1 file changed
+5
-4
plugins/_model_config/webui/model-field.html
+5
-4
@@ -28,6 +28,7 @@
28
<div class="field-control">
29
<select x-model="model.provider"
30
x-effect="$nextTick(() => { if (providers.length) $el.value = model.provider })">
31
+ <option value="">— select —</option>
32
<template x-for="p in providers" :key="p.value">
33
<option :value="p.value" x-text="p.label"></option>
34
</template>
@@ -79,15 +80,15 @@
80
</div>
81
<div class="field-control" style="position:relative;" x-data="{ showKey: false }">
82
<input :type="showKey ? 'text' : 'password'"
82
- :value="$store.modelConfig.apiKeyValues[model.provider]"
83
- :placeholder="$store.modelConfig.apiKeyStatus[model.provider] ? '••••••••••••' : ''"
83
+ :value="$store.modelConfig.apiKeyValues[_prov]"
84
+ :placeholder="$store.modelConfig.apiKeyStatus[_prov] ? '••••••••••••' : ''"
85
autocomplete="off"
85
- @input="$store.modelConfig.setApiKeyValue(model.provider, $el.value)"
86
+ @input="$store.modelConfig.setApiKeyValue(_prov, $el.value)"
87
style="padding-right:32px;" />
88
<span class="material-symbols-outlined eye-toggle"
89
@click="
90
showKey = !showKey;
90
- const prov = model.provider;
91
+ const prov = _prov;
92
if (showKey && !$store.modelConfig.apiKeyValues[prov] && $store.modelConfig.apiKeyStatus[prov]) {
93
$store.modelConfig.revealApiKey(prov).then(v => { if (v) $store.modelConfig.apiKeyValues[prov] = v; });
94
}