Skip to content

vllm_omni.entrypoints.openpi.connection

WebSocket connection for robot policy inference (OpenPI protocol).

Protocol (compatible with OpenPI policy clients): Connect -> server sends msgpack(PolicyServerConfig fields) Infer -> client sends msgpack(obs), server sends msgpack(ndarray) Reset -> client sends msgpack({endpoint:reset}), server sends msgpack(status)

NumPy values use msgpack-numpy marker mappings. Outbound payloads follow the openpi-client format so official OpenPI clients can decode action responses: ndarray -> {ndarray: true, dtype, shape, data} scalar -> {npgeneric: true, dtype, data}

Inbound payloads accept both the openpi-client markers above and the legacy vLLM-native markers: ndarray -> {nd: true, type, kind, shape, data} scalar -> {nd: false, type, kind, data}

MAX_OPENPI_PAYLOAD_BYTES module-attribute

MAX_OPENPI_PAYLOAD_BYTES = 64 * 1024 * 1024

logger module-attribute

logger = init_logger(__name__)

RobotRealtimeConnection

WebSocket connection for robot policy inference.

serving instance-attribute

serving = serving

websocket instance-attribute

websocket = websocket

handle_connection async

handle_connection() -> None

Main loop for OpenPI-compatible policy serving.

reset

reset() -> None