/**
 * The terminal, fully-materialized model response.
 *
 * A {@link Reply} is what a non-streaming call returns, and what a streaming
 * channel surfaces in its final `done` emission once every delta has been
 * folded together.
 */
import type { Block } from "./conversation";
/** Token accounting for a single model response. Cache tiers are absent when unused. */
export interface Usage {
    readonly inputTokens: number;
    readonly outputTokens: number;
    readonly cacheReadTokens?: number;
    readonly cacheWriteTokens?: number;
}
/**
 * Why the model stopped producing output.
 * - `complete`    — the model finished its turn naturally.
 * - `tool_calls`  — the model paused to request one or more tool invocations.
 * - `max_output`  — generation hit the output-token ceiling.
 * - `refusal`     — the model declined to answer.
 * - `aborted`     — the caller cancelled via an AbortSignal.
 * - `error`       — the request failed; see the channel's error emission.
 */
export type StopReason = "complete" | "tool_calls" | "max_output" | "refusal" | "aborted" | "error";
/** A complete assistant response, assembled from one model invocation. */
export interface Reply {
    readonly role: "assistant";
    readonly model: string;
    readonly blocks: readonly Block[];
    readonly usage: Usage;
    readonly stop: StopReason;
}
