mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-11-03 11:42:23 +01:00
fix(models): resolve configured defaults after automatic fallback (#6949)
* fix(models): resolve configured defaults after automatic fallback * test: isolate photo routing from external MCP registry state
This commit is contained in:
+11
-10
@@ -128,7 +128,7 @@ async function _ensureDefaultPendingChat() {
|
||||
if (!_deps || _defaultChatPickInFlight) return;
|
||||
if (_deps.getCurrentSessionId && _deps.getCurrentSessionId()) return;
|
||||
const pending = _deps.getPendingChat && _deps.getPendingChat();
|
||||
if (pending && pending.modelId) return;
|
||||
if (pending && pending.modelId && pending.source !== 'fallback') return;
|
||||
_defaultChatPickInFlight = true;
|
||||
const seq = ++_defaultPendingSeq;
|
||||
try {
|
||||
@@ -954,15 +954,6 @@ export function updateModelPicker() {
|
||||
}
|
||||
}
|
||||
const latestPending = _deps.getPendingChat && _deps.getPendingChat();
|
||||
if (
|
||||
!currentSessionId &&
|
||||
!_autoSelectingDefault &&
|
||||
window.modelsModule &&
|
||||
window.modelsModule.getCachedItems &&
|
||||
(!modelId || (latestPending && latestPending.source === 'fallback'))
|
||||
) {
|
||||
_ensureDefaultPendingChat();
|
||||
}
|
||||
|
||||
let displayName = modelId ? modelId.split('/').pop() : 'Select model';
|
||||
const routeItems = window.modelsModule?.getCachedItems?.() || [];
|
||||
@@ -994,6 +985,16 @@ export function updateModelPicker() {
|
||||
label.textContent = displayName;
|
||||
}
|
||||
_updateReasoningEffortUI(modelId, s, latestPending, selectedEndpoint);
|
||||
// A cached default can resolve synchronously and re-render the picker.
|
||||
if (
|
||||
!currentSessionId &&
|
||||
!_autoSelectingDefault &&
|
||||
window.modelsModule &&
|
||||
window.modelsModule.getCachedItems &&
|
||||
(!modelId || (latestPending && latestPending.source === 'fallback'))
|
||||
) {
|
||||
_ensureDefaultPendingChat();
|
||||
}
|
||||
}
|
||||
|
||||
// ── Reasoning effort control for models supporting reasoning levels ──
|
||||
|
||||
Reference in New Issue
Block a user