[PR #1499] [MERGED] feat(langgraph): Allow partially applying tool calls via postModelHook #1497

Closed
opened 2026-02-15 20:15:59 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs/pull/1499
Author: @dqbd
Created: 8/5/2025
Status: Merged
Merged: 8/5/2025
Merged by: @dqbd

Base: mainHead: dqbd/cra-v2-post-model-hook


📝 Commits (3)

  • c025fea feat(langgraph): Allow partially applying tool calls via postModelHook
  • fa56ec3 Fix partial tool call application for v1 as well
  • 49f9296 Add changeset

📊 Changes

4 files changed (+119 additions, -11 deletions)

View changed files

.changeset/moody-bags-take.md (+5 -0)
📝 libs/langgraph/src/prebuilt/react_agent_executor.ts (+23 -4)
📝 libs/langgraph/src/prebuilt/tool_node.ts (+28 -7)
📝 libs/langgraph/src/tests/prebuilt.test.ts (+63 -0)

📄 Description

Previously, adding ToolMessages in post model hook will cause ToolNode to crash. Now, ToolNode will skip tool calls which already have an appropriate ToolMessage.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langgraphjs/pull/1499 **Author:** [@dqbd](https://github.com/dqbd) **Created:** 8/5/2025 **Status:** ✅ Merged **Merged:** 8/5/2025 **Merged by:** [@dqbd](https://github.com/dqbd) **Base:** `main` ← **Head:** `dqbd/cra-v2-post-model-hook` --- ### 📝 Commits (3) - [`c025fea`](https://github.com/langchain-ai/langgraphjs/commit/c025fea24a8477fc8bfa96db9e8386883da69deb) feat(langgraph): Allow partially applying tool calls via postModelHook - [`fa56ec3`](https://github.com/langchain-ai/langgraphjs/commit/fa56ec3d21f8455e86068b4887a61613372ddafa) Fix partial tool call application for v1 as well - [`49f9296`](https://github.com/langchain-ai/langgraphjs/commit/49f92966542d48cc442f29084126ddb386812181) Add changeset ### 📊 Changes **4 files changed** (+119 additions, -11 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/moody-bags-take.md` (+5 -0) 📝 `libs/langgraph/src/prebuilt/react_agent_executor.ts` (+23 -4) 📝 `libs/langgraph/src/prebuilt/tool_node.ts` (+28 -7) 📝 `libs/langgraph/src/tests/prebuilt.test.ts` (+63 -0) </details> ### 📄 Description Previously, adding ToolMessages in post model hook will cause ToolNode to crash. Now, ToolNode will skip tool calls which already have an appropriate ToolMessage. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 20:15:59 -05:00
yindo closed this issue 2026-02-15 20:15:59 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#1497