From 80f38c9443b8f6a2fd78ca6e2079d6882574946d Mon Sep 17 00:00:00 2001 From: Lukas Parsons Date: Tue, 7 Jul 2026 00:26:47 -0400 Subject: [PATCH] Detect llama.cpp server readiness for auto-endpoint registration _parseServePhase only recognized vLLM, FastAPI, and Ollama ready states. llama-server's output ('server is listening on http://...') didn't match any pattern, so _serveReady was never set and auto-registration never fired. Added regex matching llamacpp-style listening messages. --- static/js/cookbookRunning.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/js/cookbookRunning.js b/static/js/cookbookRunning.js index a76bc316..1b057ac1 100644 --- a/static/js/cookbookRunning.js +++ b/static/js/cookbookRunning.js @@ -408,6 +408,10 @@ export function _parseServePhase(snapshot) { if (/Ollama API ready on port\s+\d+/i.test(flat)) { return { phase: 'ready', status: 'ready' }; } + // llama.cpp server (llama-server / llama-cli) — "server is listening" variants + if (/(?:server is listening|HTTP server listening|listening on (?:http|port))/i.test(flat)) { + return { phase: 'ready', status: 'ready' }; + } const llamaBuildMatches = [...flat.matchAll(/\[\s*(\d{1,3})%\]\s*(?:Building|Linking)/gi)]; if (llamaBuildMatches.length) { const pct = Math.min(100, parseInt(llamaBuildMatches[llamaBuildMatches.length - 1][1], 10));