import type { ModelMessage } from 'ai';
import type { Message } from '../../types/index.js';
import type { TestableMessage } from '../types.js';
/**
 * Checks if an assistant message is empty (no content and no tool calls).
 * Empty assistant messages cause API errors:
 * "400 Bad Request: Assistant message must have either content or tool_calls, but not none."
 *
 * Exported for testing purposes.
 */
export declare function isEmptyAssistantMessage(message: TestableMessage): boolean;
/**
 * Drop tool-result messages whose tool_call_id matches no tool_call in a
 * preceding assistant message. Orphaned tool results arise when history
 * compaction summarises an assistant(tool_calls) turn but keeps its tool
 * results verbatim; OpenAI-compatible providers reject the dangling result
 * (or return an empty completion). This is a defensive net for any path that
 * can orphan a result — the primary fix lives in the compaction slicer.
 *
 * Exported for testing.
 */
export declare function dropOrphanedToolResults(messages: Message[]): Message[];
/**
 * Convert our Message format to AI SDK v6 ModelMessage format
 *
 * Tool messages: Converted to AI SDK tool-result format with proper structure.
 * Orphaned tool results are dropped first (see dropOrphanedToolResults).
 */
export declare function convertToModelMessages(messages: Message[]): ModelMessage[];
//# sourceMappingURL=message-converter.d.ts.map