Symptom
GET /health on mlxk serve answers unconditionally:
{ "status": "healthy", "service": "mlx-knife-server-2.0" }
It reports healthy before any model has been loaded, and it keeps reporting healthy after the
inference backend has failed. The endpoint cannot distinguish a server that will answer the next
request from one that will fail it.
Cause
The handler returns a literal dict. It consults no state — not the loaded model, not the inference
backend, not the device.
Repro
mlxk serve --port 8000 &
curl -s localhost:8000/health
# {"status":"healthy","service":"mlx-knife-server-2.0"} — no model loaded yet
Impact
The response is a liveness signal (the process is up and answering) wearing the name and the payload
of a readiness signal. A client or supervisor that polls it to decide whether to route work, retry a
failed request, or restart the process gets no usable information — and there is no other endpoint
that reports backend state.
The project already has the honest pattern on the other server: embed-serve's /health carries
model + system_fingerprint and returns 503 until its model is loaded.
docs/SERVER-HANDBOOK.md describes the endpoint as a server health check, which is how a client
reads it. Whether the fix is honest reporting or a documented liveness-only contract is open; this
issue records the endpoint.
A server in that state is the subject of #65: the process stays up and fails every request while
this endpoint keeps reporting healthy.
Symptom
GET /healthonmlxk serveanswers unconditionally:{ "status": "healthy", "service": "mlx-knife-server-2.0" }It reports
healthybefore any model has been loaded, and it keeps reportinghealthyafter theinference backend has failed. The endpoint cannot distinguish a server that will answer the next
request from one that will fail it.
Cause
The handler returns a literal dict. It consults no state — not the loaded model, not the inference
backend, not the device.
Repro
Impact
The response is a liveness signal (the process is up and answering) wearing the name and the payload
of a readiness signal. A client or supervisor that polls it to decide whether to route work, retry a
failed request, or restart the process gets no usable information — and there is no other endpoint
that reports backend state.
The project already has the honest pattern on the other server:
embed-serve's/healthcarriesmodel+system_fingerprintand returns 503 until its model is loaded.docs/SERVER-HANDBOOK.mddescribes the endpoint as a server health check, which is how a clientreads it. Whether the fix is honest reporting or a documented liveness-only contract is open; this
issue records the endpoint.
A server in that state is the subject of #65: the process stays up and fails every request while
this endpoint keeps reporting
healthy.