mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-07-12 12:37:32 +00:00
Avoid model endpoint probes on boot
This commit is contained in:
+1
-1
@@ -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
@@ -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}`);
|
||||
|
||||
Reference in New Issue
Block a user