Skip to main content
Shared configuration and state types: session and user state enums, speech and VAD event types, and the config objects for end-of-utterance, interruption, and realtime behavior.

ZeroRuntimeError

Base for everything this SDK raises on its own behalf. Catch it to handle any ZeroRuntime failure without naming each one. Errors the standard library raises — ValueError for a bad argument, TimeoutError for a request that went unanswered — are left as themselves rather than wrapped.

SessionRejected

The ZeroRuntime refused to create the session.

Constructor

str
default:""
The ZeroRuntime’s explanation.
str
default:""
Machine-readable reason, at_capacity | invalid_config | internal. at_capacity is worth retrying elsewhere; invalid_config never is.
int
default:"0"
Sessions the ZeroRuntime is already running.
int
default:"0"
The ZeroRuntime’s ceiling, when it reported one.

ProviderUnavailable

A provider in the pipeline could not be reached or would not serve. Usually a missing or rejected vendor key, or a model the account is not entitled to. A fallback on the same slot is what keeps this from ending the call.

ZeroRuntimeUnreachable

The runtime could not be reached, or did not answer in time. A transport failure rather than a refusal: nothing was decided about the session, so retrying is reasonable.

ToolTimeout

A @function_tool did not return before its deadline. The turn continues without the tool’s answer. A tool that calls out to a slow API wants its own timeout, so it can say something useful instead of being cut off.

AgentState

Where the agent is in a turn — listening, thinking, speaking, or on its way in or out of the call.

UserState

What the caller is doing, as the runtime reports it.

ChatRole

Who a message in the conversation came from. A plain string works anywhere one of these is accepted — it subclasses str — so "user" and ChatRole.USER are interchangeable.