快速结论:这个报错发生在 langchain_core.utils.function_calling.create_schema_from_function 中:当同时传入 filter_args 和 include_injected=False 时,include_injected 被静默忽略,导致 InjectedToolArg 标注的敏感参数泄漏到工具 schema 中。核心报错为 core: create_schema_from_function ignores include_injected=False when filter_args is provided。优先确认你是否在同一个调用中同时使用了这两个参数,并升级到包含官方修复的 langchain-core 版本。
适用环境:Issue 确认涉及 langchain-core 包;触发代码使用 Annotated[str, InjectedToolArg] 标注参数,并调用 create_schema_from_function(..., filter_args=..., include_injected=False)</code
参考来源
AI 工具推荐
想把多个 AI 模型放在一个入口?
GamsGo AI 集成 ChatGPT、DeepSeek、Gemini、Claude、Midjourney、Veo 等常用模型,适合写作、绘图、视频和日常 AI 工作流。
推广链接:通过此链接购买,我可能获得佣金,不影响你的价格。
这个方案解决了吗?
可以继续搜索完整报错,或查看同一工具的其他排查指南。


