import type { ChatMessage, LlmUsage } from '../../../../core/llm/types.js';
import type { ToolCall, ToolDefinition } from '../../../../core/types.js';
type OpenAiCompatibleChatCompletionMessage = {
    role: 'system' | 'user' | 'assistant' | 'tool';
    content: string | null;
    tool_call_id?: string;
    tool_calls?: OpenAiCompatibleToolCall[];
};
type OpenAiCompatibleToolCall = {
    id: string;
    type: 'function';
    function: {
        name: string;
        arguments: string;
    };
};
type OpenAiCompatibleFunctionTool = {
    type: 'function';
    function: {
        name: string;
        description: string;
        parameters: Record<string, unknown>;
    };
};
/**
 * Wire codec for providers that implement the OpenAI-compatible
 * `/chat/completions` shape. Keep provider-family quirks here so the agent
 * loop and hosts only depend on Heddle's neutral chat/tool contracts.
 */
export declare class OpenAiCompatibleCodec {
    static toMessages(messages: ChatMessage[]): OpenAiCompatibleChatCompletionMessage[];
    static toTools(tools: ToolDefinition[]): OpenAiCompatibleFunctionTool[];
    static extractContent(response: unknown): string | undefined;
    static extractToolCalls(response: unknown): ToolCall[] | undefined;
    static extractUsage(response: unknown): LlmUsage | undefined;
    private static toToolCall;
    private static firstMessage;
    private static numberField;
}
export {};
//# sourceMappingURL=openai-compatible-codec.d.ts.map