#11736·langchainjs

在启用 exactOptionalPropertyTypes 时, createAgent 会拒绝 TavilySearch

作者: MinaFayez9创建于 2026年9月26日更新于 2026年9月26日
标签bug

I'm using the official TavilySearch integration from @LangChain/tavily directly in the tools array passed to createAgent(). With exactOptionalPropertyTypes: true, TypeScript rejects TavilySearch as not assignable to the ClientTool | ServerTool type expected by createAgent(). I expect the following to type-check without a cast or wrapper:

内容来源: langchain-ai/langchainjs