@ai-sdk/langchain 2.0.320 → 2.0.321

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/langchain",
3
- "version": "2.0.320",
3
+ "version": "2.0.321",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@ai-sdk/provider-utils": "4.0.62",
29
- "ai": "6.0.312"
29
+ "ai": "6.0.313"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@langchain/core": "^1.1.5",
package/src/utils.ts CHANGED
@@ -17,7 +17,10 @@ import {
17
17
  type ProviderMetadata,
18
18
  type JSONValue,
19
19
  } from 'ai';
20
- import { convertUint8ArrayToBase64 } from '@ai-sdk/provider-utils';
20
+ import {
21
+ convertUint8ArrayToBase64,
22
+ secureJsonParse,
23
+ } from '@ai-sdk/provider-utils';
21
24
 
22
25
  import {
23
26
  type LangGraphEventState,
@@ -1887,7 +1890,7 @@ export function processLangGraphEvent(
1887
1890
  let args: unknown;
1888
1891
  try {
1889
1892
  args = functionData?.arguments
1890
- ? JSON.parse(functionData.arguments)
1893
+ ? secureJsonParse(functionData.arguments)
1891
1894
  : {};
1892
1895
  } catch {
1893
1896
  args = {};