@langchain/langgraph 0.2.20 → 0.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -185,7 +185,7 @@ Is there anything else you'd like to know about the weather in New York or any o
185
185
  <summary>Initialize the model and tools.</summary>
186
186
 
187
187
  - We use `ChatAnthropic` as our LLM. **NOTE:** We need make sure the model knows that it has these tools available to call. We can do this by converting the LangChain tools into the format for Anthropic tool calling using the `.bindTools()` method.
188
- - We define the tools we want to use -- a weather tool in our case. See the documentation [here](https://js.langchain.com/docs/modules/agents/tools/dynamic) on how to create your own tools.
188
+ - We define the tools we want to use -- a weather tool in our case. See the documentation [here](https://js.langchain.com/docs/how_to/custom_tools/) on how to create your own tools.
189
189
  </details>
190
190
 
191
191
  2. <details>
@@ -648,7 +648,16 @@ class Pregel extends runnables_1.Runnable {
648
648
  * @param options.debug Whether to print debug information during execution.
649
649
  */
650
650
  async stream(input, options) {
651
- return super.stream(input, options);
651
+ // The ensureConfig method called internally defaults recursionLimit to 25 if not
652
+ // passed directly in `options`.
653
+ // There is currently no way in _streamIterator to determine whether this was
654
+ // set by by ensureConfig or manually by the user, so we specify the bound value here
655
+ // and override if it is passed as an explicit param in `options`.
656
+ const config = {
657
+ recursionLimit: this.config?.recursionLimit,
658
+ ...options,
659
+ };
660
+ return super.stream(input, config);
652
661
  }
653
662
  async prepareSpecs(config, options) {
654
663
  const configForManaged = {
@@ -644,7 +644,16 @@ export class Pregel extends Runnable {
644
644
  * @param options.debug Whether to print debug information during execution.
645
645
  */
646
646
  async stream(input, options) {
647
- return super.stream(input, options);
647
+ // The ensureConfig method called internally defaults recursionLimit to 25 if not
648
+ // passed directly in `options`.
649
+ // There is currently no way in _streamIterator to determine whether this was
650
+ // set by by ensureConfig or manually by the user, so we specify the bound value here
651
+ // and override if it is passed as an explicit param in `options`.
652
+ const config = {
653
+ recursionLimit: this.config?.recursionLimit,
654
+ ...options,
655
+ };
656
+ return super.stream(input, config);
648
657
  }
649
658
  async prepareSpecs(config, options) {
650
659
  const configForManaged = {
@@ -420,7 +420,6 @@ class RemoteGraph extends runnables_1.Runnable {
420
420
  xray: config?.xray,
421
421
  });
422
422
  return new graph_1.Graph({
423
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
424
423
  nodes: this._getDrawableNodes(graph.nodes),
425
424
  edges: graph.edges,
426
425
  });
@@ -417,7 +417,6 @@ export class RemoteGraph extends Runnable {
417
417
  xray: config?.xray,
418
418
  });
419
419
  return new DrawableGraph({
420
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
421
420
  nodes: this._getDrawableNodes(graph.nodes),
422
421
  edges: graph.edges,
423
422
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/langgraph",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
4
4
  "description": "LangGraph",
5
5
  "type": "module",
6
6
  "engines": {
@@ -32,7 +32,7 @@
32
32
  "license": "MIT",
33
33
  "dependencies": {
34
34
  "@langchain/langgraph-checkpoint": "~0.0.10",
35
- "@langchain/langgraph-sdk": "~0.0.20",
35
+ "@langchain/langgraph-sdk": "~0.0.21",
36
36
  "uuid": "^10.0.0",
37
37
  "zod": "^3.23.8"
38
38
  },