Skip to content

ThreadRealtimeStartParams

Base classes

Name Children Inherits
CodexBaseModel
codexed.models.base
Base model for all Codex API models.

â‹” Inheritance diagram

graph TD
  2023013177["v2_protocol.ThreadRealtimeStartParams"]
  3116041069["base.CodexBaseModel"]
  3879467795["main.BaseModel"]
  2751680898["builtins.object"]
  3116041069 --> 2023013177
  3879467795 --> 3116041069
  2751680898 --> 3879467795

🛈 DocStrings

Bases: CodexBaseModel

EXPERIMENTAL - start a thread-scoped realtime session.

Source code in src/codexed/models/v2_protocol.py
class ThreadRealtimeStartParams(CodexBaseModel):
    """EXPERIMENTAL - start a thread-scoped realtime session."""

    backend_reasoning_status: bool | None = None
    """
    Relays public reasoning summaries as quiet context for realtime V3 delegations. Defaults to false.
    """
    client_managed_handoffs: bool | None = None
    """
    Leaves Codex response handoffs to the client's explicit append calls instead of forwarding them automatically. Defaults to false.
    """
    codex_response_handoff_channel_prefixes: dict[str, Any] | None = None
    """
    Overrides BEM channel prefixes by `analysis`, `commentary`, or `final`. Omitted channels retain their default uppercase bracketed prefixes.
    """
    codex_response_handoff_mode: CodexResponseHandoffMode | None = None
    """
    Selects how automatic Codex responses are routed in Frameless Bidi sessions. Omitted values default to `thinking`. Realtime V1 and V2 ignore this setting.
    """
    codex_response_item_prefix: str | None = None
    """
    Optional prefix added to automatic Codex response items when `codexResponsesAsItems` is true.
    """
    codex_responses_as_items: bool | None = None
    """
    Sends automatic Codex responses as realtime conversation items instead of handoff appends.
    """
    delegation_ack_filler: bool | None = None
    """
    Controls whether a realtime V3 delegation produces an acknowledgement filler. Omitted values preserve the Realtime API's default behavior.
    """
    flush_transcript_tail_on_session_end: bool | None = None
    """
    Routes any transcript tail remaining at session end through Codex. Defaults to false. TODO: Remove this rollout knob once transcript-tail flushing is always enabled.
    """
    include_startup_context: bool | None = None
    """
    Set to false to start without Codex's startup context. Omitted or null includes it.
    """
    initial_items: list[ThreadRealtimeInitialItem] | None = None
    """
    Adds complete role-bearing text items to the initial Frameless Bidi session history. This is only supported by realtime V3 and is sent during session startup. Requests are limited to 128 items and 8,192 estimated text tokens in total.
    """
    model: str | None = None
    """
    Overrides the configured realtime model for this session only.
    """
    output_modality: RealtimeOutputModality
    """
    Selects text or audio output for the realtime session. Transport and voice stay independent so clients can choose how they connect separately from what the model emits.
    """
    prompt: str | None = None
    realtime_end_instructions: str | None = None
    """
    Developer instructions given to the backing Codex model when this realtime session ends.
    """
    realtime_session_id: str | None = None
    realtime_start_instructions: str | None = None
    """
    Developer instructions given to the backing Codex model when this realtime session starts.
    """
    thread_id: str
    transport: ThreadRealtimeStartTransport | None = None
    version: RealtimeConversationVersion | None = None
    """
    Overrides the configured realtime protocol version for this session only.
    """
    voice: RealtimeVoice | None = None
    voice_session_id: str | None = None
    """
    Client-generated identifier for the product voice session. This is distinct from `realtimeSessionId`.
    """

backend_reasoning_status class-attribute instance-attribute

backend_reasoning_status: bool | None = None

Relays public reasoning summaries as quiet context for realtime V3 delegations. Defaults to false.

client_managed_handoffs class-attribute instance-attribute

client_managed_handoffs: bool | None = None

Leaves Codex response handoffs to the client's explicit append calls instead of forwarding them automatically. Defaults to false.

codex_response_handoff_channel_prefixes class-attribute instance-attribute

codex_response_handoff_channel_prefixes: dict[str, Any] | None = None

Overrides BEM channel prefixes by analysis, commentary, or final. Omitted channels retain their default uppercase bracketed prefixes.

codex_response_handoff_mode class-attribute instance-attribute

codex_response_handoff_mode: CodexResponseHandoffMode | None = None

Selects how automatic Codex responses are routed in Frameless Bidi sessions. Omitted values default to thinking. Realtime V1 and V2 ignore this setting.

codex_response_item_prefix class-attribute instance-attribute

codex_response_item_prefix: str | None = None

Optional prefix added to automatic Codex response items when codexResponsesAsItems is true.

codex_responses_as_items class-attribute instance-attribute

codex_responses_as_items: bool | None = None

Sends automatic Codex responses as realtime conversation items instead of handoff appends.

delegation_ack_filler class-attribute instance-attribute

delegation_ack_filler: bool | None = None

Controls whether a realtime V3 delegation produces an acknowledgement filler. Omitted values preserve the Realtime API's default behavior.

flush_transcript_tail_on_session_end class-attribute instance-attribute

flush_transcript_tail_on_session_end: bool | None = None

Routes any transcript tail remaining at session end through Codex. Defaults to false. TODO: Remove this rollout knob once transcript-tail flushing is always enabled.

include_startup_context class-attribute instance-attribute

include_startup_context: bool | None = None

Set to false to start without Codex's startup context. Omitted or null includes it.

initial_items class-attribute instance-attribute

initial_items: list[ThreadRealtimeInitialItem] | None = None

Adds complete role-bearing text items to the initial Frameless Bidi session history. This is only supported by realtime V3 and is sent during session startup. Requests are limited to 128 items and 8,192 estimated text tokens in total.

model class-attribute instance-attribute

model: str | None = None

Overrides the configured realtime model for this session only.

output_modality instance-attribute

output_modality: RealtimeOutputModality

Selects text or audio output for the realtime session. Transport and voice stay independent so clients can choose how they connect separately from what the model emits.

realtime_end_instructions class-attribute instance-attribute

realtime_end_instructions: str | None = None

Developer instructions given to the backing Codex model when this realtime session ends.

realtime_start_instructions class-attribute instance-attribute

realtime_start_instructions: str | None = None

Developer instructions given to the backing Codex model when this realtime session starts.

version class-attribute instance-attribute

version: RealtimeConversationVersion | None = None

Overrides the configured realtime protocol version for this session only.

voice_session_id class-attribute instance-attribute

voice_session_id: str | None = None

Client-generated identifier for the product voice session. This is distinct from realtimeSessionId.

:fa-brands-github: Show source on GitHub