[All Platforms][Inference] vLLM and NIM health checks accept any HTTP response as a model server
Description
The vLLM and NIM health checks treat any non-empty HTTP response from /v1/models as a healthy model server. Any web server on that port passes, including a dev server or a proxy that redirects to a login page.
isLocalProviderProbeOutputHealthy()(src/lib/inference/local.ts:1293) returnstruefor any output except an empty string or000, unless the endpoint ends in/health. The unmanaged vLLM probe hitshttp://127.0.0.1:${VLLM_PORT}/v1/models, so a 200 HTML page or a 302 redirect counts as healthy.isLocalProviderHostHealthy(),validateLocalProvider(), andprovider-host-state.tsall rely on it.waitForNimHealth()(src/lib/inference/nim.ts:1187) printsNIM is healthy.as soon as curl returns anything. It returns before it looks at the container, so it never notices that the NIM container has exited.
These checks should only pass on HTTP 200 with a model list in the body.
Reproduction Steps
- Serve a static HTML page on 127.0.0.1:11491 that answers every path with HTTP 200 and
<html>dev server</html>. - Set
NEMOCLAW_VLLM_PORT=11491, with an isolated HOME and no managed vLLM state. - Call
isLocalProviderHostHealthy("vllm-local")andwaitForNimHealth(11491, 1)with the real curl runner.
Both return true. A 302 redirect to an HTML page gives the same result. A 503 makes both return false, and waitForNimHealth then checks the container and aborts.
Environment
- macOS 26.5.2 (arm64), Node.js v22.22.3
- NemoClaw
mainat4c44f7cc8; the affected files are unchanged on5f6eb3232 - I called the exported functions against a local HTTP server, without Docker or a GPU.
Debug Output
GET /v1/models -> <html>dev server</html> HTTP=200
isLocalProviderHostHealthy(vllm-local): true
Waiting for NIM health on port 11491 (timeout: 1s)...
NIM is healthy.
waitForNimHealth: true
Logs
Redirect case, with a stubbed NIM container that reports exited:
fixture: <html>Not a model server</html> HTTP=302
isLocalProviderHostHealthy(vllm-local): true
ensureLocalProviderReachable(vllm-local): true
waitForNimHealth(302 HTML): true
NIM container inspections: 0
control isLocalProviderHostHealthy(503): false
NIM container fixture-exited-nim is exited; aborting health wait.
control waitForNimHealth(503): false
A possible fix is to keep the HTTP status in these probes and require 200 plus a JSON body with a data array, which is what an OpenAI-compatible /v1/models returns. #12394 is the same kind of bug in the Ollama proxy check, which passes on a live PID alone.
Checklist
- [x] I confirmed this bug is reproducible
- [x] I searched existing issues and this is not a duplicate