@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.
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 ? "4.0.0-beta.35" : "0.0.0-test";
10
+ var VERSION = true ? "4.0.0-beta.36" : "0.0.0-test";
11
11
 
12
12
  // src/google-generative-ai-embedding-model.ts
13
13
  import {
@@ -900,6 +900,11 @@ var googleLanguageModelOptions = lazySchema4(
900
900
  })
901
901
  )
902
902
  );
903
+ var VertexServiceTierMap = {
904
+ standard: "SERVICE_TIER_STANDARD",
905
+ flex: "SERVICE_TIER_FLEX",
906
+ priority: "SERVICE_TIER_PRIORITY"
907
+ };
903
908
 
904
909
  // src/google-prepare-tools.ts
905
910
  import {
@@ -1464,6 +1469,10 @@ var GoogleGenerativeAILanguageModel = class {
1464
1469
  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`
1465
1470
  });
1466
1471
  }
1472
+ let sanitizedServiceTier = googleOptions == null ? void 0 : googleOptions.serviceTier;
1473
+ if ((googleOptions == null ? void 0 : googleOptions.serviceTier) && isVertexProvider) {
1474
+ sanitizedServiceTier = VertexServiceTierMap[googleOptions.serviceTier];
1475
+ }
1467
1476
  const isGemmaModel = this.modelId.toLowerCase().startsWith("gemma-");
1468
1477
  const supportsFunctionResponseParts = this.modelId.startsWith("gemini-3");
1469
1478
  const { contents, systemInstruction } = convertToGoogleGenerativeAIMessages(
@@ -1540,7 +1549,7 @@ var GoogleGenerativeAILanguageModel = class {
1540
1549
  toolConfig,
1541
1550
  cachedContent: googleOptions == null ? void 0 : googleOptions.cachedContent,
1542
1551
  labels: googleOptions == null ? void 0 : googleOptions.labels,
1543
- serviceTier: googleOptions == null ? void 0 : googleOptions.serviceTier
1552
+ serviceTier: sanitizedServiceTier
1544
1553
  },
1545
1554
  warnings: [...warnings, ...toolWarnings],
1546
1555
  providerOptionsName