@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.
package/dist/genai.d.ts CHANGED
@@ -1824,7 +1824,7 @@ declare interface ContentDelta {
1824
1824
  /**
1825
1825
  * The delta content data for a content block.
1826
1826
  */
1827
- delta: ContentDelta.Text | ContentDelta.Image | ContentDelta.Audio | ContentDelta.Document | ContentDelta.Video | ContentDelta.ThoughtSummary | ContentDelta.ThoughtSignature | ContentDelta.FunctionCall | ContentDelta.CodeExecutionCall | ContentDelta.URLContextCall | ContentDelta.GoogleSearchCall | ContentDelta.MCPServerToolCall | ContentDelta.FileSearchCall | ContentDelta.GoogleMapsCall | ContentDelta.FunctionResult | ContentDelta.CodeExecutionResult | ContentDelta.URLContextResult | ContentDelta.GoogleSearchResult | ContentDelta.MCPServerToolResult | ContentDelta.FileSearchResult | ContentDelta.GoogleMapsResult;
1827
+ delta: ContentDelta.Text | ContentDelta.Image | ContentDelta.Audio | ContentDelta.Document | ContentDelta.Video | ContentDelta.ThoughtSummary | ContentDelta.ThoughtSignature | ContentDelta.FunctionCall | ContentDelta.CodeExecutionCall | ContentDelta.URLContextCall | ContentDelta.GoogleSearchCall | ContentDelta.MCPServerToolCall | ContentDelta.FileSearchCall | ContentDelta.GoogleMapsCall | ContentDelta.FunctionResult | ContentDelta.CodeExecutionResult | ContentDelta.URLContextResult | ContentDelta.GoogleSearchResult | ContentDelta.MCPServerToolResult | ContentDelta.FileSearchResult | ContentDelta.GoogleMapsResult | ContentDelta.TextAnnotation;
1828
1828
  event_type: 'content.delta';
1829
1829
  index: number;
1830
1830
  /**
@@ -1838,10 +1838,6 @@ declare namespace ContentDelta {
1838
1838
  interface Text {
1839
1839
  text: string;
1840
1840
  type: 'text';
1841
- /**
1842
- * Citation information for model-generated content.
1843
- */
1844
- annotations?: Array<InteractionsAPI.Annotation>;
1845
1841
  }
1846
1842
  interface Image {
1847
1843
  type: 'image';
@@ -2096,6 +2092,13 @@ declare namespace ContentDelta {
2096
2092
  */
2097
2093
  signature?: string;
2098
2094
  }
2095
+ interface TextAnnotation {
2096
+ type: 'text_annotation';
2097
+ /**
2098
+ * Citation information for model-generated content.
2099
+ */
2100
+ annotations?: Array<InteractionsAPI.Annotation>;
2101
+ }
2099
2102
  }
2100
2103
 
2101
2104
  /** The embedding generated from an input content. */
@@ -4467,7 +4470,7 @@ export declare interface GenerateContentConfig {
4467
4470
  service. If supplied, safety_settings must not be supplied.
4468
4471
  */
4469
4472
  modelArmorConfig?: ModelArmorConfig;
4470
- /** The service tier to use for the request. For example, SERVICE_TIER_FLEX. */
4473
+ /** The service tier to use for the request. For example, ServiceTier.FLEX. */
4471
4474
  serviceTier?: ServiceTier;
4472
4475
  }
4473
4476
 
@@ -9648,19 +9651,19 @@ export declare enum ServiceTier {
9648
9651
  /**
9649
9652
  * Default service tier, which is standard.
9650
9653
  */
9651
- SERVICE_TIER_UNSPECIFIED = "SERVICE_TIER_UNSPECIFIED",
9654
+ UNSPECIFIED = "unspecified",
9652
9655
  /**
9653
9656
  * Flex service tier.
9654
9657
  */
9655
- SERVICE_TIER_FLEX = "SERVICE_TIER_FLEX",
9658
+ FLEX = "flex",
9656
9659
  /**
9657
9660
  * Standard service tier.
9658
9661
  */
9659
- SERVICE_TIER_STANDARD = "SERVICE_TIER_STANDARD",
9662
+ STANDARD = "standard",
9660
9663
  /**
9661
9664
  * Priority service tier.
9662
9665
  */
9663
- SERVICE_TIER_PRIORITY = "SERVICE_TIER_PRIORITY"
9666
+ PRIORITY = "priority"
9664
9667
  }
9665
9668
 
9666
9669
  /**
package/dist/index.cjs CHANGED
@@ -1548,19 +1548,19 @@ exports.ServiceTier = void 0;
1548
1548
  /**
1549
1549
  * Default service tier, which is standard.
1550
1550
  */
1551
- ServiceTier["SERVICE_TIER_UNSPECIFIED"] = "SERVICE_TIER_UNSPECIFIED";
1551
+ ServiceTier["UNSPECIFIED"] = "unspecified";
1552
1552
  /**
1553
1553
  * Flex service tier.
1554
1554
  */
1555
- ServiceTier["SERVICE_TIER_FLEX"] = "SERVICE_TIER_FLEX";
1555
+ ServiceTier["FLEX"] = "flex";
1556
1556
  /**
1557
1557
  * Standard service tier.
1558
1558
  */
1559
- ServiceTier["SERVICE_TIER_STANDARD"] = "SERVICE_TIER_STANDARD";
1559
+ ServiceTier["STANDARD"] = "standard";
1560
1560
  /**
1561
1561
  * Priority service tier.
1562
1562
  */
1563
- ServiceTier["SERVICE_TIER_PRIORITY"] = "SERVICE_TIER_PRIORITY";
1563
+ ServiceTier["PRIORITY"] = "priority";
1564
1564
  })(exports.ServiceTier || (exports.ServiceTier = {}));
1565
1565
  /** Options for feature selection preference. */
1566
1566
  exports.FeatureSelectionPreference = void 0;
@@ -7429,7 +7429,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
7429
7429
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
7430
7430
  const USER_AGENT_HEADER = 'User-Agent';
7431
7431
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
7432
- const SDK_VERSION = '1.47.0'; // x-release-please-version
7432
+ const SDK_VERSION = '1.48.0'; // x-release-please-version
7433
7433
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
7434
7434
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
7435
7435
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -13475,8 +13475,9 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
13475
13475
  if (parentObject !== undefined && fromModelArmorConfig != null) {
13476
13476
  setValueByPath(parentObject, ['modelArmorConfig'], fromModelArmorConfig);
13477
13477
  }
13478
- if (getValueByPath(fromObject, ['serviceTier']) !== undefined) {
13479
- throw new Error('serviceTier parameter is not supported in Vertex AI.');
13478
+ const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
13479
+ if (parentObject !== undefined && fromServiceTier != null) {
13480
+ setValueByPath(parentObject, ['serviceTier'], fromServiceTier);
13480
13481
  }
13481
13482
  return toObject;
13482
13483
  }
package/dist/index.mjs CHANGED
@@ -1546,19 +1546,19 @@ var ServiceTier;
1546
1546
  /**
1547
1547
  * Default service tier, which is standard.
1548
1548
  */
1549
- ServiceTier["SERVICE_TIER_UNSPECIFIED"] = "SERVICE_TIER_UNSPECIFIED";
1549
+ ServiceTier["UNSPECIFIED"] = "unspecified";
1550
1550
  /**
1551
1551
  * Flex service tier.
1552
1552
  */
1553
- ServiceTier["SERVICE_TIER_FLEX"] = "SERVICE_TIER_FLEX";
1553
+ ServiceTier["FLEX"] = "flex";
1554
1554
  /**
1555
1555
  * Standard service tier.
1556
1556
  */
1557
- ServiceTier["SERVICE_TIER_STANDARD"] = "SERVICE_TIER_STANDARD";
1557
+ ServiceTier["STANDARD"] = "standard";
1558
1558
  /**
1559
1559
  * Priority service tier.
1560
1560
  */
1561
- ServiceTier["SERVICE_TIER_PRIORITY"] = "SERVICE_TIER_PRIORITY";
1561
+ ServiceTier["PRIORITY"] = "priority";
1562
1562
  })(ServiceTier || (ServiceTier = {}));
1563
1563
  /** Options for feature selection preference. */
1564
1564
  var FeatureSelectionPreference;
@@ -7427,7 +7427,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
7427
7427
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
7428
7428
  const USER_AGENT_HEADER = 'User-Agent';
7429
7429
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
7430
- const SDK_VERSION = '1.47.0'; // x-release-please-version
7430
+ const SDK_VERSION = '1.48.0'; // x-release-please-version
7431
7431
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
7432
7432
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
7433
7433
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -13473,8 +13473,9 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
13473
13473
  if (parentObject !== undefined && fromModelArmorConfig != null) {
13474
13474
  setValueByPath(parentObject, ['modelArmorConfig'], fromModelArmorConfig);
13475
13475
  }
13476
- if (getValueByPath(fromObject, ['serviceTier']) !== undefined) {
13477
- throw new Error('serviceTier parameter is not supported in Vertex AI.');
13476
+ const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
13477
+ if (parentObject !== undefined && fromServiceTier != null) {
13478
+ setValueByPath(parentObject, ['serviceTier'], fromServiceTier);
13478
13479
  }
13479
13480
  return toObject;
13480
13481
  }