fix: poll llama-server even without model to detect late startup

This commit is contained in:
Troed Sångberg
2026-06-14 13:41:22 +02:00
parent 27bd4fc289
commit 4ca808964d
2 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{
"$schema": "https://json.schemastore.org/package.json",
"name": "@troed/oc-ls-stats",
"version": "0.0.67",
"version": "0.0.68",
"type": "module",
"exports": {
"./tui": {
+7 -7
View File
@@ -297,13 +297,6 @@ const tui: TuiPlugin = async (api) => {
}
}
if (!model) {
tracker.failure = "no model found"
bump()
return
}
tracker.failure = null
let anyPrefilling = false
let anyGenerating = false
let genEnded = false
@@ -314,6 +307,13 @@ const tui: TuiPlugin = async (api) => {
for (const baseUrl of llamaServerUrls) {
const slots = await fetchSlots(baseUrl, model)
const slotList = Array.isArray(slots) ? slots : slots ? Object.values(slots) : []
if (slotList.length === 0) {
tracker.failure = "no model found"
bump()
continue
}
tracker.failure = null
debug(`poll baseUrl=${baseUrl} slots=${JSON.stringify(slotList)}`)
for (const slot of slotList) {