langchain-core==1.5.4 リリースlangchain-core==1.5.4
匿名の公開いいねです。記事の保存・お気に入りではなく、Featured、Top 3、重要度、掲載順位には影響しません。仕組みとプライバシーAnonymous public likes are reactions, not saved articles or bookmarks. They do not affect Featured, Top 3, importance, or listing order.How it works and privacy
Pydantic 2.14との互換性修正、StructuredPromptの呼び出し元kwargsへの破壊的変更の防止、RootModelのツール引数スキーマ保持など複数のバグ修正が含まれる。
langchain-core 1.5.4 ships bug fixes including Pydantic 2.14 compatibility, preventing StructuredPrompt from mutating caller kwargs, and preserving flat tool args schema for RootModel runnables.
要約と収集メタデータをもとに生成した AI 解説本文です。元記事全文の転載・翻訳ではありません。This AI explainer is generated from the summaries and collected metadata, not from a reproduction or translation of the full source article.
LLMアプリケーション開発フレームワークLangChainの中核パッケージ「langchain-core&tag=langchain-core&entry=152874e59b1278f2">langchain-core」のバージョン1.5.4が公開された。今回は新機能追加ではなく、前バージョン1.5.3以降に見つかった複数の不具合を修正するメンテナンスリリースと位置づけられる。
langchain-core&tag=langchain-core&entry=152874e59b1278f2">langchain-coreは、プロンプトやツール、実行フロー(Runnable)といった、LangChainを含むエコシステム全体が依存する基盤的な抽象化を提供するパッケージだ。上位のライブラリや各種の連携モジュールがこのコアの上に構築されているため、安定性の維持は幅広い利用者に影響する。
主要な修正の一つが、データ検証ライブラリPydanticの2.14系との互換性対応である。Pydanticは型注釈に基づくバリデーションを行うPythonの定番ライブラリで、多くのフレームワークが内部で採用している。Pydantic側のバージョン更新に追随することで、最新の依存環境でも動作する見込みだ。
また、構造化プロンプトを扱うStructuredPromptが呼び出し元のkwargs(キーワード引数)を書き換えてしまう問題も修正された。呼び出し側が渡した引数が意図せず変更されると、再利用時に予期しない挙動を招く可能性があるため、こうした副作用を防ぐ変更は堅牢性の向上につながると見られる。
さらに、RootModelを用いたRunnableに対して、ツールの引数スキーマをフラットな形で保持する修正も含まれる。エージェントがツールを呼び出す際のスキーマ表現に関わる部分で、ツール定義の解釈をより正確に保つ狙いがあると考えられる。抜粋では他にも修正項目が示唆されており、全容は公式のリリースノートで確認できる。
LangChainはエージェント開発の分野で広く使われており、各社のモデルとの連携基盤としても採用が進んでいる。パッチレベルの更新であっても、依存関係の互換性やプロンプト処理の安定性は実運用に直結しやすい。利用者はリリースノートを確認のうえ、自身の環境への適用を検討したい。
LangChain has published langchain-core&tag=langchain-core&entry=152874e59b1278f2">langchain-core 1.5.4, a maintenance release that concentrates on bug fixes rather than new capabilities. For teams building agents and language-model applications on the LangChain stack, patch releases like this one matter because langchain-core&tag=langchain-core&entry=152874e59b1278f2">langchain-core is the foundational package that most other LangChain libraries depend on. Small regressions in its runnables, prompt objects, and tool-handling logic can propagate widely, so incremental fixes help keep downstream projects stable.
The most prominent change in this release is a compatibility fix for Pydantic 2.14 (#39328). Pydantic is the data-validation library that LangChain relies on heavily to define schemas for tool arguments, structured outputs, and configuration objects. Because langchain-core&tag=langchain-core&entry=152874e59b1278f2">langchain-core supports a broad range of Pydantic versions, each new Pydantic release can surface incompatibilities that break validation or schema generation. The fix is intended to keep langchain-core&tag=langchain-core&entry=152874e59b1278f2">langchain-core functioning correctly against Pydantic 2.14, which is important given how quickly the Pydantic maintainers ship point releases. Users who upgrade their environment and pull in a newer Pydantic could otherwise encounter errors that originate in that dependency rather than in their own code.
A second fix stops StructuredPrompt from mutating caller kwargs (#39174). StructuredPrompt is a prompt construction utility used when an application needs the model to return data conforming to a defined structure. The reported issue appears to have been that the object modified the keyword-argument dictionary passed into it, which is a side effect that can produce hard-to-trace bugs when the same arguments are reused elsewhere in a program. Preventing in-place mutation of caller-supplied data is a common defensive-programming practice, and this change brings StructuredPrompt in line with that expectation.
The release also preserves the flat tool args schema for RootModel runnables (#39307). In LangChain, tools expose an argument schema so that a model can understand what inputs a function expects and generate a correctly shaped call. RootModel is a Pydantic construct used to wrap a single value or a non-dictionary root type. The fix ensures that when a runnable is defined around a RootModel, the resulting tool argument schema remains flat rather than being nested or otherwise restructured, which helps models produce valid tool calls and keeps behavior consistent with other tool definitions. The source notes indicate at least one additional fix beyond these, though the changelog entry is truncated, so the full set of adjustments should be confirmed against the official release notes.
For readers less familiar with the ecosystem, langchain-core&tag=langchain-core&entry=152874e59b1278f2">langchain-core sits at the bottom of the LangChain architecture. It defines the core abstractions such as runnables, messages, prompts, output parsers, and the tool interface, while higher-level packages like langchain, the various provider integrations, and the LangGraph library for building stateful agent workflows build on top of it. Because these pieces are versioned somewhat independently, keeping the core package robust against dependency shifts is a recurring maintenance task. The version number, 1.5.4, follows semantic-versioning conventions in which the final digit signals a patch focused on fixes rather than new interfaces, so upgrading from 1.5.3 is likely to be low risk for most projects.
The Pydantic-related work in particular reflects a broader reality of the Python AI tooling landscape: frameworks that lean on validation libraries must track their release cadence closely. Pydantic's v2 line, which was rewritten with a Rust-based core for performance, has continued to evolve, and libraries that depend on it periodically need compatibility patches to avoid breakage. LangChain is not alone here; many agent and data-pipeline frameworks pin or test against specific Pydantic ranges for the same reason. Adjacent projects such as instructor and various structured-output tools face similar pressures.
Practically, developers running langchain-core&tag=langchain-core&entry=152874e59b1278f2">langchain-core should review the linked pull requests and their own dependency pins before upgrading, especially if they use StructuredPrompt or define tools around RootModel types. Those who have deferred moving to Pydantic 2.14 may find this release removes a blocker. As always with patch releases, the changes are targeted and incremental, and teams with comprehensive test suites are best positioned to verify that the fixes behave as expected in their specific configurations before deploying to production.
本ページの本文と要約は AI による自動生成です。日本語版と英語版は言語ごとに独立して生成されるため、表現や詳しさが異なる場合があります。正確性は元記事 (github.com) をご確認ください。The body and summaries are AI-generated independently for each language, so wording and detail may differ. Verify accuracy at the original source (github.com).