Skip to content

Channel Models

ChannelBinding

Bases: BaseModel

A channel's attachment to a room.

can_write property

can_write

RFC §7.5 — whether this binding may write events into the room.

True iff the binding has write access (READ_WRITE or WRITE_ONLY) and is not muted. Gates both direct injection into the timeline (inbound pipeline) and source broadcast (event router).

ChannelCapabilities

Bases: BaseModel

What a channel can do.

ChannelOutput

Bases: BaseModel

Output produced by a channel after receiving an event.

provider_result class-attribute instance-attribute

provider_result = None

Native result of a transport delivery attempt.

Transport channels preserve it here so the framework can report provider message ids and metadata without overloading AI response metadata.

error class-attribute instance-attribute

error = Field(default=None, exclude=True)

An error the channel met while producing this output.

The output is still delivered (an AI turn the provider interrupted after a tool round keeps its rounds, RFC §6.4), and the error surfaces as for a channel that raised: ON_ERROR fires and the caller's InboundResult.error carries it.

empty classmethod

empty()

Create an empty output with no responses or side effects.

RateLimit

Bases: BaseModel

Rate limiting configuration for a channel.

RetryPolicy

Bases: BaseModel

Configures retry behaviour for channel delivery.

retryable_errors class-attribute instance-attribute

retryable_errors = None

Exception type names that may be retried (RFC §13.2).

None retries anything the error itself does not refuse — a provider that marks its exception retryable=False is believed either way, which is how a permanent 4xx stops being replayed with full backoff. Naming types here narrows it further: only those are retried, everything else fails on its first attempt.