/** * @license * Copyright 2025 Vybestack LLC * SPDX-License-Identifier: Apache-2.0 */ /** * OpenAI Responses function parameter schema format */ export interface OpenAIResponsesParameters { type: 'object'; properties: Record; required: string[]; [key: string]: unknown; } /** * OpenAI Responses property schema (recursive for nested objects/arrays) */ export interface OpenAIResponsesPropertySchema { type: string; description?: string; enum?: string[]; items?: OpenAIResponsesPropertySchema; properties?: Record; required?: string[]; minimum?: number; maximum?: number; minLength?: number; maxLength?: number; default?: unknown; } /** * OpenAI Responses tool format */ export interface OpenAIResponsesTool { type: 'function'; name: string; description: string | null; parameters: OpenAIResponsesParameters; strict: null; } /** * Input format from Gemini-style tool declarations */ interface GeminiToolDeclaration { name: string; description?: string; parametersJsonSchema?: unknown; parameters?: unknown; } /** * Convert a Gemini-style schema to OpenAI Responses parameter format. * Handles: * - Uppercase type enums → lowercase strings * - Missing required fields → adds empty array * - String numeric values → proper numbers * - Recursive property/items conversion */ export declare function convertSchemaToOpenAIResponses(schema: unknown): OpenAIResponsesParameters; /** * Convert an array of Gemini-style tool declarations to OpenAI Responses format */ export declare function convertToolsToOpenAIResponses(geminiTools?: Array<{ functionDeclarations?: GeminiToolDeclaration[]; }>): OpenAIResponsesTool[] | undefined; export {};