* webui: fix model selector being locked to first loaded model
When multiple models are loaded, the auto-select effect would re-fire
on every loadedModelIds change, overriding the user's manual model
selection. Guard with selectedModelId so auto-select only kicks in
when no model is chosen yet.
* chore: update webui build output
$effect(() => {
if (conversationModel) {
modelsStore.selectModelByName(conversationModel);
- } else if (isRouter && modelsStore.loadedModelIds.length > 0) {
+ } else if (isRouter && !modelsStore.selectedModelId && modelsStore.loadedModelIds.length > 0) {
+ // auto-select the first loaded model only when nothing is selected yet
const first = modelOptions().find((m) => modelsStore.loadedModelIds.includes(m.model));
if (first) modelsStore.selectModelById(first.id);
}