import type { ChatMessage, ToolDefinition } from "./agent-execution-contracts.js";
export type StructuredOutputConfig = {
    mode: "json_object";
} | {
    mode: "json_schema";
    name: string;
    schema: Record<string, unknown>;
    strict?: boolean;
};
export interface LLMRequest {
    model: string;
    messages: ChatMessage[];
    tools?: ToolDefinition[];
    toolChoice?: "auto" | "none" | "required" | {
        type: "function";
        name: string;
    };
    temperature?: number;
    topP?: number;
    maxTokens?: number;
    reasoning?: {
        effort: "minimal" | "low" | "medium" | "high" | "xhigh";
        includeEncryptedReasoning?: boolean;
    };
    maxToolCalls?: number;
    prefixMessage?: string;
    streamRequired?: boolean;
    disableBuiltinTools?: boolean;
    builtinTools?: Array<{
        type: string;
        config?: Record<string, unknown>;
    }>;
    previousResponseId?: string;
    store?: boolean;
    storeExpireAt?: number;
    instructions?: string;
    structuredOutput?: StructuredOutputConfig;
    caching?: {
        type: "enabled" | "disabled";
        prefix?: boolean;
    };
    contextManagement?: {
        edits: Array<Record<string, unknown>>;
    };
    cachedContent?: string;
    prediction?: {
        type: "content";
        content: string;
    };
    promptCacheKey?: string;
    promptCacheRetention?: "in_memory" | "24h";
    serviceTier?: "auto" | "default" | "flex" | "priority";
    openaiBuiltinTools?: Array<{
        type: string;
        [key: string]: unknown;
    }>;
    conversationId?: string;
    parallelToolCalls?: boolean;
    textVerbosity?: "low" | "medium" | "high";
}
export type LLMChunk = {
    type: "delta";
    text: string;
} | {
    type: "tool_call_delta";
    index: number;
    id?: string;
    name?: string;
    arguments: string;
} | {
    type: "reasoning_delta";
    text: string;
} | {
    type: "reasoning_block_complete";
    thinking: string;
    signature: string;
} | {
    type: "usage";
    promptTokens: number;
    completionTokens: number;
    reasoningTokens?: number;
    cacheReadTokens?: number;
    cacheCreationTokens?: number;
} | {
    type: "response_id";
    id: string;
} | {
    type: "builtin_tool_status";
    toolType: string;
    event: string;
    data?: Record<string, unknown>;
} | {
    type: "annotations";
    annotations: Array<{
        type: string;
        url?: string;
        title?: string;
        [key: string]: unknown;
    }>;
} | {
    type: "error";
    message: string;
} | {
    type: "done";
    finishReason: string;
};
export interface AccumulatedToolCall {
    id: string;
    name: string;
    arguments: string;
}
export interface LLMTransport {
    stream(request: LLMRequest, apiKey: string, signal?: AbortSignal): AsyncGenerator<LLMChunk>;
    complete?(request: {
        model: string;
        prompt: string;
        suffix?: string;
        maxTokens?: number;
        temperature?: number;
        stop?: string[];
    }, apiKey: string, signal?: AbortSignal): AsyncGenerator<unknown>;
}
export declare function accumulateToolCalls(accumulator: Map<number, AccumulatedToolCall>, chunk: LLMChunk & {
    type: "tool_call_delta";
}): void;
