Member Junction
    Preparing search index...

    Interface RealtimeClientSessionPrepResult

    Result of RealtimeClientSessionService.PrepareClientSession.

    On success, RealtimeClientSessionPrepResult.ClientConfig is the server-minted config the browser applies, and RealtimeClientSessionPrepResult.SessionParams is the params the server used to mint it (handy for the resolver to echo/persist). On failure, Success is false and ErrorMessage explains why — this method never throws for an unresolvable model/key.

    interface RealtimeClientSessionPrepResult {
        AvatarStatus?: RealtimeAvatarStatus;
        ClientConfig?: ClientRealtimeSessionConfig;
        ClientPolicy?: RealtimeSessionClientPolicy;
        CoAgentRunID?: string;
        CoAgentRunStepID?: string;
        DriverClass?: string;
        EffectiveConfig?: RealtimeCoAgentConfig;
        ErrorMessage?: string;
        ModelID?: string;
        ModelName?: string;
        NarrationInstructionsTemplate?: string;
        NarrationPaceMs?: number;
        PromptRunID?: string;
        SessionParams?: RealtimeSessionParams;
        Success: boolean;
    }
    Index

    Properties

    AvatarStatus?: RealtimeAvatarStatus

    The live avatar the session asked for and whether it shows: granted, or audio only and why (ResolveRealtimeAvatarStatus). Absent when the voiced agent asked for no avatar (its video setting is off). The transport layer returns it in the mint result, so the call can say why it shows no avatar.

    The minted client-direct session config (token + provider session config). Present on success.

    The resolved channel scope and client-tool tiers for the browser to activate — present only when the input carried PrepareClientSessionInput.ChannelCandidates. The transport layer returns it in the mint result and persists the in-session channel keys on the session.

    CoAgentRunID?: string

    ID of the server-side co-agent observability AIAgentRun created for this session. Present when the run was created successfully; absent when run creation was skipped or failed (observability is best-effort and never fails the prepare). Delegated target-agent runs nest under this run via ParentRunID, and RealtimeClientSessionService.FinalizeCoAgentRun closes it when the session ends.

    CoAgentRunStepID?: string

    ID of the single MJ: AI Agent Run Steps row created under RealtimeClientSessionPrepResult.CoAgentRunID for the realtime session's system prompt (StepType Prompt, TargetID = the system prompt, TargetLogID = RealtimeClientSessionPrepResult.PromptRunID). It makes the co-agent run's Timeline non-empty. Present only when the co-agent's system prompt resolved AND the step saved (step creation is best-effort, like the runs themselves). Finalized alongside the runs by RealtimeClientSessionService.FinalizeCoAgentRun.

    DriverClass?: string

    The DriverClass of the vendor that actually ran the session (e.g. OpenAIRealtime, ElevenLabsRealtime). Present on success.

    Disclosed for OBSERVABILITY — on the default-model path the framework picks the vendor itself, so without this a caller cannot tell which one spoke, and cannot diagnose a voice that did not land (issue #3530). Plumbed all the way to the browser as StartRealtimeClientSessionResult.DriverClass (RealtimeClientSessionResolver), because on the client-direct path the caller IS the browser — a disclosure that stopped at this service boundary would deliver no observability to anyone.

    It is deliberately NOT a pre-prepare resolution API: a caller does not need to know the vendor in advance, because RealtimeVoicePersona.voice carries a voice to whichever vendor is chosen. Re-deriving the vendor in order to pre-file provider-keyed settings duplicates a decision the framework owns.

    EffectiveConfig?: RealtimeCoAgentConfig

    The RESOLVED effective realtime configuration for this session (type defaults ← agent config ← runtime overrides, deep-merged + normalized). Present on success — {} when no layer configured anything. Surfaced so the transport layer can echo it to the client (client drivers apply provider voice settings client-side in the client-direct topology).

    ErrorMessage?: string

    A human-readable failure reason. Present on failure.

    ModelID?: string

    The MJ: AI Models row id of the realtime model the session was minted with. Present on success.

    ModelName?: string

    The display name of the realtime model the session was minted with. Present on success.

    NarrationInstructionsTemplate?: string

    The DB-driven progress-narration instruction template (the Realtime Co-Agent - Progress Narration prompt's TemplateText, containing a {{ progressMessage }} placeholder). undefined when that prompt is not present in metadata — clients fall back to their built-in narration instruction text.

    NarrationPaceMs?: number

    The effective narration pace (realtime.narration.paceMs) — minimum gap in ms between spoken progress updates. undefined when not configured (clients/runners use their built-in default). In the CLIENT-DIRECT topology narration pacing is enforced client-side, so this is surfaced for the browser; the server-bridged runner consumes it directly via RealtimeSessionRunnerDeps.NarrationPaceMs.

    PromptRunID?: string

    ID of the server-side co-agent AIPromptRun linked to RealtimeClientSessionPrepResult.CoAgentRunID. Present only when the co-agent's system prompt resolved (so a prompt run could be created).

    SessionParams?: RealtimeSessionParams

    The session params the server built (system prompt, model, tools). Present on success.

    Success: boolean

    Whether the client session config was minted successfully.