import type { AnthropicToolDef } from '../anthropic-direct/types.js'; import type { ToolCall, ToolResult } from '../anthropic-direct/types.js'; import type { AccumulatedToolCall } from './translate.js'; import type { OpenAIMessage } from './messages.js'; export interface OpenAIFunctionTool { type: 'function'; function: { name: string; description?: string; parameters: Record; }; } export declare function toolDefsToOpenAIFunctions(defs: readonly AnthropicToolDef[]): OpenAIFunctionTool[]; export declare function accumulatedToolCallsToToolCalls(calls: readonly AccumulatedToolCall[], signal: AbortSignal): { calls: ToolCall[]; parseErrors: Map; }; export interface OpenAIAssistantToolCallMessage { role: 'assistant'; content: string | null; tool_calls: Array<{ id: string; type: 'function'; function: { name: string; arguments: string; }; }>; reasoning_content?: string; } export declare function assistantMessageWithToolCalls(accumulatedText: string, toolCalls: readonly AccumulatedToolCall[], reasoningText?: string): OpenAIAssistantToolCallMessage; export interface OpenAIToolResultMessage { role: 'tool'; tool_call_id: string; content: string; } export declare function toolResultsToMessages(results: readonly { call: ToolCall; result: ToolResult; }[]): OpenAIToolResultMessage[]; export declare function toolImageFollowupMessage(results: readonly { call: ToolCall; result: ToolResult; }[], opts: { vision: boolean; }): OpenAIMessage | undefined; export declare function summarizeToolCalls(calls: readonly AccumulatedToolCall[]): string;