@ai-sdk/google 3.0.88 → 3.0.89

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.
@@ -171,7 +171,7 @@ function isEmptyObjectSchema(jsonSchema) {
171
171
  import {
172
172
  UnsupportedFunctionalityError
173
173
  } from "@ai-sdk/provider";
174
- import { convertToBase64 } from "@ai-sdk/provider-utils";
174
+ import { convertToBase64, secureJsonParse } from "@ai-sdk/provider-utils";
175
175
  var SKIP_THOUGHT_SIGNATURE_VALIDATOR = "skip_thought_signature_validator";
176
176
  function getGoogleProviderOptions(providerOptions, providerOptionsName) {
177
177
  const namespaces = [
@@ -401,7 +401,7 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
401
401
  return {
402
402
  toolCall: {
403
403
  toolType: serverToolType,
404
- args: typeof part.input === "string" ? JSON.parse(part.input) : part.input,
404
+ args: typeof part.input === "string" ? secureJsonParse(part.input) : part.input,
405
405
  id: serverToolCallId
406
406
  },
407
407
  thoughtSignature: effectiveThoughtSignature