{"record":{"id":"50a503b4dab145e3","repo":"vllm-project/vllm","slug":"request-id-request-id-r-does-not-embed-a-peer-zm","errorCode":null,"errorMessage":"request_id {request_id!r} does not embed a peer zmq_address and kv_transfer_params['remote_host'] is empty; cannot route MoRI-IO transfer","messagePattern":"request_id (.+?) does not embed a peer zmq_address and kv_transfer_params\\['remote_host'\\] is empty; cannot route MoRI-IO transfer","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"vllm/distributed/kv_transfer/kv_connector/v1/moriio/moriio_common.py","lineNumber":531,"sourceCode":"\n        Routing keys consumed elsewhere (NOT here): ``remote_dp_rank`` /\n        ``remote_dp_rank_override`` gate the decode->prefill notify target in\n        MoRIIOConnectorScheduler; they are router-authoritative and never\n        self-derived (see that class's request routing contract).\n        \"\"\"\n        transfer_id = kv_transfer_params[\"transfer_id\"]\n\n        # Try request_id embedded address first, fallback to explicit params.\n        peer_zmq = get_peer_zmq_from_request_id(request_id, is_producer=write_mode)\n        if peer_zmq is not None:\n            remote_host, remote_handshake_port, remote_notify_port = (\n                parse_moriio_zmq_address(peer_zmq)\n            )\n        else:\n            try:\n                remote_host = kv_transfer_params[\"remote_host\"]\n                if not remote_host:\n                    raise ValueError(\n                        f\"request_id {request_id!r} does not embed a peer \"\n                        f\"zmq_address and kv_transfer_params['remote_host'] is \"\n                        f\"empty; cannot route MoRI-IO transfer\"\n                    )\n                remote_handshake_port = int(kv_transfer_params[\"remote_handshake_port\"])\n                remote_notify_port = int(kv_transfer_params[\"remote_notify_port\"])\n            except (KeyError, TypeError, ValueError) as e:\n                raise ValueError(\n                    f\"request_id {request_id!r} does not embed a peer \"\n                    f\"zmq_address and kv_transfer_params is missing one or \"\n                    f\"more sidecar-fallback keys (need remote_host, \"\n                    f\"remote_handshake_port, remote_notify_port): {e}\"\n                ) from e\n\n        # Multi-pod: use multi_pod_hosts list or fallback to single host.\n        _pod_hosts = kv_transfer_params.get(\"remote_hosts\") or [remote_host]\n        if not isinstance(_pod_hosts, list):\n            _pod_hosts = [_pod_hosts]","sourceCodeStart":513,"sourceCodeEnd":549,"githubUrl":"https://github.com/vllm-project/vllm/blob/c794754062d49a8fdb63ab3c5215b488b865030c/vllm/distributed/kv_transfer/kv_connector/v1/moriio/moriio_common.py#L513-L549","documentation":"Raised while resolving the peer for a MoRI-IO transfer: the request_id does not embed a peer zmq_address (get_peer_zmq_from_request_id returned None) and the explicit fallback kv_transfer_params['remote_host'] is present but empty/falsy. Without a remote host the connector cannot route the transfer.","triggerScenarios":"Prefill/decode disagg where the router does not embed the peer address in the request_id, and the sidecar or client passes kv_transfer_params with remote_host='' or None while still providing the port keys.","commonSituations":"Sidecar populates ports from one config source but the host from another that is unset; empty-string host after a template/env var substitution failure; switching from router-embedded routing to explicit params without fully populating them.","solutions":["Set a non-empty remote_host in kv_transfer_params (and valid remote_handshake_port / remote_notify_port)","Or restore router-side address embedding in the request_id so the fallback path is not used","Check the sidecar/injector code for why host resolves to an empty string (missing env var, wrong config key)","Fail fast at request admission when neither routing source is available"],"exampleFix":"// before\nkv_transfer_params = {\"remote_host\": \"\", \"remote_handshake_port\": 5555, \"remote_notify_port\": 5556}\n\n// after\nkv_transfer_params = {\"remote_host\": \"10.0.0.5\", \"remote_handshake_port\": 5555, \"remote_notify_port\": 5556}","handlingStrategy":"validation","validationCode":"def has_complete_remote_routing(params: dict) -> bool:\n    if get_peer_zmq_from_request_id(request_id, is_producer=write_mode) is not None:\n        return True\n    return bool(params.get(\"remote_host\")) and bool(params.get(\"remote_handshake_port\")) and bool(params.get(\"remote_notify_port\"))","typeGuard":"def is_non_empty_host(v) -> bool:\n    return isinstance(v, str) and v.strip() != \"\"","tryCatchPattern":"try:\n    resolve_peer(...)\nexcept ValueError as e:\n    if \"remote_host\" in str(e) and \"empty\" in str(e):\n        # reject/repair request routing instead of crashing the worker\n        mark_request_unroutable(request_id)\n    else:\n        raise","preventionTips":["Treat remote_host as required schema in the sidecar; fail request admission when unset","Use one config source for host and ports so they cannot diverge","Log kv_transfer_params keys (names only) at request admission for debuggability"],"tags":["kv-transfer","config","routing","disaggregated-prefill"],"backgroundTag":null,"analyzedSha":"c794754062d49a8fdb63ab3c5215b488b865030c","analyzedAt":"2026-08-14T21:17:39.825Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}