Avoid model endpoint probes on boot

This commit is contained in:
pewdiepie-archdaemon
2026-06-28 08:07:15 +00:00
parent cbed87e5cb
commit e58d9702b7
3 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -3968,7 +3968,7 @@ function startOdysseusApp() {
}
// Non-critical: load in parallel, resolve silently
modelsModule.refreshModels(true).then(() => {
modelsModule.refreshModels(false).then(() => {
const modelsBox = document.getElementById('models');
const hasModels = modelsBox && modelsBox.querySelector('.models-row');
if (!hasModels) {
+1 -1
View File
@@ -184,7 +184,7 @@ export async function refreshModels(force = false) {
// back — newly-served endpoints don't appear until the cache
// ages out. (Bug repro: serve a model, picker is empty for ~30s
// even though the endpoint is in the DB and online.)
const _url = `${API_BASE}/api/models` + (force ? '?refresh=true' : '');
const _url = `${API_BASE}/api/models` + (force ? '?refresh=true' : '?background=false');
_fetchInflight = fetch(_url, { credentials: 'same-origin' })
.then(async (res) => {
if (!res.ok) throw new Error(`HTTP ${res.status}`);