@ai-sdk/google 3.0.62 → 3.0.64

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.
@@ -632,6 +632,11 @@ var googleLanguageModelOptions = lazySchema2(
632
632
  })
633
633
  )
634
634
  );
635
+ var VertexServiceTierMap = {
636
+ standard: "SERVICE_TIER_STANDARD",
637
+ flex: "SERVICE_TIER_FLEX",
638
+ priority: "SERVICE_TIER_PRIORITY"
639
+ };
635
640
 
636
641
  // src/google-prepare-tools.ts
637
642
  import {
@@ -1195,6 +1200,10 @@ var GoogleGenerativeAILanguageModel = class {
1195
1200
  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`
1196
1201
  });
1197
1202
  }
1203
+ let sanitizedServiceTier = googleOptions == null ? void 0 : googleOptions.serviceTier;
1204
+ if ((googleOptions == null ? void 0 : googleOptions.serviceTier) && isVertexProvider) {
1205
+ sanitizedServiceTier = VertexServiceTierMap[googleOptions.serviceTier];
1206
+ }
1198
1207
  const isGemmaModel = this.modelId.toLowerCase().startsWith("gemma-");
1199
1208
  const supportsFunctionResponseParts = this.modelId.startsWith("gemini-3");
1200
1209
  const { contents, systemInstruction } = convertToGoogleGenerativeAIMessages(
@@ -1265,7 +1274,7 @@ var GoogleGenerativeAILanguageModel = class {
1265
1274
  toolConfig,
1266
1275
  cachedContent: googleOptions == null ? void 0 : googleOptions.cachedContent,
1267
1276
  labels: googleOptions == null ? void 0 : googleOptions.labels,
1268
- serviceTier: googleOptions == null ? void 0 : googleOptions.serviceTier
1277
+ serviceTier: sanitizedServiceTier
1269
1278
  },
1270
1279
  warnings: [...warnings, ...toolWarnings],
1271
1280
  providerOptionsName