import { ConversationMessage } from "../generated/graphql-types.js";
/**
 * OpenAI message format
 */
export interface OpenAIMessage {
    role: "system" | "user" | "assistant" | "tool";
    content?: string | Array<{
        type: "text" | "image_url";
        text?: string;
        image_url?: {
            url: string;
        };
    }>;
    tool_calls?: Array<{
        id: string;
        type: "function";
        function: {
            name: string;
            arguments: string;
        };
    }>;
    tool_call_id?: string;
}
export interface OpenAIResponsesTextContentPart {
    type: "input_text";
    text: string;
}
export interface OpenAIResponsesImageContentPart {
    type: "input_image";
    image_url: string;
    detail: "low" | "high" | "auto";
}
export type OpenAIResponsesContentPart = OpenAIResponsesTextContentPart | OpenAIResponsesImageContentPart;
export interface OpenAIResponsesMessageItem {
    type: "message";
    role: "user" | "assistant";
    content: string | OpenAIResponsesContentPart[];
    phase?: "commentary" | "final_answer";
}
export interface OpenAIResponsesFunctionCallItem {
    type: "function_call";
    call_id: string;
    name: string;
    arguments: string;
    id?: string;
}
export interface OpenAIResponsesFunctionCallOutputItem {
    type: "function_call_output";
    call_id: string;
    output: string;
    id?: string;
}
export type OpenAIResponsesInputItem = OpenAIResponsesMessageItem | OpenAIResponsesFunctionCallItem | OpenAIResponsesFunctionCallOutputItem | Record<string, unknown>;
export interface OpenAIResponsesToolDefinition {
    type: "function";
    name: string;
    description?: string;
    parameters: Record<string, unknown>;
    strict: false;
}
/**
 * Anthropic message format
 */
export interface AnthropicMessage {
    role: "user" | "assistant";
    content: string | Array<{
        type: "text" | "image" | "tool_use" | "tool_result";
        text?: string;
        source?: {
            type: "base64";
            media_type: string;
            data: string;
        };
        id?: string;
        name?: string;
        input?: unknown;
        tool_use_id?: string;
        content?: string | Array<{
            type: "text" | "image";
            text?: string;
            source?: {
                type: "base64";
                media_type: string;
                data: string;
            };
        }>;
    }>;
}
export interface AnthropicSystemBlock {
    type: "text";
    text: string;
    cache_control?: {
        type: "ephemeral";
    };
}
/**
 * Google message format
 */
export interface GoogleMessage {
    role: "user" | "model";
    parts: Array<{
        text?: string;
        inlineData?: {
            mimeType: string;
            data: string;
        };
        functionCall?: {
            name: string;
            args: unknown;
        };
        functionResponse?: {
            name: string;
            response: unknown;
        };
    }>;
}
/**
 * Format GraphQL conversation messages for OpenAI SDK
 */
export declare function formatMessagesForOpenAI(messages: ConversationMessage[]): OpenAIMessage[];
export declare function extractInstructionsForOpenAIResponses(messages: ConversationMessage[]): string | undefined;
export declare function extractSystemInstructionParts(messages: ConversationMessage[]): string[];
export declare function formatMessagesForOpenAIResponsesInitialRound(messages: ConversationMessage[]): OpenAIResponsesInputItem[];
export declare function buildResponsesFunctionCallOutputItems(toolMessages: ConversationMessage[]): OpenAIResponsesFunctionCallOutputItem[];
export declare const buildOpenAIResponsesFunctionCallOutputItems: typeof buildResponsesFunctionCallOutputItems;
export declare function formatToolsForOpenAIResponses(tools: Array<{
    name: string;
    description?: string | null;
    schema?: string | null;
}> | undefined): OpenAIResponsesToolDefinition[] | undefined;
/**
 * Format GraphQL conversation messages for Anthropic SDK
 */
export declare function formatMessagesForAnthropic(messages: ConversationMessage[]): {
    system?: AnthropicSystemBlock[];
    messages: AnthropicMessage[];
};
/**
 * Format GraphQL conversation messages for Google SDK
 */
export declare function formatMessagesForGoogle(messages: ConversationMessage[]): GoogleMessage[];
/**
 * Cohere message format
 * Note: For Cohere v7 SDK, messages are handled differently:
 * - Current message is passed as 'message' parameter
 * - Previous messages are passed as 'chatHistory' array
 */
export interface CohereMessage {
    role: "USER" | "CHATBOT" | "SYSTEM" | "TOOL";
    message: string;
    tool_calls?: Array<{
        id: string;
        name: string;
        parameters: Record<string, any>;
    }>;
    tool_results?: Array<{
        call: {
            name: string;
            parameters: Record<string, any>;
        };
        outputs: Array<{
            output: string;
        }>;
    }>;
}
/**
 * Format GraphQL conversation messages for Cohere SDK
 */
export declare function formatMessagesForCohere(messages: ConversationMessage[]): CohereMessage[];
/**
 * Mistral message format
 */
export interface MistralMessage {
    role: "system" | "user" | "assistant" | "tool";
    content: string | Array<{
        type: "text" | "image_url";
        text?: string;
        image_url?: string;
    }>;
    tool_calls?: Array<{
        id: string;
        function: {
            name: string;
            arguments: string;
        };
    }>;
    tool_call_id?: string;
}
/**
 * Format GraphQL conversation messages for Mistral SDK
 */
export declare function formatMessagesForMistral(messages: ConversationMessage[]): MistralMessage[];
/**
 * Bedrock Claude message format (Converse API)
 */
export interface BedrockMessage {
    role: "user" | "assistant";
    content: string | Array<{
        type?: "text" | "image";
        text?: string;
        image?: {
            format: "png" | "jpeg" | "gif" | "webp";
            source: {
                bytes: string;
            };
        };
        toolUse?: {
            toolUseId: string;
            name: string;
            input: unknown;
        };
        toolResult?: {
            toolUseId: string;
            content: Array<{
                text?: string;
                image?: {
                    format: "png" | "jpeg" | "gif" | "webp";
                    source: {
                        bytes: string;
                    };
                };
            }>;
        };
    }>;
}
/**
 * Format GraphQL conversation messages for Bedrock SDK (Claude models)
 */
export declare function formatMessagesForBedrock(messages: ConversationMessage[]): {
    system?: string;
    messages: BedrockMessage[];
};
