Show fallback model in picker

This commit is contained in:
pewdiepie-archdaemon
2026-07-01 13:53:51 +00:00
parent 2918739489
commit dc3530b8fa
2 changed files with 13 additions and 0 deletions
+1
View File
@@ -4051,6 +4051,7 @@ function startOdysseusApp() {
// Non-critical: load in parallel, resolve silently // Non-critical: load in parallel, resolve silently
modelsModule.refreshModels(false).then(() => { modelsModule.refreshModels(false).then(() => {
try { sessionModule.updateModelPicker(); } catch (_) {}
const modelsBox = document.getElementById('models'); const modelsBox = document.getElementById('models');
const hasModels = modelsBox && modelsBox.querySelector('.models-row'); const hasModels = modelsBox && modelsBox.querySelector('.models-row');
if (!hasModels) { if (!hasModels) {
+12
View File
@@ -754,6 +754,18 @@ export function updateModelPicker() {
// silently pre-populate the chatbox of the next user that signed in. If // silently pre-populate the chatbox of the next user that signed in. If
// we have no session model and no pending-chat pick, fall through to // we have no session model and no pending-chat pick, fall through to
// the "Select model" placeholder below. // the "Select model" placeholder below.
//
// But if the server model cache already has an online endpoint, make the
// same safe fallback visible in the picker immediately. The send path can
// already resolve a usable model; the UI should not sit on "Select model"
// and make it look broken.
if (!modelId && !currentSessionId && window.modelsModule && window.modelsModule.getCachedItems) {
const fallback = _firstAvailableModel();
if (fallback) {
_deps.setPendingChat(fallback);
modelId = fallback.modelId;
}
}
// Check if selected model is still available — fall back ONLY for pending chats with no user selection // Check if selected model is still available — fall back ONLY for pending chats with no user selection
// Never override an existing session's model — the user explicitly chose it // Never override an existing session's model — the user explicitly chose it