Member Junction
    Preparing search index...

    Interface OpenAIRealtimeProfile

    Provider profile for the OpenAI-Realtime-protocol driver family.

    OpenAIRealtime implements the full OpenAI Realtime wire protocol once; OpenAI-compatible providers (e.g. xAI Grok Voice) subclass it and supply their own profile instead of cloning the driver. The profile carries the per-provider knobs — transcription model, turn detection, GA feature gates — so protocol/feature work lands here once and flows to every compatible provider, while providers that have NOT confirmed a GA feature keep it gated off (a one-line flip later).

    interface OpenAIRealtimeProfile {
        deferInitialConfigUntilSessionCreated: boolean;
        foldInitialContextIntoPrompt: boolean;
        inputTranscriptionModel?: string;
        providerKey: string;
        supportsLiveReconfigure: boolean;
        supportsMcpTools: boolean;
        supportsParallelToolCalls: boolean;
        supportsReasoningEffort: boolean;
        supportsVoiceOutput: boolean;
        unexpectedCloseMessage: string;
        buildTurnDetection(
            disableAutoResponse: boolean,
        ): RealtimeAudioInputTurnDetection;
        mapEffortLevel(effortLevel: string): string;
    }
    Index

    Properties

    deferInitialConfigUntilSessionCreated: boolean

    Whether the initial session.update must wait for the server's session.created frame. OpenAI's socket drops config sent during the handshake; xAI's accepts it immediately.

    foldInitialContextIntoPrompt: boolean

    When true, InitialContext is folded into the system prompt under a "Prior context" heading instead of being seeded as a separate user conversation item — for compat endpoints with no guaranteed history-seeding channel (HuggingFace speech-to-speech).

    inputTranscriptionModel?: string

    The ASR model for USER input transcription (opt-in pass; see OPENAI_INPUT_TRANSCRIPTION_MODEL). undefined means the provider transcribes natively (e.g. a cascaded STT stage) and no transcription block is sent unless the Config bag supplies inputTranscriptionModel.

    providerKey: string

    The ClientRealtimeSessionConfig.Provider key the browser uses to pick its client driver.

    supportsLiveReconfigure: boolean

    Whether the provider supports LIVE turn-mode reconfiguration via a partial session.update (drives both the session's Capabilities.CanReconfigureTurnMode and whether Reconfigure emits anything). Compat endpoints without create_response gating set false.

    supportsMcpTools: boolean

    Whether the provider accepts remote MCP server tools (type: "mcp") in session.tools.

    supportsParallelToolCalls: boolean

    Whether the provider accepts the GA parallel_tool_calls session field.

    supportsReasoningEffort: boolean

    Whether the provider accepts the GA reasoning.effort session field.

    supportsVoiceOutput: boolean

    Whether the provider accepts an output voice at audio.output.voice.

    unexpectedCloseMessage: string

    The fatal-error message surfaced when the socket closes unexpectedly.

    Methods

    • Builds the audio.input.turn_detection block. disableAutoResponse comes from the Config bag (meeting mode: the bridge, not server VAD, decides when the model speaks). Return undefined to omit the block and accept the provider default.

      Parameters

      • disableAutoResponse: boolean

      Returns RealtimeAudioInputTurnDetection

    • Maps MJ's NORMALIZED effort level (numeric 1–100 or named — the same vocabulary as ChatParams.effortLevel) onto THIS provider's realtime effort literals. Providers whose endpoint uses a different level set override this seam; return undefined to drop an unmappable value (it is never sent raw). Only consulted when supportsReasoningEffort is on.

      Parameters

      • effortLevel: string

      Returns string