@aws-sdk/client-bedrock-runtime 3.777.0 → 3.779.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-cjs/index.js CHANGED
@@ -30,6 +30,7 @@ __export(index_exports, {
30
30
  BedrockRuntime: () => BedrockRuntime,
31
31
  BedrockRuntimeClient: () => BedrockRuntimeClient,
32
32
  BedrockRuntimeServiceException: () => BedrockRuntimeServiceException,
33
+ CachePointType: () => CachePointType,
33
34
  ConflictException: () => ConflictException,
34
35
  ContentBlock: () => ContentBlock,
35
36
  ContentBlockDelta: () => ContentBlockDelta,
@@ -582,6 +583,9 @@ var GuardrailTrace = {
582
583
  DISABLED: "disabled",
583
584
  ENABLED: "enabled"
584
585
  };
586
+ var CachePointType = {
587
+ DEFAULT: "default"
588
+ };
585
589
  var DocumentFormat = {
586
590
  CSV: "csv",
587
591
  DOC: "doc",
@@ -689,6 +693,7 @@ var ContentBlock;
689
693
  if (value.toolUse !== void 0) return visitor.toolUse(value.toolUse);
690
694
  if (value.toolResult !== void 0) return visitor.toolResult(value.toolResult);
691
695
  if (value.guardContent !== void 0) return visitor.guardContent(value.guardContent);
696
+ if (value.cachePoint !== void 0) return visitor.cachePoint(value.cachePoint);
692
697
  if (value.reasoningContent !== void 0) return visitor.reasoningContent(value.reasoningContent);
693
698
  return visitor._(value.$unknown[0], value.$unknown[1]);
694
699
  }, "visit");
@@ -713,6 +718,7 @@ var SystemContentBlock;
713
718
  SystemContentBlock2.visit = /* @__PURE__ */ __name((value, visitor) => {
714
719
  if (value.text !== void 0) return visitor.text(value.text);
715
720
  if (value.guardContent !== void 0) return visitor.guardContent(value.guardContent);
721
+ if (value.cachePoint !== void 0) return visitor.cachePoint(value.cachePoint);
716
722
  return visitor._(value.$unknown[0], value.$unknown[1]);
717
723
  }, "visit");
718
724
  })(SystemContentBlock || (SystemContentBlock = {}));
@@ -736,6 +742,7 @@ var Tool;
736
742
  ((Tool2) => {
737
743
  Tool2.visit = /* @__PURE__ */ __name((value, visitor) => {
738
744
  if (value.toolSpec !== void 0) return visitor.toolSpec(value.toolSpec);
745
+ if (value.cachePoint !== void 0) return visitor.cachePoint(value.cachePoint);
739
746
  return visitor._(value.$unknown[0], value.$unknown[1]);
740
747
  }, "visit");
741
748
  })(Tool || (Tool = {}));
@@ -988,6 +995,7 @@ var ContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
988
995
  if (obj.toolResult !== void 0) return { toolResult: obj.toolResult };
989
996
  if (obj.guardContent !== void 0)
990
997
  return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) };
998
+ if (obj.cachePoint !== void 0) return { cachePoint: obj.cachePoint };
991
999
  if (obj.reasoningContent !== void 0) return { reasoningContent: import_smithy_client.SENSITIVE_STRING };
992
1000
  if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
993
1001
  }, "ContentBlockFilterSensitiveLog");
@@ -999,6 +1007,7 @@ var SystemContentBlockFilterSensitiveLog = /* @__PURE__ */ __name((obj) => {
999
1007
  if (obj.text !== void 0) return { text: obj.text };
1000
1008
  if (obj.guardContent !== void 0)
1001
1009
  return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) };
1010
+ if (obj.cachePoint !== void 0) return { cachePoint: obj.cachePoint };
1002
1011
  if (obj.$unknown !== void 0) return { [obj.$unknown[0]]: "UNKNOWN" };
1003
1012
  }, "SystemContentBlockFilterSensitiveLog");
1004
1013
  var ConverseRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({
@@ -1786,6 +1795,7 @@ var de_ValidationException_event = /* @__PURE__ */ __name(async (output, context
1786
1795
  }, "de_ValidationException_event");
1787
1796
  var se_ContentBlock = /* @__PURE__ */ __name((input, context) => {
1788
1797
  return ContentBlock.visit(input, {
1798
+ cachePoint: /* @__PURE__ */ __name((value) => ({ cachePoint: (0, import_smithy_client._json)(value) }), "cachePoint"),
1789
1799
  document: /* @__PURE__ */ __name((value) => ({ document: se_DocumentBlock(value, context) }), "document"),
1790
1800
  guardContent: /* @__PURE__ */ __name((value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }), "guardContent"),
1791
1801
  image: /* @__PURE__ */ __name((value) => ({ image: se_ImageBlock(value, context) }), "image"),
@@ -1901,6 +1911,7 @@ var se_ReasoningContentBlock = /* @__PURE__ */ __name((input, context) => {
1901
1911
  }, "se_ReasoningContentBlock");
1902
1912
  var se_SystemContentBlock = /* @__PURE__ */ __name((input, context) => {
1903
1913
  return SystemContentBlock.visit(input, {
1914
+ cachePoint: /* @__PURE__ */ __name((value) => ({ cachePoint: (0, import_smithy_client._json)(value) }), "cachePoint"),
1904
1915
  guardContent: /* @__PURE__ */ __name((value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }), "guardContent"),
1905
1916
  text: /* @__PURE__ */ __name((value) => ({ text: value }), "text"),
1906
1917
  _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_")
@@ -1913,6 +1924,7 @@ var se_SystemContentBlocks = /* @__PURE__ */ __name((input, context) => {
1913
1924
  }, "se_SystemContentBlocks");
1914
1925
  var se_Tool = /* @__PURE__ */ __name((input, context) => {
1915
1926
  return Tool.visit(input, {
1927
+ cachePoint: /* @__PURE__ */ __name((value) => ({ cachePoint: (0, import_smithy_client._json)(value) }), "cachePoint"),
1916
1928
  toolSpec: /* @__PURE__ */ __name((value) => ({ toolSpec: se_ToolSpecification(value, context) }), "toolSpec"),
1917
1929
  _: /* @__PURE__ */ __name((name, value) => ({ [name]: value }), "_")
1918
1930
  });
@@ -2006,6 +2018,11 @@ var de_AsyncInvokeSummary = /* @__PURE__ */ __name((output, context) => {
2006
2018
  });
2007
2019
  }, "de_AsyncInvokeSummary");
2008
2020
  var de_ContentBlock = /* @__PURE__ */ __name((output, context) => {
2021
+ if (output.cachePoint != null) {
2022
+ return {
2023
+ cachePoint: (0, import_smithy_client._json)(output.cachePoint)
2024
+ };
2025
+ }
2009
2026
  if (output.document != null) {
2010
2027
  return {
2011
2028
  document: de_DocumentBlock(output.document, context)
@@ -2557,6 +2574,7 @@ var paginateListAsyncInvokes = (0, import_core.createPaginator)(BedrockRuntimeCl
2557
2574
  GuardrailWordPolicyAction,
2558
2575
  GuardrailManagedWordType,
2559
2576
  GuardrailTrace,
2577
+ CachePointType,
2560
2578
  DocumentFormat,
2561
2579
  DocumentSource,
2562
2580
  GuardrailConverseImageFormat,
@@ -235,6 +235,9 @@ export const GuardrailTrace = {
235
235
  DISABLED: "disabled",
236
236
  ENABLED: "enabled",
237
237
  };
238
+ export const CachePointType = {
239
+ DEFAULT: "default",
240
+ };
238
241
  export const DocumentFormat = {
239
242
  CSV: "csv",
240
243
  DOC: "doc",
@@ -363,6 +366,8 @@ export var ContentBlock;
363
366
  return visitor.toolResult(value.toolResult);
364
367
  if (value.guardContent !== undefined)
365
368
  return visitor.guardContent(value.guardContent);
369
+ if (value.cachePoint !== undefined)
370
+ return visitor.cachePoint(value.cachePoint);
366
371
  if (value.reasoningContent !== undefined)
367
372
  return visitor.reasoningContent(value.reasoningContent);
368
373
  return visitor._(value.$unknown[0], value.$unknown[1]);
@@ -391,6 +396,8 @@ export var SystemContentBlock;
391
396
  return visitor.text(value.text);
392
397
  if (value.guardContent !== undefined)
393
398
  return visitor.guardContent(value.guardContent);
399
+ if (value.cachePoint !== undefined)
400
+ return visitor.cachePoint(value.cachePoint);
394
401
  return visitor._(value.$unknown[0], value.$unknown[1]);
395
402
  };
396
403
  })(SystemContentBlock || (SystemContentBlock = {}));
@@ -419,6 +426,8 @@ export var Tool;
419
426
  Tool.visit = (value, visitor) => {
420
427
  if (value.toolSpec !== undefined)
421
428
  return visitor.toolSpec(value.toolSpec);
429
+ if (value.cachePoint !== undefined)
430
+ return visitor.cachePoint(value.cachePoint);
422
431
  return visitor._(value.$unknown[0], value.$unknown[1]);
423
432
  };
424
433
  })(Tool || (Tool = {}));
@@ -670,6 +679,8 @@ export const ContentBlockFilterSensitiveLog = (obj) => {
670
679
  return { toolResult: obj.toolResult };
671
680
  if (obj.guardContent !== undefined)
672
681
  return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) };
682
+ if (obj.cachePoint !== undefined)
683
+ return { cachePoint: obj.cachePoint };
673
684
  if (obj.reasoningContent !== undefined)
674
685
  return { reasoningContent: SENSITIVE_STRING };
675
686
  if (obj.$unknown !== undefined)
@@ -684,6 +695,8 @@ export const SystemContentBlockFilterSensitiveLog = (obj) => {
684
695
  return { text: obj.text };
685
696
  if (obj.guardContent !== undefined)
686
697
  return { guardContent: GuardrailConverseContentBlockFilterSensitiveLog(obj.guardContent) };
698
+ if (obj.cachePoint !== undefined)
699
+ return { cachePoint: obj.cachePoint };
687
700
  if (obj.$unknown !== undefined)
688
701
  return { [obj.$unknown[0]]: "UNKNOWN" };
689
702
  };
@@ -672,6 +672,7 @@ const de_ValidationException_event = async (output, context) => {
672
672
  };
673
673
  const se_ContentBlock = (input, context) => {
674
674
  return ContentBlock.visit(input, {
675
+ cachePoint: (value) => ({ cachePoint: _json(value) }),
675
676
  document: (value) => ({ document: se_DocumentBlock(value, context) }),
676
677
  guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
677
678
  image: (value) => ({ image: se_ImageBlock(value, context) }),
@@ -793,6 +794,7 @@ const se_ReasoningContentBlock = (input, context) => {
793
794
  };
794
795
  const se_SystemContentBlock = (input, context) => {
795
796
  return SystemContentBlock.visit(input, {
797
+ cachePoint: (value) => ({ cachePoint: _json(value) }),
796
798
  guardContent: (value) => ({ guardContent: se_GuardrailConverseContentBlock(value, context) }),
797
799
  text: (value) => ({ text: value }),
798
800
  _: (name, value) => ({ [name]: value }),
@@ -807,6 +809,7 @@ const se_SystemContentBlocks = (input, context) => {
807
809
  };
808
810
  const se_Tool = (input, context) => {
809
811
  return Tool.visit(input, {
812
+ cachePoint: (value) => ({ cachePoint: _json(value) }),
810
813
  toolSpec: (value) => ({ toolSpec: se_ToolSpecification(value, context) }),
811
814
  _: (name, value) => ({ [name]: value }),
812
815
  });
@@ -906,6 +909,11 @@ const de_AsyncInvokeSummary = (output, context) => {
906
909
  });
907
910
  };
908
911
  const de_ContentBlock = (output, context) => {
912
+ if (output.cachePoint != null) {
913
+ return {
914
+ cachePoint: _json(output.cachePoint),
915
+ };
916
+ }
909
917
  if (output.document != null) {
910
918
  return {
911
919
  document: de_DocumentBlock(output.document, context),
@@ -67,6 +67,7 @@ declare const ApplyGuardrailCommand_base: {
67
67
  * // sensitiveInformationPolicyUnits: Number("int"), // required
68
68
  * // sensitiveInformationPolicyFreeUnits: Number("int"), // required
69
69
  * // contextualGroundingPolicyUnits: Number("int"), // required
70
+ * // contentPolicyImageUnits: Number("int"),
70
71
  * // },
71
72
  * // action: "NONE" || "GUARDRAIL_INTERVENED", // required
72
73
  * // outputs: [ // GuardrailOutputContentList // required
@@ -146,6 +147,7 @@ declare const ApplyGuardrailCommand_base: {
146
147
  * // sensitiveInformationPolicyUnits: Number("int"), // required
147
148
  * // sensitiveInformationPolicyFreeUnits: Number("int"), // required
148
149
  * // contextualGroundingPolicyUnits: Number("int"), // required
150
+ * // contentPolicyImageUnits: Number("int"),
149
151
  * // },
150
152
  * // guardrailCoverage: { // GuardrailCoverage
151
153
  * // textCharacters: { // GuardrailTextCharactersCoverage
@@ -140,6 +140,9 @@ declare const ConverseCommand_base: {
140
140
  * },
141
141
  * },
142
142
  * },
143
+ * cachePoint: { // CachePointBlock
144
+ * type: "default", // required
145
+ * },
143
146
  * reasoningContent: { // ReasoningContentBlock Union: only one key present
144
147
  * reasoningText: { // ReasoningTextBlock
145
148
  * text: "STRING_VALUE", // required
@@ -168,6 +171,9 @@ declare const ConverseCommand_base: {
168
171
  * },
169
172
  * },
170
173
  * },
174
+ * cachePoint: {
175
+ * type: "default", // required
176
+ * },
171
177
  * },
172
178
  * ],
173
179
  * inferenceConfig: { // InferenceConfiguration
@@ -188,6 +194,7 @@ declare const ConverseCommand_base: {
188
194
  * json: "DOCUMENT_VALUE",
189
195
  * },
190
196
  * },
197
+ * cachePoint: "<CachePointBlock>",
191
198
  * },
192
199
  * ],
193
200
  * toolChoice: { // ToolChoice Union: only one key present
@@ -303,6 +310,9 @@ declare const ConverseCommand_base: {
303
310
  * // },
304
311
  * // },
305
312
  * // },
313
+ * // cachePoint: { // CachePointBlock
314
+ * // type: "default", // required
315
+ * // },
306
316
  * // reasoningContent: { // ReasoningContentBlock Union: only one key present
307
317
  * // reasoningText: { // ReasoningTextBlock
308
318
  * // text: "STRING_VALUE", // required
@@ -319,6 +329,8 @@ declare const ConverseCommand_base: {
319
329
  * // inputTokens: Number("int"), // required
320
330
  * // outputTokens: Number("int"), // required
321
331
  * // totalTokens: Number("int"), // required
332
+ * // cacheReadInputTokens: Number("int"),
333
+ * // cacheWriteInputTokens: Number("int"),
322
334
  * // },
323
335
  * // metrics: { // ConverseMetrics
324
336
  * // latencyMs: Number("long"), // required
@@ -401,6 +413,7 @@ declare const ConverseCommand_base: {
401
413
  * // sensitiveInformationPolicyUnits: Number("int"), // required
402
414
  * // sensitiveInformationPolicyFreeUnits: Number("int"), // required
403
415
  * // contextualGroundingPolicyUnits: Number("int"), // required
416
+ * // contentPolicyImageUnits: Number("int"),
404
417
  * // },
405
418
  * // guardrailCoverage: { // GuardrailCoverage
406
419
  * // textCharacters: { // GuardrailTextCharactersCoverage
@@ -488,6 +501,7 @@ declare const ConverseCommand_base: {
488
501
  * // sensitiveInformationPolicyUnits: Number("int"), // required
489
502
  * // sensitiveInformationPolicyFreeUnits: Number("int"), // required
490
503
  * // contextualGroundingPolicyUnits: Number("int"), // required
504
+ * // contentPolicyImageUnits: Number("int"),
491
505
  * // },
492
506
  * // guardrailCoverage: {
493
507
  * // textCharacters: {
@@ -146,6 +146,9 @@ declare const ConverseStreamCommand_base: {
146
146
  * },
147
147
  * },
148
148
  * },
149
+ * cachePoint: { // CachePointBlock
150
+ * type: "default", // required
151
+ * },
149
152
  * reasoningContent: { // ReasoningContentBlock Union: only one key present
150
153
  * reasoningText: { // ReasoningTextBlock
151
154
  * text: "STRING_VALUE", // required
@@ -174,6 +177,9 @@ declare const ConverseStreamCommand_base: {
174
177
  * },
175
178
  * },
176
179
  * },
180
+ * cachePoint: {
181
+ * type: "default", // required
182
+ * },
177
183
  * },
178
184
  * ],
179
185
  * inferenceConfig: { // InferenceConfiguration
@@ -194,6 +200,7 @@ declare const ConverseStreamCommand_base: {
194
200
  * json: "DOCUMENT_VALUE",
195
201
  * },
196
202
  * },
203
+ * cachePoint: "<CachePointBlock>",
197
204
  * },
198
205
  * ],
199
206
  * toolChoice: { // ToolChoice Union: only one key present
@@ -268,6 +275,8 @@ declare const ConverseStreamCommand_base: {
268
275
  * // inputTokens: Number("int"), // required
269
276
  * // outputTokens: Number("int"), // required
270
277
  * // totalTokens: Number("int"), // required
278
+ * // cacheReadInputTokens: Number("int"),
279
+ * // cacheWriteInputTokens: Number("int"),
271
280
  * // },
272
281
  * // metrics: { // ConverseStreamMetrics
273
282
  * // latencyMs: Number("long"), // required
@@ -349,6 +358,7 @@ declare const ConverseStreamCommand_base: {
349
358
  * // sensitiveInformationPolicyUnits: Number("int"), // required
350
359
  * // sensitiveInformationPolicyFreeUnits: Number("int"), // required
351
360
  * // contextualGroundingPolicyUnits: Number("int"), // required
361
+ * // contentPolicyImageUnits: Number("int"),
352
362
  * // },
353
363
  * // guardrailCoverage: { // GuardrailCoverage
354
364
  * // textCharacters: { // GuardrailTextCharactersCoverage
@@ -436,6 +446,7 @@ declare const ConverseStreamCommand_base: {
436
446
  * // sensitiveInformationPolicyUnits: Number("int"), // required
437
447
  * // sensitiveInformationPolicyFreeUnits: Number("int"), // required
438
448
  * // contextualGroundingPolicyUnits: Number("int"), // required
449
+ * // contentPolicyImageUnits: Number("int"),
439
450
  * // },
440
451
  * // guardrailCoverage: {
441
452
  * // textCharacters: {
@@ -826,6 +826,11 @@ export interface GuardrailUsage {
826
826
  * @public
827
827
  */
828
828
  contextualGroundingPolicyUnits: number | undefined;
829
+ /**
830
+ * <p>The content policy image units processed by the guardrail.</p>
831
+ * @public
832
+ */
833
+ contentPolicyImageUnits?: number | undefined;
829
834
  }
830
835
  /**
831
836
  * <p>The invocation metrics for the guardrail.</p>
@@ -1247,6 +1252,28 @@ export interface InferenceConfiguration {
1247
1252
  */
1248
1253
  stopSequences?: string[] | undefined;
1249
1254
  }
1255
+ /**
1256
+ * @public
1257
+ * @enum
1258
+ */
1259
+ export declare const CachePointType: {
1260
+ readonly DEFAULT: "default";
1261
+ };
1262
+ /**
1263
+ * @public
1264
+ */
1265
+ export type CachePointType = (typeof CachePointType)[keyof typeof CachePointType];
1266
+ /**
1267
+ * <p>Defines a section of content to be cached for reuse in subsequent API calls.</p>
1268
+ * @public
1269
+ */
1270
+ export interface CachePointBlock {
1271
+ /**
1272
+ * <p>Specifies the type of cache point within the CachePointBlock.</p>
1273
+ * @public
1274
+ */
1275
+ type: CachePointType | undefined;
1276
+ }
1250
1277
  /**
1251
1278
  * @public
1252
1279
  * @enum
@@ -1837,7 +1864,7 @@ export interface ToolUseBlock {
1837
1864
  * <p>A block of content for a message that you pass to, or receive from, a model with the <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> or <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a> API operations.</p>
1838
1865
  * @public
1839
1866
  */
1840
- export type ContentBlock = ContentBlock.DocumentMember | ContentBlock.GuardContentMember | ContentBlock.ImageMember | ContentBlock.ReasoningContentMember | ContentBlock.TextMember | ContentBlock.ToolResultMember | ContentBlock.ToolUseMember | ContentBlock.VideoMember | ContentBlock.$UnknownMember;
1867
+ export type ContentBlock = ContentBlock.CachePointMember | ContentBlock.DocumentMember | ContentBlock.GuardContentMember | ContentBlock.ImageMember | ContentBlock.ReasoningContentMember | ContentBlock.TextMember | ContentBlock.ToolResultMember | ContentBlock.ToolUseMember | ContentBlock.VideoMember | ContentBlock.$UnknownMember;
1841
1868
  /**
1842
1869
  * @public
1843
1870
  */
@@ -1854,6 +1881,7 @@ export declare namespace ContentBlock {
1854
1881
  toolUse?: never;
1855
1882
  toolResult?: never;
1856
1883
  guardContent?: never;
1884
+ cachePoint?: never;
1857
1885
  reasoningContent?: never;
1858
1886
  $unknown?: never;
1859
1887
  }
@@ -1872,6 +1900,7 @@ export declare namespace ContentBlock {
1872
1900
  toolUse?: never;
1873
1901
  toolResult?: never;
1874
1902
  guardContent?: never;
1903
+ cachePoint?: never;
1875
1904
  reasoningContent?: never;
1876
1905
  $unknown?: never;
1877
1906
  }
@@ -1887,6 +1916,7 @@ export declare namespace ContentBlock {
1887
1916
  toolUse?: never;
1888
1917
  toolResult?: never;
1889
1918
  guardContent?: never;
1919
+ cachePoint?: never;
1890
1920
  reasoningContent?: never;
1891
1921
  $unknown?: never;
1892
1922
  }
@@ -1902,6 +1932,7 @@ export declare namespace ContentBlock {
1902
1932
  toolUse?: never;
1903
1933
  toolResult?: never;
1904
1934
  guardContent?: never;
1935
+ cachePoint?: never;
1905
1936
  reasoningContent?: never;
1906
1937
  $unknown?: never;
1907
1938
  }
@@ -1917,6 +1948,7 @@ export declare namespace ContentBlock {
1917
1948
  toolUse: ToolUseBlock;
1918
1949
  toolResult?: never;
1919
1950
  guardContent?: never;
1951
+ cachePoint?: never;
1920
1952
  reasoningContent?: never;
1921
1953
  $unknown?: never;
1922
1954
  }
@@ -1932,6 +1964,7 @@ export declare namespace ContentBlock {
1932
1964
  toolUse?: never;
1933
1965
  toolResult: ToolResultBlock;
1934
1966
  guardContent?: never;
1967
+ cachePoint?: never;
1935
1968
  reasoningContent?: never;
1936
1969
  $unknown?: never;
1937
1970
  }
@@ -1952,6 +1985,23 @@ export declare namespace ContentBlock {
1952
1985
  toolUse?: never;
1953
1986
  toolResult?: never;
1954
1987
  guardContent: GuardrailConverseContentBlock;
1988
+ cachePoint?: never;
1989
+ reasoningContent?: never;
1990
+ $unknown?: never;
1991
+ }
1992
+ /**
1993
+ * <p>CachePoint to include in the message.</p>
1994
+ * @public
1995
+ */
1996
+ interface CachePointMember {
1997
+ text?: never;
1998
+ image?: never;
1999
+ document?: never;
2000
+ video?: never;
2001
+ toolUse?: never;
2002
+ toolResult?: never;
2003
+ guardContent?: never;
2004
+ cachePoint: CachePointBlock;
1955
2005
  reasoningContent?: never;
1956
2006
  $unknown?: never;
1957
2007
  }
@@ -1967,6 +2017,7 @@ export declare namespace ContentBlock {
1967
2017
  toolUse?: never;
1968
2018
  toolResult?: never;
1969
2019
  guardContent?: never;
2020
+ cachePoint?: never;
1970
2021
  reasoningContent: ReasoningContentBlock;
1971
2022
  $unknown?: never;
1972
2023
  }
@@ -1981,6 +2032,7 @@ export declare namespace ContentBlock {
1981
2032
  toolUse?: never;
1982
2033
  toolResult?: never;
1983
2034
  guardContent?: never;
2035
+ cachePoint?: never;
1984
2036
  reasoningContent?: never;
1985
2037
  $unknown: [string, any];
1986
2038
  }
@@ -1992,6 +2044,7 @@ export declare namespace ContentBlock {
1992
2044
  toolUse: (value: ToolUseBlock) => T;
1993
2045
  toolResult: (value: ToolResultBlock) => T;
1994
2046
  guardContent: (value: GuardrailConverseContentBlock) => T;
2047
+ cachePoint: (value: CachePointBlock) => T;
1995
2048
  reasoningContent: (value: ReasoningContentBlock) => T;
1996
2049
  _: (name: string, value: any) => T;
1997
2050
  }
@@ -2096,7 +2149,7 @@ export declare namespace PromptVariableValues {
2096
2149
  * <p>A system content block.</p>
2097
2150
  * @public
2098
2151
  */
2099
- export type SystemContentBlock = SystemContentBlock.GuardContentMember | SystemContentBlock.TextMember | SystemContentBlock.$UnknownMember;
2152
+ export type SystemContentBlock = SystemContentBlock.CachePointMember | SystemContentBlock.GuardContentMember | SystemContentBlock.TextMember | SystemContentBlock.$UnknownMember;
2100
2153
  /**
2101
2154
  * @public
2102
2155
  */
@@ -2108,6 +2161,7 @@ export declare namespace SystemContentBlock {
2108
2161
  interface TextMember {
2109
2162
  text: string;
2110
2163
  guardContent?: never;
2164
+ cachePoint?: never;
2111
2165
  $unknown?: never;
2112
2166
  }
2113
2167
  /**
@@ -2119,6 +2173,17 @@ export declare namespace SystemContentBlock {
2119
2173
  interface GuardContentMember {
2120
2174
  text?: never;
2121
2175
  guardContent: GuardrailConverseContentBlock;
2176
+ cachePoint?: never;
2177
+ $unknown?: never;
2178
+ }
2179
+ /**
2180
+ * <p>CachePoint to include in the system prompt.</p>
2181
+ * @public
2182
+ */
2183
+ interface CachePointMember {
2184
+ text?: never;
2185
+ guardContent?: never;
2186
+ cachePoint: CachePointBlock;
2122
2187
  $unknown?: never;
2123
2188
  }
2124
2189
  /**
@@ -2127,11 +2192,13 @@ export declare namespace SystemContentBlock {
2127
2192
  interface $UnknownMember {
2128
2193
  text?: never;
2129
2194
  guardContent?: never;
2195
+ cachePoint?: never;
2130
2196
  $unknown: [string, any];
2131
2197
  }
2132
2198
  interface Visitor<T> {
2133
2199
  text: (value: string) => T;
2134
2200
  guardContent: (value: GuardrailConverseContentBlock) => T;
2201
+ cachePoint: (value: CachePointBlock) => T;
2135
2202
  _: (name: string, value: any) => T;
2136
2203
  }
2137
2204
  const visit: <T>(value: SystemContentBlock, visitor: Visitor<T>) => T;
@@ -2276,7 +2343,7 @@ export interface ToolSpecification {
2276
2343
  * <p>Information about a tool that you can use with the Converse API. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/tool-use.html">Tool use (function calling)</a> in the Amazon Bedrock User Guide.</p>
2277
2344
  * @public
2278
2345
  */
2279
- export type Tool = Tool.ToolSpecMember | Tool.$UnknownMember;
2346
+ export type Tool = Tool.CachePointMember | Tool.ToolSpecMember | Tool.$UnknownMember;
2280
2347
  /**
2281
2348
  * @public
2282
2349
  */
@@ -2287,6 +2354,16 @@ export declare namespace Tool {
2287
2354
  */
2288
2355
  interface ToolSpecMember {
2289
2356
  toolSpec: ToolSpecification;
2357
+ cachePoint?: never;
2358
+ $unknown?: never;
2359
+ }
2360
+ /**
2361
+ * <p>CachePoint to include in the tool configuration.</p>
2362
+ * @public
2363
+ */
2364
+ interface CachePointMember {
2365
+ toolSpec?: never;
2366
+ cachePoint: CachePointBlock;
2290
2367
  $unknown?: never;
2291
2368
  }
2292
2369
  /**
@@ -2294,10 +2371,12 @@ export declare namespace Tool {
2294
2371
  */
2295
2372
  interface $UnknownMember {
2296
2373
  toolSpec?: never;
2374
+ cachePoint?: never;
2297
2375
  $unknown: [string, any];
2298
2376
  }
2299
2377
  interface Visitor<T> {
2300
2378
  toolSpec: (value: ToolSpecification) => T;
2379
+ cachePoint: (value: CachePointBlock) => T;
2301
2380
  _: (name: string, value: any) => T;
2302
2381
  }
2303
2382
  const visit: <T>(value: Tool, visitor: Visitor<T>) => T;
@@ -2541,6 +2620,16 @@ export interface TokenUsage {
2541
2620
  * @public
2542
2621
  */
2543
2622
  totalTokens: number | undefined;
2623
+ /**
2624
+ * <p>The number of input tokens read from the cache for the request.</p>
2625
+ * @public
2626
+ */
2627
+ cacheReadInputTokens?: number | undefined;
2628
+ /**
2629
+ * <p>The number of input tokens written to the cache for the request.</p>
2630
+ * @public
2631
+ */
2632
+ cacheWriteInputTokens?: number | undefined;
2544
2633
  }
2545
2634
  /**
2546
2635
  * @public
@@ -314,6 +314,7 @@ export interface GuardrailUsage {
314
314
  sensitiveInformationPolicyUnits: number | undefined;
315
315
  sensitiveInformationPolicyFreeUnits: number | undefined;
316
316
  contextualGroundingPolicyUnits: number | undefined;
317
+ contentPolicyImageUnits?: number | undefined;
317
318
  }
318
319
  export interface GuardrailInvocationMetrics {
319
320
  guardrailProcessingLatency?: number | undefined;
@@ -456,6 +457,14 @@ export interface InferenceConfiguration {
456
457
  topP?: number | undefined;
457
458
  stopSequences?: string[] | undefined;
458
459
  }
460
+ export declare const CachePointType: {
461
+ readonly DEFAULT: "default";
462
+ };
463
+ export type CachePointType =
464
+ (typeof CachePointType)[keyof typeof CachePointType];
465
+ export interface CachePointBlock {
466
+ type: CachePointType | undefined;
467
+ }
459
468
  export declare const DocumentFormat: {
460
469
  readonly CSV: "csv";
461
470
  readonly DOC: "doc";
@@ -752,6 +761,7 @@ export interface ToolUseBlock {
752
761
  input: __DocumentType | undefined;
753
762
  }
754
763
  export type ContentBlock =
764
+ | ContentBlock.CachePointMember
755
765
  | ContentBlock.DocumentMember
756
766
  | ContentBlock.GuardContentMember
757
767
  | ContentBlock.ImageMember
@@ -770,6 +780,7 @@ export declare namespace ContentBlock {
770
780
  toolUse?: never;
771
781
  toolResult?: never;
772
782
  guardContent?: never;
783
+ cachePoint?: never;
773
784
  reasoningContent?: never;
774
785
  $unknown?: never;
775
786
  }
@@ -781,6 +792,7 @@ export declare namespace ContentBlock {
781
792
  toolUse?: never;
782
793
  toolResult?: never;
783
794
  guardContent?: never;
795
+ cachePoint?: never;
784
796
  reasoningContent?: never;
785
797
  $unknown?: never;
786
798
  }
@@ -792,6 +804,7 @@ export declare namespace ContentBlock {
792
804
  toolUse?: never;
793
805
  toolResult?: never;
794
806
  guardContent?: never;
807
+ cachePoint?: never;
795
808
  reasoningContent?: never;
796
809
  $unknown?: never;
797
810
  }
@@ -803,6 +816,7 @@ export declare namespace ContentBlock {
803
816
  toolUse?: never;
804
817
  toolResult?: never;
805
818
  guardContent?: never;
819
+ cachePoint?: never;
806
820
  reasoningContent?: never;
807
821
  $unknown?: never;
808
822
  }
@@ -814,6 +828,7 @@ export declare namespace ContentBlock {
814
828
  toolUse: ToolUseBlock;
815
829
  toolResult?: never;
816
830
  guardContent?: never;
831
+ cachePoint?: never;
817
832
  reasoningContent?: never;
818
833
  $unknown?: never;
819
834
  }
@@ -825,6 +840,7 @@ export declare namespace ContentBlock {
825
840
  toolUse?: never;
826
841
  toolResult: ToolResultBlock;
827
842
  guardContent?: never;
843
+ cachePoint?: never;
828
844
  reasoningContent?: never;
829
845
  $unknown?: never;
830
846
  }
@@ -836,6 +852,19 @@ export declare namespace ContentBlock {
836
852
  toolUse?: never;
837
853
  toolResult?: never;
838
854
  guardContent: GuardrailConverseContentBlock;
855
+ cachePoint?: never;
856
+ reasoningContent?: never;
857
+ $unknown?: never;
858
+ }
859
+ interface CachePointMember {
860
+ text?: never;
861
+ image?: never;
862
+ document?: never;
863
+ video?: never;
864
+ toolUse?: never;
865
+ toolResult?: never;
866
+ guardContent?: never;
867
+ cachePoint: CachePointBlock;
839
868
  reasoningContent?: never;
840
869
  $unknown?: never;
841
870
  }
@@ -847,6 +876,7 @@ export declare namespace ContentBlock {
847
876
  toolUse?: never;
848
877
  toolResult?: never;
849
878
  guardContent?: never;
879
+ cachePoint?: never;
850
880
  reasoningContent: ReasoningContentBlock;
851
881
  $unknown?: never;
852
882
  }
@@ -858,6 +888,7 @@ export declare namespace ContentBlock {
858
888
  toolUse?: never;
859
889
  toolResult?: never;
860
890
  guardContent?: never;
891
+ cachePoint?: never;
861
892
  reasoningContent?: never;
862
893
  $unknown: [string, any];
863
894
  }
@@ -869,6 +900,7 @@ export declare namespace ContentBlock {
869
900
  toolUse: (value: ToolUseBlock) => T;
870
901
  toolResult: (value: ToolResultBlock) => T;
871
902
  guardContent: (value: GuardrailConverseContentBlock) => T;
903
+ cachePoint: (value: CachePointBlock) => T;
872
904
  reasoningContent: (value: ReasoningContentBlock) => T;
873
905
  _: (name: string, value: any) => T;
874
906
  }
@@ -912,6 +944,7 @@ export declare namespace PromptVariableValues {
912
944
  const visit: <T>(value: PromptVariableValues, visitor: Visitor<T>) => T;
913
945
  }
914
946
  export type SystemContentBlock =
947
+ | SystemContentBlock.CachePointMember
915
948
  | SystemContentBlock.GuardContentMember
916
949
  | SystemContentBlock.TextMember
917
950
  | SystemContentBlock.$UnknownMember;
@@ -919,21 +952,31 @@ export declare namespace SystemContentBlock {
919
952
  interface TextMember {
920
953
  text: string;
921
954
  guardContent?: never;
955
+ cachePoint?: never;
922
956
  $unknown?: never;
923
957
  }
924
958
  interface GuardContentMember {
925
959
  text?: never;
926
960
  guardContent: GuardrailConverseContentBlock;
961
+ cachePoint?: never;
962
+ $unknown?: never;
963
+ }
964
+ interface CachePointMember {
965
+ text?: never;
966
+ guardContent?: never;
967
+ cachePoint: CachePointBlock;
927
968
  $unknown?: never;
928
969
  }
929
970
  interface $UnknownMember {
930
971
  text?: never;
931
972
  guardContent?: never;
973
+ cachePoint?: never;
932
974
  $unknown: [string, any];
933
975
  }
934
976
  interface Visitor<T> {
935
977
  text: (value: string) => T;
936
978
  guardContent: (value: GuardrailConverseContentBlock) => T;
979
+ cachePoint: (value: CachePointBlock) => T;
937
980
  _: (name: string, value: any) => T;
938
981
  }
939
982
  const visit: <T>(value: SystemContentBlock, visitor: Visitor<T>) => T;
@@ -1004,18 +1047,29 @@ export interface ToolSpecification {
1004
1047
  description?: string | undefined;
1005
1048
  inputSchema: ToolInputSchema | undefined;
1006
1049
  }
1007
- export type Tool = Tool.ToolSpecMember | Tool.$UnknownMember;
1050
+ export type Tool =
1051
+ | Tool.CachePointMember
1052
+ | Tool.ToolSpecMember
1053
+ | Tool.$UnknownMember;
1008
1054
  export declare namespace Tool {
1009
1055
  interface ToolSpecMember {
1010
1056
  toolSpec: ToolSpecification;
1057
+ cachePoint?: never;
1058
+ $unknown?: never;
1059
+ }
1060
+ interface CachePointMember {
1061
+ toolSpec?: never;
1062
+ cachePoint: CachePointBlock;
1011
1063
  $unknown?: never;
1012
1064
  }
1013
1065
  interface $UnknownMember {
1014
1066
  toolSpec?: never;
1067
+ cachePoint?: never;
1015
1068
  $unknown: [string, any];
1016
1069
  }
1017
1070
  interface Visitor<T> {
1018
1071
  toolSpec: (value: ToolSpecification) => T;
1072
+ cachePoint: (value: CachePointBlock) => T;
1019
1073
  _: (name: string, value: any) => T;
1020
1074
  }
1021
1075
  const visit: <T>(value: Tool, visitor: Visitor<T>) => T;
@@ -1083,6 +1137,8 @@ export interface TokenUsage {
1083
1137
  inputTokens: number | undefined;
1084
1138
  outputTokens: number | undefined;
1085
1139
  totalTokens: number | undefined;
1140
+ cacheReadInputTokens?: number | undefined;
1141
+ cacheWriteInputTokens?: number | undefined;
1086
1142
  }
1087
1143
  export interface ConverseResponse {
1088
1144
  output: ConverseOutput | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-bedrock-runtime",
3
3
  "description": "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
4
- "version": "3.777.0",
4
+ "version": "3.779.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",