ai 5.0.18 → 5.0.19
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/CHANGELOG.md +6 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
@@ -1848,11 +1848,13 @@ async function parseToolCall({
|
|
1848
1848
|
return await doParseToolCall({ toolCall: repairedToolCall, tools });
|
1849
1849
|
}
|
1850
1850
|
} catch (error) {
|
1851
|
+
const parsedInput = await (0, import_provider_utils8.safeParseJSON)({ text: toolCall.input });
|
1852
|
+
const input = parsedInput.success ? parsedInput.value : toolCall.input;
|
1851
1853
|
return {
|
1852
1854
|
type: "tool-call",
|
1853
1855
|
toolCallId: toolCall.toolCallId,
|
1854
1856
|
toolName: toolCall.toolName,
|
1855
|
-
input
|
1857
|
+
input,
|
1856
1858
|
dynamic: true,
|
1857
1859
|
invalid: true,
|
1858
1860
|
error
|