Skip to content

vllm_omni.protocol.realtime.errors

The OpenAI Realtime error envelope.

A Realtime server reports a rejected client event as one error event whose error object carries type / code / message (plus the client's event_id and an optional param). type is not free-form: it is one of OpenAI's four buckets, derived from our internal code by :data:REALTIME_ERROR_TYPES_BY_CODE.

OpenAI standardises the three type classes but not the codes, so the code vocabulary is a consumer's own. vLLM-Omni's lives in vllm_omni.protocol.duplex.errors (Tier 3 in docs/serving/realtime_duplex_api.md); what stays here is the exception type every consumer raises, so the envelope is rendered identically whoever built it.

RealtimeProtocolError

Bases: ValueError

A client payload could not be decoded into a valid Realtime intent.

code is the internal error code that :data:REALTIME_ERROR_TYPES_BY_CODE maps to an OpenAI error.type; event_id is the client event id the error answers. vllm_omni.engine.duplex.commands.DuplexCommandError is the duplex specialization, so a consumer catching either sees the same three attributes.

code instance-attribute

code = code

event_id instance-attribute

event_id = event_id