// GENERATED CODE! DO NOT MODIFY BY HAND!

// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { CodexResponseHandoffMode } from "../CodexResponseHandoffMode";
import type { RealtimeConversationVersion } from "../RealtimeConversationVersion";
import type { RealtimeOutputModality } from "../RealtimeOutputModality";
import type { RealtimeVoice } from "../RealtimeVoice";
import type { ThreadRealtimeInitialItem } from "./ThreadRealtimeInitialItem";
import type { ThreadRealtimeStartTransport } from "./ThreadRealtimeStartTransport";

/**
 * EXPERIMENTAL - start a thread-scoped realtime session.
 */
export type ThreadRealtimeStartParams = { threadId: string,
/**
 * Leaves Codex response handoffs to the client's explicit append calls instead of forwarding
 * them automatically. Defaults to false.
 */
clientManagedHandoffs?: boolean | null,
/**
 * 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.
 */
flushTranscriptTailOnSessionEnd?: boolean | null,
/**
 * Sends automatic Codex responses as realtime conversation items instead of handoff appends.
 */
codexResponsesAsItems?: boolean | null,
/**
 * Optional prefix added to automatic Codex response items when `codexResponsesAsItems` is true.
 */
codexResponseItemPrefix?: string | null,
/**
 * Selects how automatic Codex responses are routed in Frameless Bidi sessions. Omitted values
 * default to `thinking`. Realtime V1 and V2 ignore this setting.
 */
codexResponseHandoffMode?: CodexResponseHandoffMode | null,
/**
 * Overrides BEM channel prefixes by `analysis`, `commentary`, or `final`.
 * Omitted channels retain their default uppercase bracketed prefixes.
 */
codexResponseHandoffChannelPrefixes?: { [key in string]?: Array<string> } | null,
/**
 * Overrides the configured realtime model for this session only.
 */
model?: string | null,
/**
 * 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.
 */
outputModality: RealtimeOutputModality,
/**
 * Set to false to start without Codex's startup context. Omitted or null includes it.
 */
includeStartupContext?: boolean | null,
/**
 * 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.
 */
initialItems?: Array<ThreadRealtimeInitialItem> | null, prompt?: string | null | null, realtimeSessionId?: string | null, transport?: ThreadRealtimeStartTransport | null,
/**
 * Overrides the configured realtime protocol version for this session only.
 */
version?: RealtimeConversationVersion | null, voice?: RealtimeVoice | null, };
