import type { Context } from "@earendil-works/pi-ai";
import type { Prompt } from "./prompt.js";
import type { LlmTokenUsage } from "./types.js";
export declare function promptToContext(prompt: Prompt): Context;
export declare function resolveLlmErrorMessage(error: unknown): string;
export declare function isRetryableLlmError(error: unknown): boolean;
export declare function computeRetryDelayMs(attempt: number): number;
export declare function sleep(ms: number): Promise<void>;
export declare function withTimeoutFallback<T>({ promise, timeoutMs, fallback, }: {
    promise: Promise<T>;
    timeoutMs: number;
    fallback: T;
}): Promise<T>;
export declare function streamUsageWithTimeout({ result, timeoutMs, }: {
    result: Promise<{
        usage?: unknown;
    }>;
    timeoutMs: number;
}): Promise<LlmTokenUsage | null>;
export declare function isOpenAiGpt5Model(provider: string, model: string): boolean;
export declare function resolveEffectiveTemperature({ provider, model, temperature, }: {
    provider: string;
    model: string;
    temperature?: number;
}): number | undefined;
export declare function shouldRetryGpt5WithoutTokenCap({ provider, model, maxOutputTokens, error, }: {
    provider: string;
    model: string;
    maxOutputTokens?: number;
    error: unknown;
}): boolean;
export declare function resolveGoogleEmptyResponseFallbackModelId(modelId: string): string | null;
export declare function isGoogleEmptySummaryError(error: unknown): boolean;
