@google/genai 1.47.0 → 1.48.0

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.
@@ -1606,19 +1606,19 @@ exports.ServiceTier = void 0;
1606
1606
  /**
1607
1607
  * Default service tier, which is standard.
1608
1608
  */
1609
- ServiceTier["SERVICE_TIER_UNSPECIFIED"] = "SERVICE_TIER_UNSPECIFIED";
1609
+ ServiceTier["UNSPECIFIED"] = "unspecified";
1610
1610
  /**
1611
1611
  * Flex service tier.
1612
1612
  */
1613
- ServiceTier["SERVICE_TIER_FLEX"] = "SERVICE_TIER_FLEX";
1613
+ ServiceTier["FLEX"] = "flex";
1614
1614
  /**
1615
1615
  * Standard service tier.
1616
1616
  */
1617
- ServiceTier["SERVICE_TIER_STANDARD"] = "SERVICE_TIER_STANDARD";
1617
+ ServiceTier["STANDARD"] = "standard";
1618
1618
  /**
1619
1619
  * Priority service tier.
1620
1620
  */
1621
- ServiceTier["SERVICE_TIER_PRIORITY"] = "SERVICE_TIER_PRIORITY";
1621
+ ServiceTier["PRIORITY"] = "priority";
1622
1622
  })(exports.ServiceTier || (exports.ServiceTier = {}));
1623
1623
  /** Options for feature selection preference. */
1624
1624
  exports.FeatureSelectionPreference = void 0;
@@ -10117,8 +10117,9 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
10117
10117
  if (parentObject !== undefined && fromModelArmorConfig != null) {
10118
10118
  setValueByPath(parentObject, ['modelArmorConfig'], fromModelArmorConfig);
10119
10119
  }
10120
- if (getValueByPath(fromObject, ['serviceTier']) !== undefined) {
10121
- throw new Error('serviceTier parameter is not supported in Vertex AI.');
10120
+ const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
10121
+ if (parentObject !== undefined && fromServiceTier != null) {
10122
+ setValueByPath(parentObject, ['serviceTier'], fromServiceTier);
10122
10123
  }
10123
10124
  return toObject;
10124
10125
  }
@@ -12773,7 +12774,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
12773
12774
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
12774
12775
  const USER_AGENT_HEADER = 'User-Agent';
12775
12776
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
12776
- const SDK_VERSION = '1.47.0'; // x-release-please-version
12777
+ const SDK_VERSION = '1.48.0'; // x-release-please-version
12777
12778
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
12778
12779
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
12779
12780
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -1584,19 +1584,19 @@ var ServiceTier;
1584
1584
  /**
1585
1585
  * Default service tier, which is standard.
1586
1586
  */
1587
- ServiceTier["SERVICE_TIER_UNSPECIFIED"] = "SERVICE_TIER_UNSPECIFIED";
1587
+ ServiceTier["UNSPECIFIED"] = "unspecified";
1588
1588
  /**
1589
1589
  * Flex service tier.
1590
1590
  */
1591
- ServiceTier["SERVICE_TIER_FLEX"] = "SERVICE_TIER_FLEX";
1591
+ ServiceTier["FLEX"] = "flex";
1592
1592
  /**
1593
1593
  * Standard service tier.
1594
1594
  */
1595
- ServiceTier["SERVICE_TIER_STANDARD"] = "SERVICE_TIER_STANDARD";
1595
+ ServiceTier["STANDARD"] = "standard";
1596
1596
  /**
1597
1597
  * Priority service tier.
1598
1598
  */
1599
- ServiceTier["SERVICE_TIER_PRIORITY"] = "SERVICE_TIER_PRIORITY";
1599
+ ServiceTier["PRIORITY"] = "priority";
1600
1600
  })(ServiceTier || (ServiceTier = {}));
1601
1601
  /** Options for feature selection preference. */
1602
1602
  var FeatureSelectionPreference;
@@ -10095,8 +10095,9 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
10095
10095
  if (parentObject !== undefined && fromModelArmorConfig != null) {
10096
10096
  setValueByPath(parentObject, ['modelArmorConfig'], fromModelArmorConfig);
10097
10097
  }
10098
- if (getValueByPath(fromObject, ['serviceTier']) !== undefined) {
10099
- throw new Error('serviceTier parameter is not supported in Vertex AI.');
10098
+ const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
10099
+ if (parentObject !== undefined && fromServiceTier != null) {
10100
+ setValueByPath(parentObject, ['serviceTier'], fromServiceTier);
10100
10101
  }
10101
10102
  return toObject;
10102
10103
  }
@@ -12751,7 +12752,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
12751
12752
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
12752
12753
  const USER_AGENT_HEADER = 'User-Agent';
12753
12754
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
12754
- const SDK_VERSION = '1.47.0'; // x-release-please-version
12755
+ const SDK_VERSION = '1.48.0'; // x-release-please-version
12755
12756
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
12756
12757
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
12757
12758
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';