diff --git a/package.json b/package.json index 7f2d173..234f205 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/tui.tsx b/tui.tsx index 4f8f805..c97b263 100644 --- a/tui.tsx +++ b/tui.tsx @@ -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) {