@ai-sdk/google 4.0.0-beta.35 → 4.0.0-beta.36

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.
@@ -695,6 +695,11 @@ var googleLanguageModelOptions = (0, import_provider_utils3.lazySchema)(
695
695
  })
696
696
  )
697
697
  );
698
+ var VertexServiceTierMap = {
699
+ standard: "SERVICE_TIER_STANDARD",
700
+ flex: "SERVICE_TIER_FLEX",
701
+ priority: "SERVICE_TIER_PRIORITY"
702
+ };
698
703
 
699
704
  // src/google-prepare-tools.ts
700
705
  var import_provider2 = require("@ai-sdk/provider");
@@ -1257,6 +1262,10 @@ var GoogleGenerativeAILanguageModel = class {
1257
1262
  message: `'streamFunctionCallArguments' is only supported on the Vertex AI API and will be ignored with the current Google provider (${this.config.provider}). See https://docs.cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling#streaming-fc`
1258
1263
  });
1259
1264
  }
1265
+ let sanitizedServiceTier = googleOptions == null ? void 0 : googleOptions.serviceTier;
1266
+ if ((googleOptions == null ? void 0 : googleOptions.serviceTier) && isVertexProvider) {
1267
+ sanitizedServiceTier = VertexServiceTierMap[googleOptions.serviceTier];
1268
+ }
1260
1269
  const isGemmaModel = this.modelId.toLowerCase().startsWith("gemma-");
1261
1270
  const supportsFunctionResponseParts = this.modelId.startsWith("gemini-3");
1262
1271
  const { contents, systemInstruction } = convertToGoogleGenerativeAIMessages(
@@ -1333,7 +1342,7 @@ var GoogleGenerativeAILanguageModel = class {
1333
1342
  toolConfig,
1334
1343
  cachedContent: googleOptions == null ? void 0 : googleOptions.cachedContent,
1335
1344
  labels: googleOptions == null ? void 0 : googleOptions.labels,
1336
- serviceTier: googleOptions == null ? void 0 : googleOptions.serviceTier
1345
+ serviceTier: sanitizedServiceTier
1337
1346
  },
1338
1347
  warnings: [...warnings, ...toolWarnings],
1339
1348
  providerOptionsName