NemoClaw icon indicating copy to clipboard operation
NemoClaw copied to clipboard

[All Platforms][Inference] vLLM and NIM health checks accept any HTTP response as a model server

Open PicoNVIDIA opened this issue 2 months ago • 0 comments

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) returns true for any output except an empty string or 000, unless the endpoint ends in /health. The unmanaged vLLM probe hits http://127.0.0.1:${VLLM_PORT}/v1/models, so a 200 HTML page or a 302 redirect counts as healthy. isLocalProviderHostHealthy(), validateLocalProvider(), and provider-host-state.ts all rely on it.
  • waitForNimHealth() (src/lib/inference/nim.ts:1187) prints NIM 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

  1. Serve a static HTML page on 127.0.0.1:11491 that answers every path with HTTP 200 and <html>dev server</html>.
  2. Set NEMOCLAW_VLLM_PORT=11491, with an isolated HOME and no managed vLLM state.
  3. Call isLocalProviderHostHealthy("vllm-local") and waitForNimHealth(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 main at 4c44f7cc8; the affected files are unchanged on 5f6eb3232
  • 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

PicoNVIDIA avatar Sep 28 '26 19:09 PicoNVIDIA