frontend: /health advertises service=strata and loaded=true for upstream clients

Upstream's tools/strata_bench.py (is_strata, wait_ready) only talks to a server
whose /health has service == "strata" and loaded; the fork answered llama.cpp's
{status, busy} only, so the step-9 fork arms never left the readiness wait
(fork-flash-next on the pod sat ready for 30 min, then was killed as 'failed
to start'). Add service, loaded, model, max_context; keep status and busy.
e2e.sh checks the two required fields.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Robert KarlandClaude Fable 5.1 committed 2026-10-17 23:28:24 -07:00
1 parent 210e936a91
commit 453d301599
2 files changed
+7 -1

No files matched your search

+5 -1
View File
@@ -975,7 +975,11 @@ void strata_context::init_routes(server_http_context & http) {
res->error(format_error_response("the engine is not running", ERROR_TYPE_UNAVAILABLE));
return res;
}
res->ok({{"status", "ok"}, {"busy", I->slot.active()}});
// llama.cpp's shape ("status") plus the fields upstream PolyStrata clients (tools/strata_bench.py,
// its is_strata / wait_ready) look for: "service" and "loaded". The engine only serves once loaded.
res->ok({{"status", "ok"}, {"busy", I->slot.active()},
{"service", "strata"}, {"loaded", true},
{"model", I->model_name}, {"max_context", I->n_ctx}});
return res;
};
+2
View File
@@ -33,6 +33,8 @@ done
# /health and /v1/models
h=$(curl -s "$URL/health"); check $([ "$(echo "$h" | j 'd["status"]')" = ok ] && echo 0 || echo 1) "/health: $h"
# upstream PolyStrata clients (tools/strata_bench.py) require these two to treat the server as a loaded strata server
check $([ "$(echo "$h" | j 'd["service"]')" = strata ] && [ "$(echo "$h" | j 'd["loaded"]')" = True ] && echo 0 || echo 1) "/health: service=strata loaded=true"
m=$(curl -s "$URL/v1/models"); check $([ "$(echo "$m" | j 'd["data"][0]["id"]')" = fake ] && echo 0 || echo 1) "/v1/models id: $(echo "$m" | j '{k: d["data"][0].get(k) for k in ("id", "context_length")}')"
# non-streaming chat