Member Junction
    Preparing search index...

    Interface RealtimeResponseDoneFrame

    A response.done frame, declaring BOTH slots the OpenAI-compatible providers use for usage. See ResolveResponseDoneUsage.

    interface RealtimeResponseDoneFrame {
        response?: { usage?: unknown };
        usage?: unknown;
    }
    Index

    Properties

    Properties

    response?: { usage?: unknown }

    OpenAI populates usage here. xAI sends this present but EMPTY.

    Typed as unknown deliberately: this is untrusted wire data, and each provider SDK declares its own concrete usage interface (without the index signature RealtimeResponseDoneUsage carries). Accepting unknown lets every SDK's frame type be passed in directly — no cast at the call site — while ResolveResponseDoneUsage does the narrowing centrally.

    usage?: unknown

    xAI populates usage here, as a sibling of response. OpenAI omits it.