@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.
@@ -689,6 +689,11 @@ var googleLanguageModelOptions = lazySchema2(
689
689
  })
690
690
  )
691
691
  );
692
+ var VertexServiceTierMap = {
693
+ standard: "SERVICE_TIER_STANDARD",
694
+ flex: "SERVICE_TIER_FLEX",
695
+ priority: "SERVICE_TIER_PRIORITY"
696
+ };
692
697
 
693
698
  // src/google-prepare-tools.ts
694
699
  import {
@@ -1253,6 +1258,10 @@ var GoogleGenerativeAILanguageModel = class {
1253
1258
  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`
1254
1259
  });
1255
1260
  }
1261
+ let sanitizedServiceTier = googleOptions == null ? void 0 : googleOptions.serviceTier;
1262
+ if ((googleOptions == null ? void 0 : googleOptions.serviceTier) && isVertexProvider) {
1263
+ sanitizedServiceTier = VertexServiceTierMap[googleOptions.serviceTier];
1264
+ }
1256
1265
  const isGemmaModel = this.modelId.toLowerCase().startsWith("gemma-");
1257
1266
  const supportsFunctionResponseParts = this.modelId.startsWith("gemini-3");
1258
1267
  const { contents, systemInstruction } = convertToGoogleGenerativeAIMessages(
@@ -1329,7 +1338,7 @@ var GoogleGenerativeAILanguageModel = class {
1329
1338
  toolConfig,
1330
1339
  cachedContent: googleOptions == null ? void 0 : googleOptions.cachedContent,
1331
1340
  labels: googleOptions == null ? void 0 : googleOptions.labels,
1332
- serviceTier: googleOptions == null ? void 0 : googleOptions.serviceTier
1341
+ serviceTier: sanitizedServiceTier
1333
1342
  },
1334
1343
  warnings: [...warnings, ...toolWarnings],
1335
1344
  providerOptionsName