Skip to content

ds4_server: Add /health endpoint that returns HTTP 200 once model is fully loaded#374

Open
mcmalayalam wants to merge 1 commit into
antirez:mainfrom
mcmalayalam:health-endpoint
Open

ds4_server: Add /health endpoint that returns HTTP 200 once model is fully loaded#374
mcmalayalam wants to merge 1 commit into
antirez:mainfrom
mcmalayalam:health-endpoint

Conversation

@mcmalayalam

Copy link
Copy Markdown

Summary

Adds a simple /health HTTP endpoint to ds4_server.c, which returns 200 OK once a model is fully loaded, and 503 Service Unavailable otherwise.

References to existing issues and pull requests

This fixes issue #334, so that tools such as llama-swap can start ds4-server and detect when it is ready to receive requests.

I note that there is open PR #326 which implements a more full-featured /health endpoint along with other endpoints. If that PR is favoured and merged I'm more than happy to close this one.

Test evidence

Manually tested with llama-swap and ds4-server on Strix Halo.

ds4-server logs:

ds4: ROCm startup model preparation covered 80.76 GiB of tensor spans in 0.642s
ds4: ROCm preparing model tensor mappings
ds4: ROCm startup model preparation covered 3.55 GiB of tensor spans in 0.012s
ds4: rocm backend initialized for graph diagnostics
0609 21:46:11 ds4-server: context buffers 4460.31 MiB (ctx=131072, backend=rocm, prefill_chunk=8192, raw_kv_rows=8192, compressed_kv_rows=32770)
0609 21:46:12 ds4-server: KV disk cache /tmp/ds4-kv (budget=8192 MiB, cross-quant=accept, min=512, cold_max=30000, continued=10000, trim=32, align=2048, hit_half_life=21600s)
0609 21:46:12 ds4-server: listening on http://127.0.0.1:5816

llama-swap logs:

2026-06-09T21:46:12+01:00 [INFO] <deepseek-v4-flash-ds4> Health check passed on http://localhost:5816/health

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant