fix(handshake): add missing vllm_version field to EngineCoreReadyResponse payload#459
Open
iamagenius00 wants to merge 1 commit into
Open
Conversation
…onse The Rust vllm-rs frontend introduced in GradientHQ#457 expects a 5-field EngineCoreReadyResponse (max_model_len, num_gpu_blocks, dtype, vllm_version, dp_stats_address), but engine_core_ready_payload in Python only sends 4 fields, omitting vllm_version. This causes msgpack decode to fail at handshake time on any Mac/MLX worker, blocking all inference (e.g. /v1/chat/completions returns 500). Verified by inspecting the vllm-rs binary strings, which contain "struct EngineCoreReadyResponse with 5 elements" followed by the field list ending with vllm_version. Fix: add vllm_version as a keyword arg with a default of "0.0.0+parallax" so the field is always emitted; the value can be overridden by callers if needed. The Rust side does not validate the version string content, only its presence. Tested on a single-node mac mini (M4 Pro) cluster: after patch, "bootstrapped engines connected engine_count=1" appears in the worker log, and /v1/chat/completions returns a valid 200 response with model output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Rust
vllm-rsfrontend added in #457 expects 5 fields in theEngineCoreReadyResponsehandshake payload, butengine_core_ready_payloadin Python only emits 4 — missingvllm_version. As a result, any Mac/MLX worker crashes at handshake time with:This blocks all inference (
/v1/chat/completions,/v1/completions, etc. all return 500) — the HTTP layer never gets a chance to route requests because the frontend ↔ engine IPC never establishes.Root cause
The shipped
vllm-rsbinary's strings show:But
src/parallax/server/engine_core_protocol.py::engine_core_ready_payloadonly includes 4 of those, omittingvllm_version. The Python error fallback dump ({max_model_len, num_gpu_blocks, dp_stats_address, dtype}) confirms this exact set.Fix
Add
vllm_versionas a keyword-only arg with default"0.0.0+parallax", and include it in the dict. The Rust side appears to only check field presence (no version comparison logic visible in the binary), so any string suffices; the"0.0.0+parallax"marker makes it clear in debug logs that this came from the Python MLX path rather than upstream vLLM. Callers can override if needed.def engine_core_ready_payload( *, max_model_len: int, dtype: Optional[str], num_gpu_blocks: int = 0, dp_stats_address: Optional[str] = None, + vllm_version: str = "0.0.0+parallax", ) -> bytes: """Build the registration payload sent by the engine DEALER socket.""" return _pack_msgpack( { "max_model_len": int(max_model_len), "num_gpu_blocks": int(num_gpu_blocks), "dp_stats_address": dp_stats_address, "dtype": dtype, + "vllm_version": vllm_version, } )Test plan
Single-node mac mini (M4 Pro, MLX backend), HEAD
328c99fwith this patch applied:parallax run -m Qwen/Qwen3-0.6B -n 1(scheduler tab)parallax join(worker tab)Before patch:
missing field vllm_versionand exits with code 1 shortly after model loadcurl localhost:3001/v1/chat/completions→internal server error(500)After patch:
bootstrapped engines connected engine_count=1starting OpenAI server bind_address=[::1]:3000 model=Qwen/Qwen3-0.6Bcurl localhost:3001/v1/chat/completionsandcurl localhost:3000/v1/chat/completionsboth return valid OpenAI-shaped JSON with model output:{"id":"chatcmpl-94ef2c77-...","model":"Qwen/Qwen3-0.6B", "choices":[{"index":0,"message":{"role":"assistant","reasoning":"..."}}], "usage":{"prompt_tokens":17,"total_tokens":67}}Notes
main— it's not a configuration issue."0.0.0+parallax"is semver-compatible (build-metadata suffix) and grep-able in logs.parallax.__version__if maintainers prefer.