LangChain 于 2026-09-28 发布 langchain==1.4.3(PyPI 已同步):init_chat_model 支持 AWS Bedrock Mantle 聊天模型(对接 langchain-aws 的 Mantle 接口);修复识别 GPT-6 结构化输出而无需 profiles;create_agent 在历史回放缺 tool result 时为非法 tool call 补 error ToolMessage;并净化 fallback 模型的 cache settings。相对 1.4.2 的变更集中在 #40837/#40844/#40530/#40886。

核心要点速览 (Key Takeaways)

  • ✓发版:langchain==1.4.3 / PyPI 1.4.3(2026-09-28)
  • ✓Bedrock Mantle:init_chat_model 接入 Mantle(OpenAI 兼容与 Anthropic Messages 端点,依赖 langchain-aws≥1.7.9 的 ChatOpenAIMantle 等)
  • ✓GPT-6:#40844 在无 profiles 时也能识别 GPT-6 structured output
  • ✓Agent 稳健性:#40530 create_agent 为可识别的非法 tool call 自动补 error ToolMessage,避免历史回放缺 result
  • ✓缓存:#40886 净化 fallback 模型的 cache settings,降低错误缓存键污染
🧭

阅读完核心要点?进一步了解模型实力与实际开销

7 大权威镜像天梯跑分与 29+ 款主流编程套餐横向比价测算

🔬

深度技术解析与实战评估

核心背景与行业痛点 Agent 框架要把「厂商新入口」和「工具调用脏历史」同时接住:AWS Bedrock Mantle 已通过 OpenAI 兼容与 Anthropic Messages 暴露模型,但 init_chat_model 若未识别就会逼开发者手写 provider 分支;GPT-6 结构化输出若仍依赖 profiles 会静默降级;create_agent 在提供商回放历史时遇到非法 tool call 却缺对应 tool result,会话直接崩。 ### 架构亮点与底层机制 [langchain==1.4.3](https://github.com/langchain-ai/langchain/releases/tag/langchain%3D%3D1.4.3) 相对 1.4.2 的要点:#40837 让 init_chat_model 支持 Bedrock Mantle(PR 说明 langchain-aws 1.7.9 已提供 ChatOpenAIMantle 等推荐接口);#40844 在无 profiles 时识别 GPT-6 structured output;#40530 为可识别的 invalid_tool_calls 补齐 error ToolMessage,满足历史回放对 tool result 的契约;#40886 净化 fallback 模型的 cache settings,避免错误缓存配置串味。另有 AGENTS.md 文档修正与 anyio 依赖上调。 ### 权威 Benchmark 与实测跑分对比 本点发版无公布 SWE-bench / AgentBench 等公开跑分;价值在 API 面修复与云厂商入口对齐。请在自有 Agent 回归:Mantle 模型是否经 init_chat_model 一次创建成功;含非法 tool call 的 checkpoint 是否可继续跑;fallback 链路上的 prompt cache 是否仍命中预期键。 ### 开发者实战落地与开箱指南 升级:pip install -U "langchain==1.4.3",并按需升级 langchain-aws(Mantle 建议 ≥1.7.9)。用 init_chat_model(...) 选择 Mantle 聊天模型;依赖 GPT-6 structured output 的链路可去掉多余 profile 配置做冒烟;长期运行的 create_agent 会话升级后观察非法 tool call 是否自动落成 error ToolMessage。文档:LangChain docs、Python reference、Release、PyPI。