import type { AssistantMessage, Context } from "../types"; import { AssistantMessageEventStream } from "./event-stream"; export declare const MAX_EMPTY_COMPLETION_RETRIES = 2; export declare const EMPTY_COMPLETION_BASE_DELAY_MS = 500; /** * Whether a completed assistant message carries content worth delivering: a tool * call or any non-whitespace text. An empty/whitespace-only message — or one * that only ever produced thinking — is the "empty response" failure. */ export declare function hasVisibleAssistantContent(message: AssistantMessage): boolean; interface EmptyCompletionRetryOptions { signal?: AbortSignal; providerRetryWait?: (delayMs: number, signal?: AbortSignal) => Promise; } /** * Wrap a single-attempt provider stream with bounded empty-completion retries. * `attempt` MUST create a fresh request (and its own output message) on each * call so a retry never inherits stale metadata from an empty attempt. */ export declare function withEmptyCompletionRetry(model: M, context: Context, options: O | undefined, attempt: (model: M, context: Context, options?: O) => AssistantMessageEventStream): AssistantMessageEventStream; export {};