llmwire - v2.2.0
    Preparing search index...

    Interface DoneChunk

    The last chunk: why the model stopped and, where the provider reports it, the token usage for the whole call.

    interface DoneChunk {
        durationMs?: number;
        finishReason: FinishReason;
        modelUsed?: string;
        requestId?: string;
        timeToFirstTokenMs?: number;
        toolCalls?: ToolCall[];
        type: "done";
        usage?: TokenUsage;
    }
    Index
    durationMs?: number

    Wall time for the whole stream (set by the factory).

    finishReason: FinishReason
    modelUsed?: string
    requestId?: string

    When the provider sends one.

    timeToFirstTokenMs?: number

    ms until the first text chunk (set by the factory).

    toolCalls?: ToolCall[]
    type: "done"
    usage?: TokenUsage