/** * Tool conversion utilities between LangChain and AI SDK formats */ import { BindToolsInput } from "@langchain/core/language_models/chat_models"; import { type ToolSet } from "ai"; /** * Convert LangChain tools to AI SDK ToolSet format * * Supports all BindToolsInput types: * - StructuredToolInterface (LangChain StructuredTool) * - RunnableToolLike (Runnable converted to tool via .asTool()) * - StructuredToolParams (minimal tool definition with name, schema, extras) * - ToolDefinition (OpenAI format: { type: "function", function: {...} }) * - Record (generic object with name and parameters) * * The AI SDK expects tools as a Record where each Tool * is created using the tool() helper function. */ export declare function convertToAISDKToolSet(tools: BindToolsInput[]): ToolSet;