import { OpenAIResponseFormat } from "../types"; export declare function normalizeModelName(model: string): string; export declare const CODE_BLOCK_TYPES: string[]; /** * Options for JSON parsing behavior */ export interface ParseJsonOptions { /** * Enable AI-powered JSON fixing as a fallback strategy. * Warning: This adds cost and latency. Disabled by default. * @default false */ enableAiFix?: boolean; /** * Maximum number of times to retry AI fixing if it returns broken JSON. * Only applies when enableAiFix is true. * @default 2 */ maxRetries?: number; /** * Internal: Current recursion depth. Do not set manually. * @internal */ _recursionDepth?: number; } /** * Tries to parse JSON from the given content string according to the specified * response format. If the response format is 'json' or a JSON schema object, it * will attempt to parse the content using multiple strategies. If any of the * strategies succeed, it will return the parsed JSON object. If all of them fail, * it will throw an error. * * @param content The content string to parse * @param responseFormat The desired format of the response * @param options Optional parsing configuration * @returns The parsed JSON object or null if it fails */ export declare function parseResponse(content: string, responseFormat: OpenAIResponseFormat, options?: ParseJsonOptions): Promise;