@ai-sdk/google 3.0.87 → 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.
package/dist/index.mjs CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  } from "@ai-sdk/provider-utils";
8
8
 
9
9
  // src/version.ts
10
- var VERSION = true ? "3.0.87" : "0.0.0-test";
10
+ var VERSION = true ? "3.0.89" : "0.0.0-test";
11
11
 
12
12
  // src/google-generative-ai-embedding-model.ts
13
13
  import {
@@ -116,7 +116,7 @@ var googleEmbeddingModelOptions = lazySchema2(
116
116
  var GoogleGenerativeAIEmbeddingModel = class {
117
117
  constructor(modelId, config) {
118
118
  this.specificationVersion = "v3";
119
- this.maxEmbeddingsPerCall = 2048;
119
+ this.maxEmbeddingsPerCall = 100;
120
120
  this.supportsParallelCalls = true;
121
121
  this.modelId = modelId;
122
122
  this.config = config;
@@ -411,7 +411,7 @@ function isEmptyObjectSchema(jsonSchema) {
411
411
  import {
412
412
  UnsupportedFunctionalityError
413
413
  } from "@ai-sdk/provider";
414
- import { convertToBase64 } from "@ai-sdk/provider-utils";
414
+ import { convertToBase64, secureJsonParse } from "@ai-sdk/provider-utils";
415
415
  var SKIP_THOUGHT_SIGNATURE_VALIDATOR = "skip_thought_signature_validator";
416
416
  function getGoogleProviderOptions(providerOptions, providerOptionsName) {
417
417
  const namespaces = [
@@ -641,7 +641,7 @@ function convertToGoogleGenerativeAIMessages(prompt, options) {
641
641
  return {
642
642
  toolCall: {
643
643
  toolType: serverToolType,
644
- args: typeof part.input === "string" ? JSON.parse(part.input) : part.input,
644
+ args: typeof part.input === "string" ? secureJsonParse(part.input) : part.input,
645
645
  id: serverToolCallId
646
646
  },
647
647
  thoughtSignature: effectiveThoughtSignature
@@ -4009,7 +4009,7 @@ function buildGoogleInteractionsStreamTransform({
4009
4009
  }
4010
4010
 
4011
4011
  // src/interactions/convert-to-google-interactions-input.ts
4012
- import { convertToBase64 as convertToBase643 } from "@ai-sdk/provider-utils";
4012
+ import { convertToBase64 as convertToBase643, secureJsonParse as secureJsonParse2 } from "@ai-sdk/provider-utils";
4013
4013
  function getTopLevelMediaType(mediaType) {
4014
4014
  const slashIndex = mediaType.indexOf("/");
4015
4015
  return slashIndex === -1 ? mediaType : mediaType.substring(0, slashIndex);
@@ -4249,7 +4249,7 @@ function compactPromptForPreviousInteraction({
4249
4249
  }
4250
4250
  function safeParseToolArgs(input) {
4251
4251
  try {
4252
- const parsed = JSON.parse(input);
4252
+ const parsed = secureJsonParse2(input);
4253
4253
  if (parsed != null && typeof parsed === "object" && !Array.isArray(parsed)) {
4254
4254
  return parsed;
4255
4255
  }