import type { ContentBlock } from '@wrongstack/core/types'; import type { OpenAIToolCall } from './to-openai.js'; export interface OpenAIChoice { message: { role: string; content: string | null; tool_calls?: OpenAIToolCall[] | undefined; }; finish_reason: string | null; } export interface FromOpenAIOptions { /** * Called when a tool call's `arguments` field can't be parsed even after * the sanitizer pass. Callers can use this to emit a structured event, * log it, or surface it in a UI. The block is still appended with * `{ __raw_arguments }` so the tool gets *something* to fail on, but * silently producing garbage input is the kind of bug that wastes * debugging hours — this is the hook to find out. */ onParseFailure?: (info: { toolName: string; toolCallId: string; raw: string; }) => void; } export declare function contentFromOpenAI(choice: OpenAIChoice, opts?: FromOpenAIOptions): ContentBlock[]; //# sourceMappingURL=from-openai.d.ts.map