import type { Tool as OpenAITool, ResponseCreateParamsStreaming, ResponseInput, ResponseStreamEvent } from "openai/resources/responses/responses.js";
import type { Api, AssistantMessage, Context, Model, Tool, Usage } from "../types.js";
import type { AssistantMessageEventStream } from "../kit/event-stream.js";
import { type ProviderLifecycleHooks } from "./simple-options.js";
export interface OpenAIResponsesStreamOptions {
    serviceTier?: ResponseCreateParamsStreaming["service_tier"];
    applyServiceTierPricing?: (usage: Usage, serviceTier: ResponseCreateParamsStreaming["service_tier"] | undefined) => void;
}
export interface OpenAIRequestExecutionOptions<TRequest = unknown, TResponse = unknown> {
    hooks?: ProviderLifecycleHooks<TRequest, TResponse>;
    retryPolicy?: {
        maxAttempts?: number;
        baseDelayMs?: number;
    };
}
export declare function executeOpenAIRequest<TRequest, TResponse>(request: TRequest, executor: () => Promise<TResponse>, options?: OpenAIRequestExecutionOptions<TRequest, TResponse>): Promise<TResponse>;
export interface ConvertResponsesMessagesOptions {
    includeSystemPrompt?: boolean;
}
export interface ConvertResponsesToolsOptions {
    strict?: boolean | null;
}
export declare function convertResponsesMessages<TApi extends Api>(model: Model<TApi>, context: Context, allowedToolCallProviders: ReadonlySet<string>, options?: ConvertResponsesMessagesOptions): ResponseInput;
export declare function convertResponsesTools(tools: Tool[], options?: ConvertResponsesToolsOptions): OpenAITool[];
export declare function processResponsesStream<TApi extends Api>(openaiStream: AsyncIterable<ResponseStreamEvent>, output: AssistantMessage, stream: AssistantMessageEventStream, model: Model<TApi>, options?: OpenAIResponsesStreamOptions): Promise<void>;
