Skip to content

vllm_omni.entrypoints.duplex.serving

Thin websocket serving for /v1/realtime?duplex=1.

Everything about a duplex session lives inside the engine (see vllm_omni.entrypoints.duplex_omni). This handler only does transport:

  • accept the socket and run the Realtime handshake (session.update opens a session through DuplexOmni.open_session; session.resume re-attaches to an existing one);
  • translate each client JSON event into a DuplexCommand and submit it in arrival order;
  • pump the session's typed events to the wire, journaling them for resume;
  • manage attachments: resume tokens, replay, takeover, detach on disconnect.

logger module-attribute

logger = init_logger(__name__)

OmniDuplexSessionHandler

WebSocket transport for engine-resident duplex sessions.

handle_realtime_session async

handle_realtime_session(websocket: WebSocket) -> None