@aws-sdk/client-bedrock-runtime 3.982.0 → 3.983.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
@@ -442,6 +442,7 @@ const _IMWRSR = "InvokeModelWithResponseStreamRequest";
442
442
  const _IMWRSRn = "InvokeModelWithResponseStreamResponse";
443
443
  const _IS = "ImageSource";
444
444
  const _ISE = "InternalServerException";
445
+ const _JSD = "JsonSchemaDefinition";
445
446
  const _LAI = "ListAsyncInvokes";
446
447
  const _LAIR = "ListAsyncInvokesRequest";
447
448
  const _LAIRi = "ListAsyncInvokesResponse";
@@ -454,6 +455,9 @@ const _MSEE = "ModelStreamErrorException";
454
455
  const _MSEe = "MessageStopEvent";
455
456
  const _MTE = "ModelTimeoutException";
456
457
  const _Me = "Messages";
458
+ const _OC = "OutputConfig";
459
+ const _OF = "OutputFormat";
460
+ const _OFS = "OutputFormatStructure";
457
461
  const _PB = "PartBody";
458
462
  const _PC = "PerformanceConfiguration";
459
463
  const _PP = "PayloadPart";
@@ -609,6 +613,7 @@ const _ima = "image";
609
613
  const _imp = "impossible";
610
614
  const _in = "invalid";
611
615
  const _j = "json";
616
+ const _jS = "jsonSchema";
612
617
  const _k = "key";
613
618
  const _kKI = "kmsKeyId";
614
619
  const _l = "location";
@@ -639,6 +644,7 @@ const _nT = "nextToken";
639
644
  const _nTo = "noTranslations";
640
645
  const _o = "outputs";
641
646
  const _oA = "outputAssessments";
647
+ const _oC = "outputConfig";
642
648
  const _oDC = "outputDataConfig";
643
649
  const _oM = "originalMessage";
644
650
  const _oS = "outputScope";
@@ -688,6 +694,7 @@ const _sU = "s3Uri";
688
694
  const _sUE = "serviceUnavailableException";
689
695
  const _sa = "satisfiable";
690
696
  const _sc = "score";
697
+ const _sch = "schema";
691
698
  const _se = "server";
692
699
  const _si = "signature";
693
700
  const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.bedrockruntime";
@@ -696,6 +703,8 @@ const _sta = "start";
696
703
  const _stat = "statements";
697
704
  const _str = "stream";
698
705
  const _stre = "streaming";
706
+ const _stri = "strict";
707
+ const _stru = "structure";
699
708
  const _sy = "system";
700
709
  const _t = "ttl";
701
710
  const _tA = "translationAmbiguous";
@@ -704,6 +713,7 @@ const _tCe = "textCharacters";
704
713
  const _tCo = "toolChoice";
705
714
  const _tCoo = "tooComplex";
706
715
  const _tE = "throttlingException";
716
+ const _tF = "textFormat";
707
717
  const _tP = "topicPolicy";
708
718
  const _tPU = "topicPolicyUnits";
709
719
  const _tPo = "topP";
@@ -863,8 +873,8 @@ var ConverseMetrics$ = [3, n0, _CM,
863
873
  ];
864
874
  var ConverseRequest$ = [3, n0, _CR,
865
875
  0,
866
- [_mI, _me, _sy, _iC, _tC, _gCu, _aMRF, _pV, _aMRFP, _rM, _pC, _sTe],
867
- [[0, 1], [() => Messages, 0], [() => SystemContentBlocks, 0], () => InferenceConfiguration$, () => ToolConfiguration$, () => GuardrailConfiguration$, 15, [() => PromptVariableMap, 0], 64 | 0, [() => RequestMetadata, 0], () => PerformanceConfiguration$, () => ServiceTier$], 1
876
+ [_mI, _me, _sy, _iC, _tC, _gCu, _aMRF, _pV, _aMRFP, _rM, _pC, _sTe, _oC],
877
+ [[0, 1], [() => Messages, 0], [() => SystemContentBlocks, 0], () => InferenceConfiguration$, () => ToolConfiguration$, () => GuardrailConfiguration$, 15, [() => PromptVariableMap, 0], 64 | 0, [() => RequestMetadata, 0], () => PerformanceConfiguration$, () => ServiceTier$, [() => OutputConfig$, 0]], 1
868
878
  ];
869
879
  var ConverseResponse$ = [3, n0, _CRo,
870
880
  0,
@@ -883,8 +893,8 @@ var ConverseStreamMetrics$ = [3, n0, _CSM,
883
893
  ];
884
894
  var ConverseStreamRequest$ = [3, n0, _CSR,
885
895
  0,
886
- [_mI, _me, _sy, _iC, _tC, _gCu, _aMRF, _pV, _aMRFP, _rM, _pC, _sTe],
887
- [[0, 1], [() => Messages, 0], [() => SystemContentBlocks, 0], () => InferenceConfiguration$, () => ToolConfiguration$, () => GuardrailStreamConfiguration$, 15, [() => PromptVariableMap, 0], 64 | 0, [() => RequestMetadata, 0], () => PerformanceConfiguration$, () => ServiceTier$], 1
896
+ [_mI, _me, _sy, _iC, _tC, _gCu, _aMRF, _pV, _aMRFP, _rM, _pC, _sTe, _oC],
897
+ [[0, 1], [() => Messages, 0], [() => SystemContentBlocks, 0], () => InferenceConfiguration$, () => ToolConfiguration$, () => GuardrailStreamConfiguration$, 15, [() => PromptVariableMap, 0], 64 | 0, [() => RequestMetadata, 0], () => PerformanceConfiguration$, () => ServiceTier$, [() => OutputConfig$, 0]], 1
888
898
  ];
889
899
  var ConverseStreamResponse$ = [3, n0, _CSRo,
890
900
  0,
@@ -1217,6 +1227,11 @@ var InvokeModelWithResponseStreamResponse$ = [3, n0, _IMWRSRn,
1217
1227
  [_bo, _cT, _pCL, _sTe],
1218
1228
  [[() => ResponseStream$, 16], [0, { [_hH]: _XABCT }], [0, { [_hH]: _XABPL }], [0, { [_hH]: _XABST }]], 2
1219
1229
  ];
1230
+ var JsonSchemaDefinition$ = [3, n0, _JSD,
1231
+ 0,
1232
+ [_sch, _n, _des],
1233
+ [0, 0, 0], 1
1234
+ ];
1220
1235
  var ListAsyncInvokesRequest$ = [3, n0, _LAIR,
1221
1236
  0,
1222
1237
  [_sTA, _sTB, _sE, _mR, _nT, _sB, _sO],
@@ -1266,6 +1281,16 @@ var ModelTimeoutException$ = [-3, n0, _MTE,
1266
1281
  [0]
1267
1282
  ];
1268
1283
  schema.TypeRegistry.for(n0).registerError(ModelTimeoutException$, ModelTimeoutException);
1284
+ var OutputConfig$ = [3, n0, _OC,
1285
+ 0,
1286
+ [_tF],
1287
+ [[() => OutputFormat$, 0]]
1288
+ ];
1289
+ var OutputFormat$ = [3, n0, _OF,
1290
+ 0,
1291
+ [_ty, _stru],
1292
+ [0, [() => OutputFormatStructure$, 0]], 2
1293
+ ];
1269
1294
  var PayloadPart$ = [3, n0, _PP,
1270
1295
  8,
1271
1296
  [_b],
@@ -1382,8 +1407,8 @@ var ToolResultBlockStart$ = [3, n0, _TRBS,
1382
1407
  ];
1383
1408
  var ToolSpecification$ = [3, n0, _TS,
1384
1409
  0,
1385
- [_n, _iS, _des],
1386
- [0, () => ToolInputSchema$, 0], 2
1410
+ [_n, _iS, _des, _stri],
1411
+ [0, () => ToolInputSchema$, 0, 2], 2
1387
1412
  ];
1388
1413
  var ToolUseBlock$ = [3, n0, _TUB,
1389
1414
  0,
@@ -1650,6 +1675,11 @@ var InvokeModelWithBidirectionalStreamOutput$ = [4, n0, _IMWBSO,
1650
1675
  [_ch, _iSE, _mSEE, _vE, _tE, _mTE, _sUE],
1651
1676
  [[() => BidirectionalOutputPayloadPart$, 0], [() => InternalServerException$, 0], [() => ModelStreamErrorException$, 0], [() => ValidationException$, 0], [() => ThrottlingException$, 0], [() => ModelTimeoutException$, 0], [() => ServiceUnavailableException$, 0]]
1652
1677
  ];
1678
+ var OutputFormatStructure$ = [4, n0, _OFS,
1679
+ 8,
1680
+ [_jS],
1681
+ [() => JsonSchemaDefinition$]
1682
+ ];
1653
1683
  var PromptVariableValues$ = [4, n0, _PVV,
1654
1684
  0,
1655
1685
  [_te],
@@ -2103,6 +2133,9 @@ const ConversationRole = {
2103
2133
  ASSISTANT: "assistant",
2104
2134
  USER: "user",
2105
2135
  };
2136
+ const OutputFormatType = {
2137
+ JSON_SCHEMA: "json_schema",
2138
+ };
2106
2139
  const PerformanceConfigLatency = {
2107
2140
  OPTIMIZED: "optimized",
2108
2141
  STANDARD: "standard",
@@ -2311,6 +2344,7 @@ exports.InvokeModelWithResponseStream$ = InvokeModelWithResponseStream$;
2311
2344
  exports.InvokeModelWithResponseStreamCommand = InvokeModelWithResponseStreamCommand;
2312
2345
  exports.InvokeModelWithResponseStreamRequest$ = InvokeModelWithResponseStreamRequest$;
2313
2346
  exports.InvokeModelWithResponseStreamResponse$ = InvokeModelWithResponseStreamResponse$;
2347
+ exports.JsonSchemaDefinition$ = JsonSchemaDefinition$;
2314
2348
  exports.ListAsyncInvokes$ = ListAsyncInvokes$;
2315
2349
  exports.ListAsyncInvokesCommand = ListAsyncInvokesCommand;
2316
2350
  exports.ListAsyncInvokesRequest$ = ListAsyncInvokesRequest$;
@@ -2326,6 +2360,10 @@ exports.ModelStreamErrorException = ModelStreamErrorException;
2326
2360
  exports.ModelStreamErrorException$ = ModelStreamErrorException$;
2327
2361
  exports.ModelTimeoutException = ModelTimeoutException;
2328
2362
  exports.ModelTimeoutException$ = ModelTimeoutException$;
2363
+ exports.OutputConfig$ = OutputConfig$;
2364
+ exports.OutputFormat$ = OutputFormat$;
2365
+ exports.OutputFormatStructure$ = OutputFormatStructure$;
2366
+ exports.OutputFormatType = OutputFormatType;
2329
2367
  exports.PayloadPart$ = PayloadPart$;
2330
2368
  exports.PerformanceConfigLatency = PerformanceConfigLatency;
2331
2369
  exports.PerformanceConfiguration$ = PerformanceConfiguration$;
@@ -205,6 +205,9 @@ export const ConversationRole = {
205
205
  ASSISTANT: "assistant",
206
206
  USER: "user",
207
207
  };
208
+ export const OutputFormatType = {
209
+ JSON_SCHEMA: "json_schema",
210
+ };
208
211
  export const PerformanceConfigLatency = {
209
212
  OPTIMIZED: "optimized",
210
213
  STANDARD: "standard",
@@ -154,6 +154,7 @@ const _IMWRSR = "InvokeModelWithResponseStreamRequest";
154
154
  const _IMWRSRn = "InvokeModelWithResponseStreamResponse";
155
155
  const _IS = "ImageSource";
156
156
  const _ISE = "InternalServerException";
157
+ const _JSD = "JsonSchemaDefinition";
157
158
  const _LAI = "ListAsyncInvokes";
158
159
  const _LAIR = "ListAsyncInvokesRequest";
159
160
  const _LAIRi = "ListAsyncInvokesResponse";
@@ -166,6 +167,9 @@ const _MSEE = "ModelStreamErrorException";
166
167
  const _MSEe = "MessageStopEvent";
167
168
  const _MTE = "ModelTimeoutException";
168
169
  const _Me = "Messages";
170
+ const _OC = "OutputConfig";
171
+ const _OF = "OutputFormat";
172
+ const _OFS = "OutputFormatStructure";
169
173
  const _PB = "PartBody";
170
174
  const _PC = "PerformanceConfiguration";
171
175
  const _PP = "PayloadPart";
@@ -321,6 +325,7 @@ const _ima = "image";
321
325
  const _imp = "impossible";
322
326
  const _in = "invalid";
323
327
  const _j = "json";
328
+ const _jS = "jsonSchema";
324
329
  const _k = "key";
325
330
  const _kKI = "kmsKeyId";
326
331
  const _l = "location";
@@ -351,6 +356,7 @@ const _nT = "nextToken";
351
356
  const _nTo = "noTranslations";
352
357
  const _o = "outputs";
353
358
  const _oA = "outputAssessments";
359
+ const _oC = "outputConfig";
354
360
  const _oDC = "outputDataConfig";
355
361
  const _oM = "originalMessage";
356
362
  const _oS = "outputScope";
@@ -400,6 +406,7 @@ const _sU = "s3Uri";
400
406
  const _sUE = "serviceUnavailableException";
401
407
  const _sa = "satisfiable";
402
408
  const _sc = "score";
409
+ const _sch = "schema";
403
410
  const _se = "server";
404
411
  const _si = "signature";
405
412
  const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.bedrockruntime";
@@ -408,6 +415,8 @@ const _sta = "start";
408
415
  const _stat = "statements";
409
416
  const _str = "stream";
410
417
  const _stre = "streaming";
418
+ const _stri = "strict";
419
+ const _stru = "structure";
411
420
  const _sy = "system";
412
421
  const _t = "ttl";
413
422
  const _tA = "translationAmbiguous";
@@ -416,6 +425,7 @@ const _tCe = "textCharacters";
416
425
  const _tCo = "toolChoice";
417
426
  const _tCoo = "tooComplex";
418
427
  const _tE = "throttlingException";
428
+ const _tF = "textFormat";
419
429
  const _tP = "topicPolicy";
420
430
  const _tPU = "topicPolicyUnits";
421
431
  const _tPo = "topP";
@@ -578,8 +588,8 @@ export var ConverseMetrics$ = [3, n0, _CM,
578
588
  ];
579
589
  export var ConverseRequest$ = [3, n0, _CR,
580
590
  0,
581
- [_mI, _me, _sy, _iC, _tC, _gCu, _aMRF, _pV, _aMRFP, _rM, _pC, _sTe],
582
- [[0, 1], [() => Messages, 0], [() => SystemContentBlocks, 0], () => InferenceConfiguration$, () => ToolConfiguration$, () => GuardrailConfiguration$, 15, [() => PromptVariableMap, 0], 64 | 0, [() => RequestMetadata, 0], () => PerformanceConfiguration$, () => ServiceTier$], 1
591
+ [_mI, _me, _sy, _iC, _tC, _gCu, _aMRF, _pV, _aMRFP, _rM, _pC, _sTe, _oC],
592
+ [[0, 1], [() => Messages, 0], [() => SystemContentBlocks, 0], () => InferenceConfiguration$, () => ToolConfiguration$, () => GuardrailConfiguration$, 15, [() => PromptVariableMap, 0], 64 | 0, [() => RequestMetadata, 0], () => PerformanceConfiguration$, () => ServiceTier$, [() => OutputConfig$, 0]], 1
583
593
  ];
584
594
  export var ConverseResponse$ = [3, n0, _CRo,
585
595
  0,
@@ -598,8 +608,8 @@ export var ConverseStreamMetrics$ = [3, n0, _CSM,
598
608
  ];
599
609
  export var ConverseStreamRequest$ = [3, n0, _CSR,
600
610
  0,
601
- [_mI, _me, _sy, _iC, _tC, _gCu, _aMRF, _pV, _aMRFP, _rM, _pC, _sTe],
602
- [[0, 1], [() => Messages, 0], [() => SystemContentBlocks, 0], () => InferenceConfiguration$, () => ToolConfiguration$, () => GuardrailStreamConfiguration$, 15, [() => PromptVariableMap, 0], 64 | 0, [() => RequestMetadata, 0], () => PerformanceConfiguration$, () => ServiceTier$], 1
611
+ [_mI, _me, _sy, _iC, _tC, _gCu, _aMRF, _pV, _aMRFP, _rM, _pC, _sTe, _oC],
612
+ [[0, 1], [() => Messages, 0], [() => SystemContentBlocks, 0], () => InferenceConfiguration$, () => ToolConfiguration$, () => GuardrailStreamConfiguration$, 15, [() => PromptVariableMap, 0], 64 | 0, [() => RequestMetadata, 0], () => PerformanceConfiguration$, () => ServiceTier$, [() => OutputConfig$, 0]], 1
603
613
  ];
604
614
  export var ConverseStreamResponse$ = [3, n0, _CSRo,
605
615
  0,
@@ -932,6 +942,11 @@ export var InvokeModelWithResponseStreamResponse$ = [3, n0, _IMWRSRn,
932
942
  [_bo, _cT, _pCL, _sTe],
933
943
  [[() => ResponseStream$, 16], [0, { [_hH]: _XABCT }], [0, { [_hH]: _XABPL }], [0, { [_hH]: _XABST }]], 2
934
944
  ];
945
+ export var JsonSchemaDefinition$ = [3, n0, _JSD,
946
+ 0,
947
+ [_sch, _n, _des],
948
+ [0, 0, 0], 1
949
+ ];
935
950
  export var ListAsyncInvokesRequest$ = [3, n0, _LAIR,
936
951
  0,
937
952
  [_sTA, _sTB, _sE, _mR, _nT, _sB, _sO],
@@ -981,6 +996,16 @@ export var ModelTimeoutException$ = [-3, n0, _MTE,
981
996
  [0]
982
997
  ];
983
998
  TypeRegistry.for(n0).registerError(ModelTimeoutException$, ModelTimeoutException);
999
+ export var OutputConfig$ = [3, n0, _OC,
1000
+ 0,
1001
+ [_tF],
1002
+ [[() => OutputFormat$, 0]]
1003
+ ];
1004
+ export var OutputFormat$ = [3, n0, _OF,
1005
+ 0,
1006
+ [_ty, _stru],
1007
+ [0, [() => OutputFormatStructure$, 0]], 2
1008
+ ];
984
1009
  export var PayloadPart$ = [3, n0, _PP,
985
1010
  8,
986
1011
  [_b],
@@ -1097,8 +1122,8 @@ export var ToolResultBlockStart$ = [3, n0, _TRBS,
1097
1122
  ];
1098
1123
  export var ToolSpecification$ = [3, n0, _TS,
1099
1124
  0,
1100
- [_n, _iS, _des],
1101
- [0, () => ToolInputSchema$, 0], 2
1125
+ [_n, _iS, _des, _stri],
1126
+ [0, () => ToolInputSchema$, 0, 2], 2
1102
1127
  ];
1103
1128
  export var ToolUseBlock$ = [3, n0, _TUB,
1104
1129
  0,
@@ -1371,6 +1396,11 @@ export var InvokeModelWithBidirectionalStreamOutput$ = [4, n0, _IMWBSO,
1371
1396
  [_ch, _iSE, _mSEE, _vE, _tE, _mTE, _sUE],
1372
1397
  [[() => BidirectionalOutputPayloadPart$, 0], [() => InternalServerException$, 0], [() => ModelStreamErrorException$, 0], [() => ValidationException$, 0], [() => ThrottlingException$, 0], [() => ModelTimeoutException$, 0], [() => ServiceUnavailableException$, 0]]
1373
1398
  ];
1399
+ export var OutputFormatStructure$ = [4, n0, _OFS,
1400
+ 8,
1401
+ [_jS],
1402
+ [() => JsonSchemaDefinition$]
1403
+ ];
1374
1404
  export var PromptVariableValues$ = [4, n0, _PVV,
1375
1405
  0,
1376
1406
  [_te],
@@ -293,6 +293,7 @@ declare const ConverseCommand_base: {
293
293
  * inputSchema: { // ToolInputSchema Union: only one key present
294
294
  * json: "DOCUMENT_VALUE",
295
295
  * },
296
+ * strict: true || false,
296
297
  * },
297
298
  * systemTool: { // SystemTool
298
299
  * name: "STRING_VALUE", // required
@@ -331,6 +332,18 @@ declare const ConverseCommand_base: {
331
332
  * serviceTier: { // ServiceTier
332
333
  * type: "priority" || "default" || "flex" || "reserved", // required
333
334
  * },
335
+ * outputConfig: { // OutputConfig
336
+ * textFormat: { // OutputFormat
337
+ * type: "json_schema", // required
338
+ * structure: { // OutputFormatStructure Union: only one key present
339
+ * jsonSchema: { // JsonSchemaDefinition
340
+ * schema: "STRING_VALUE", // required
341
+ * name: "STRING_VALUE",
342
+ * description: "STRING_VALUE",
343
+ * },
344
+ * },
345
+ * },
346
+ * },
334
347
  * };
335
348
  * const command = new ConverseCommand(input);
336
349
  * const response = await client.send(command);
@@ -293,6 +293,7 @@ declare const ConverseStreamCommand_base: {
293
293
  * inputSchema: { // ToolInputSchema Union: only one key present
294
294
  * json: "DOCUMENT_VALUE",
295
295
  * },
296
+ * strict: true || false,
296
297
  * },
297
298
  * systemTool: { // SystemTool
298
299
  * name: "STRING_VALUE", // required
@@ -332,6 +333,18 @@ declare const ConverseStreamCommand_base: {
332
333
  * serviceTier: { // ServiceTier
333
334
  * type: "priority" || "default" || "flex" || "reserved", // required
334
335
  * },
336
+ * outputConfig: { // OutputConfig
337
+ * textFormat: { // OutputFormat
338
+ * type: "json_schema", // required
339
+ * structure: { // OutputFormatStructure Union: only one key present
340
+ * jsonSchema: { // JsonSchemaDefinition
341
+ * schema: "STRING_VALUE", // required
342
+ * name: "STRING_VALUE",
343
+ * description: "STRING_VALUE",
344
+ * },
345
+ * },
346
+ * },
347
+ * },
335
348
  * };
336
349
  * const command = new ConverseStreamCommand(input);
337
350
  * const response = await client.send(command);
@@ -290,6 +290,7 @@ declare const CountTokensCommand_base: {
290
290
  * inputSchema: { // ToolInputSchema Union: only one key present
291
291
  * json: "DOCUMENT_VALUE",
292
292
  * },
293
+ * strict: true || false,
293
294
  * },
294
295
  * systemTool: { // SystemTool
295
296
  * name: "STRING_VALUE", // required
@@ -485,6 +485,17 @@ export declare const ConversationRole: {
485
485
  * @public
486
486
  */
487
487
  export type ConversationRole = (typeof ConversationRole)[keyof typeof ConversationRole];
488
+ /**
489
+ * @public
490
+ * @enum
491
+ */
492
+ export declare const OutputFormatType: {
493
+ readonly JSON_SCHEMA: "json_schema";
494
+ };
495
+ /**
496
+ * @public
497
+ */
498
+ export type OutputFormatType = (typeof OutputFormatType)[keyof typeof OutputFormatType];
488
499
  /**
489
500
  * @public
490
501
  * @enum
@@ -1,5 +1,5 @@
1
1
  import { DocumentType as __DocumentType } from "@smithy/types";
2
- import { AsyncInvokeStatus, AudioFormat, CachePointType, CacheTTL, ConversationRole, DocumentFormat, GuardrailAction, GuardrailAutomatedReasoningLogicWarningType, GuardrailContentFilterConfidence, GuardrailContentFilterStrength, GuardrailContentFilterType, GuardrailContentPolicyAction, GuardrailContentQualifier, GuardrailContentSource, GuardrailContextualGroundingFilterType, GuardrailContextualGroundingPolicyAction, GuardrailConverseContentQualifier, GuardrailConverseImageFormat, GuardrailImageFormat, GuardrailManagedWordType, GuardrailOrigin, GuardrailOutputScope, GuardrailOwnership, GuardrailPiiEntityType, GuardrailSensitiveInformationPolicyAction, GuardrailStreamProcessingMode, GuardrailTopicPolicyAction, GuardrailTopicType, GuardrailTrace, GuardrailWordPolicyAction, ImageFormat, PerformanceConfigLatency, ServiceTierType, SortAsyncInvocationBy, SortOrder, StopReason, ToolResultStatus, ToolUseType, Trace, VideoFormat } from "./enums";
2
+ import { AsyncInvokeStatus, AudioFormat, CachePointType, CacheTTL, ConversationRole, DocumentFormat, GuardrailAction, GuardrailAutomatedReasoningLogicWarningType, GuardrailContentFilterConfidence, GuardrailContentFilterStrength, GuardrailContentFilterType, GuardrailContentPolicyAction, GuardrailContentQualifier, GuardrailContentSource, GuardrailContextualGroundingFilterType, GuardrailContextualGroundingPolicyAction, GuardrailConverseContentQualifier, GuardrailConverseImageFormat, GuardrailImageFormat, GuardrailManagedWordType, GuardrailOrigin, GuardrailOutputScope, GuardrailOwnership, GuardrailPiiEntityType, GuardrailSensitiveInformationPolicyAction, GuardrailStreamProcessingMode, GuardrailTopicPolicyAction, GuardrailTopicType, GuardrailTrace, GuardrailWordPolicyAction, ImageFormat, OutputFormatType, PerformanceConfigLatency, ServiceTierType, SortAsyncInvocationBy, SortOrder, StopReason, ToolResultStatus, ToolUseType, Trace, VideoFormat } from "./enums";
3
3
  import { InternalServerException, ModelStreamErrorException, ModelTimeoutException, ServiceUnavailableException, ThrottlingException, ValidationException } from "./errors";
4
4
  /**
5
5
  * @public
@@ -2700,6 +2700,87 @@ export interface Message {
2700
2700
  */
2701
2701
  content: ContentBlock[] | undefined;
2702
2702
  }
2703
+ /**
2704
+ * <p> JSON schema structured output format options. </p>
2705
+ * @public
2706
+ */
2707
+ export interface JsonSchemaDefinition {
2708
+ /**
2709
+ * <p> The JSON schema to constrain the model's output. For more information, see <a href="https://json-schema.org/understanding-json-schema/reference">JSON Schema Reference</a>. </p>
2710
+ * @public
2711
+ */
2712
+ schema: string | undefined;
2713
+ /**
2714
+ * <p> The name of the JSON schema. </p>
2715
+ * @public
2716
+ */
2717
+ name?: string | undefined;
2718
+ /**
2719
+ * <p> A description of the JSON schema. </p>
2720
+ * @public
2721
+ */
2722
+ description?: string | undefined;
2723
+ }
2724
+ /**
2725
+ * <p> The structure that the model's output must adhere to. </p>
2726
+ * @public
2727
+ */
2728
+ export type OutputFormatStructure = OutputFormatStructure.JsonSchemaMember | OutputFormatStructure.$UnknownMember;
2729
+ /**
2730
+ * @public
2731
+ */
2732
+ export declare namespace OutputFormatStructure {
2733
+ /**
2734
+ * <p> A JSON schema structure that the model's output must adhere to. </p>
2735
+ * @public
2736
+ */
2737
+ interface JsonSchemaMember {
2738
+ jsonSchema: JsonSchemaDefinition;
2739
+ $unknown?: never;
2740
+ }
2741
+ /**
2742
+ * @public
2743
+ */
2744
+ interface $UnknownMember {
2745
+ jsonSchema?: never;
2746
+ $unknown: [string, any];
2747
+ }
2748
+ /**
2749
+ * @deprecated unused in schema-serde mode.
2750
+ *
2751
+ */
2752
+ interface Visitor<T> {
2753
+ jsonSchema: (value: JsonSchemaDefinition) => T;
2754
+ _: (name: string, value: any) => T;
2755
+ }
2756
+ }
2757
+ /**
2758
+ * <p> Structured output parameters to control the model's response. </p>
2759
+ * @public
2760
+ */
2761
+ export interface OutputFormat {
2762
+ /**
2763
+ * <p> The type of structured output format. </p>
2764
+ * @public
2765
+ */
2766
+ type: OutputFormatType | undefined;
2767
+ /**
2768
+ * <p> The structure that the model's output must adhere to. </p>
2769
+ * @public
2770
+ */
2771
+ structure: OutputFormatStructure | undefined;
2772
+ }
2773
+ /**
2774
+ * <p>Output configuration for a model response in a call to <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>.</p>
2775
+ * @public
2776
+ */
2777
+ export interface OutputConfig {
2778
+ /**
2779
+ * <p>Structured output parameters to control the model's text response. </p>
2780
+ * @public
2781
+ */
2782
+ textFormat?: OutputFormat | undefined;
2783
+ }
2703
2784
  /**
2704
2785
  * <p>Performance settings for a model.</p>
2705
2786
  * @public
@@ -2960,6 +3041,11 @@ export interface ToolSpecification {
2960
3041
  * @public
2961
3042
  */
2962
3043
  inputSchema: ToolInputSchema | undefined;
3044
+ /**
3045
+ * <p>Flag to enable structured output enforcement on a tool usage response.</p>
3046
+ * @public
3047
+ */
3048
+ strict?: boolean | undefined;
2963
3049
  }
2964
3050
  /**
2965
3051
  * <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">Call a tool with the Converse API</a> in the Amazon Bedrock User Guide.</p>
@@ -3100,6 +3186,11 @@ export interface ConverseRequest {
3100
3186
  * @public
3101
3187
  */
3102
3188
  serviceTier?: ServiceTier | undefined;
3189
+ /**
3190
+ * <p>Output configuration for a model response.</p>
3191
+ * @public
3192
+ */
3193
+ outputConfig?: OutputConfig | undefined;
3103
3194
  }
3104
3195
  /**
3105
3196
  * <p>Metrics for a call to <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a>.</p>
@@ -3385,6 +3476,11 @@ export interface ConverseStreamRequest {
3385
3476
  * @public
3386
3477
  */
3387
3478
  serviceTier?: ServiceTier | undefined;
3479
+ /**
3480
+ * <p>Output configuration for a model response.</p>
3481
+ * @public
3482
+ */
3483
+ outputConfig?: OutputConfig | undefined;
3388
3484
  }
3389
3485
  /**
3390
3486
  * <p>Contains incremental updates to the source content text during streaming responses, allowing clients to build up the cited content progressively.</p>
@@ -93,6 +93,7 @@ export declare var InvokeModelWithBidirectionalStreamRequest$: StaticStructureSc
93
93
  export declare var InvokeModelWithBidirectionalStreamResponse$: StaticStructureSchema;
94
94
  export declare var InvokeModelWithResponseStreamRequest$: StaticStructureSchema;
95
95
  export declare var InvokeModelWithResponseStreamResponse$: StaticStructureSchema;
96
+ export declare var JsonSchemaDefinition$: StaticStructureSchema;
96
97
  export declare var ListAsyncInvokesRequest$: StaticStructureSchema;
97
98
  export declare var ListAsyncInvokesResponse$: StaticStructureSchema;
98
99
  export declare var Message$: StaticStructureSchema;
@@ -102,6 +103,8 @@ export declare var ModelErrorException$: StaticErrorSchema;
102
103
  export declare var ModelNotReadyException$: StaticErrorSchema;
103
104
  export declare var ModelStreamErrorException$: StaticErrorSchema;
104
105
  export declare var ModelTimeoutException$: StaticErrorSchema;
106
+ export declare var OutputConfig$: StaticStructureSchema;
107
+ export declare var OutputFormat$: StaticStructureSchema;
105
108
  export declare var PayloadPart$: StaticStructureSchema;
106
109
  export declare var PerformanceConfiguration$: StaticStructureSchema;
107
110
  export declare var PromptRouterTrace$: StaticStructureSchema;
@@ -153,6 +156,7 @@ export declare var GuardrailImageSource$: StaticUnionSchema;
153
156
  export declare var ImageSource$: StaticUnionSchema;
154
157
  export declare var InvokeModelWithBidirectionalStreamInput$: StaticUnionSchema;
155
158
  export declare var InvokeModelWithBidirectionalStreamOutput$: StaticUnionSchema;
159
+ export declare var OutputFormatStructure$: StaticUnionSchema;
156
160
  export declare var PromptVariableValues$: StaticUnionSchema;
157
161
  export declare var ReasoningContentBlock$: StaticUnionSchema;
158
162
  export declare var ReasoningContentBlockDelta$: StaticUnionSchema;
@@ -269,6 +269,11 @@ export declare const ConversationRole: {
269
269
  };
270
270
  export type ConversationRole =
271
271
  (typeof ConversationRole)[keyof typeof ConversationRole];
272
+ export declare const OutputFormatType: {
273
+ readonly JSON_SCHEMA: "json_schema";
274
+ };
275
+ export type OutputFormatType =
276
+ (typeof OutputFormatType)[keyof typeof OutputFormatType];
272
277
  export declare const PerformanceConfigLatency: {
273
278
  readonly OPTIMIZED: "optimized";
274
279
  readonly STANDARD: "standard";
@@ -31,6 +31,7 @@ import {
31
31
  GuardrailTrace,
32
32
  GuardrailWordPolicyAction,
33
33
  ImageFormat,
34
+ OutputFormatType,
34
35
  PerformanceConfigLatency,
35
36
  ServiceTierType,
36
37
  SortAsyncInvocationBy,
@@ -1211,6 +1212,35 @@ export interface Message {
1211
1212
  role: ConversationRole | undefined;
1212
1213
  content: ContentBlock[] | undefined;
1213
1214
  }
1215
+ export interface JsonSchemaDefinition {
1216
+ schema: string | undefined;
1217
+ name?: string | undefined;
1218
+ description?: string | undefined;
1219
+ }
1220
+ export type OutputFormatStructure =
1221
+ | OutputFormatStructure.JsonSchemaMember
1222
+ | OutputFormatStructure.$UnknownMember;
1223
+ export declare namespace OutputFormatStructure {
1224
+ interface JsonSchemaMember {
1225
+ jsonSchema: JsonSchemaDefinition;
1226
+ $unknown?: never;
1227
+ }
1228
+ interface $UnknownMember {
1229
+ jsonSchema?: never;
1230
+ $unknown: [string, any];
1231
+ }
1232
+ interface Visitor<T> {
1233
+ jsonSchema: (value: JsonSchemaDefinition) => T;
1234
+ _: (name: string, value: any) => T;
1235
+ }
1236
+ }
1237
+ export interface OutputFormat {
1238
+ type: OutputFormatType | undefined;
1239
+ structure: OutputFormatStructure | undefined;
1240
+ }
1241
+ export interface OutputConfig {
1242
+ textFormat?: OutputFormat | undefined;
1243
+ }
1214
1244
  export interface PerformanceConfiguration {
1215
1245
  latency?: PerformanceConfigLatency | undefined;
1216
1246
  }
@@ -1337,6 +1367,7 @@ export interface ToolSpecification {
1337
1367
  name: string | undefined;
1338
1368
  description?: string | undefined;
1339
1369
  inputSchema: ToolInputSchema | undefined;
1370
+ strict?: boolean | undefined;
1340
1371
  }
1341
1372
  export type Tool =
1342
1373
  | Tool.CachePointMember
@@ -1392,6 +1423,7 @@ export interface ConverseRequest {
1392
1423
  requestMetadata?: Record<string, string> | undefined;
1393
1424
  performanceConfig?: PerformanceConfiguration | undefined;
1394
1425
  serviceTier?: ServiceTier | undefined;
1426
+ outputConfig?: OutputConfig | undefined;
1395
1427
  }
1396
1428
  export interface ConverseMetrics {
1397
1429
  latencyMs: number | undefined;
@@ -1467,6 +1499,7 @@ export interface ConverseStreamRequest {
1467
1499
  requestMetadata?: Record<string, string> | undefined;
1468
1500
  performanceConfig?: PerformanceConfiguration | undefined;
1469
1501
  serviceTier?: ServiceTier | undefined;
1502
+ outputConfig?: OutputConfig | undefined;
1470
1503
  }
1471
1504
  export interface CitationSourceContentDelta {
1472
1505
  text?: string | undefined;
@@ -98,6 +98,7 @@ export declare var InvokeModelWithBidirectionalStreamRequest$: StaticStructureSc
98
98
  export declare var InvokeModelWithBidirectionalStreamResponse$: StaticStructureSchema;
99
99
  export declare var InvokeModelWithResponseStreamRequest$: StaticStructureSchema;
100
100
  export declare var InvokeModelWithResponseStreamResponse$: StaticStructureSchema;
101
+ export declare var JsonSchemaDefinition$: StaticStructureSchema;
101
102
  export declare var ListAsyncInvokesRequest$: StaticStructureSchema;
102
103
  export declare var ListAsyncInvokesResponse$: StaticStructureSchema;
103
104
  export declare var Message$: StaticStructureSchema;
@@ -107,6 +108,8 @@ export declare var ModelErrorException$: StaticErrorSchema;
107
108
  export declare var ModelNotReadyException$: StaticErrorSchema;
108
109
  export declare var ModelStreamErrorException$: StaticErrorSchema;
109
110
  export declare var ModelTimeoutException$: StaticErrorSchema;
111
+ export declare var OutputConfig$: StaticStructureSchema;
112
+ export declare var OutputFormat$: StaticStructureSchema;
110
113
  export declare var PayloadPart$: StaticStructureSchema;
111
114
  export declare var PerformanceConfiguration$: StaticStructureSchema;
112
115
  export declare var PromptRouterTrace$: StaticStructureSchema;
@@ -158,6 +161,7 @@ export declare var GuardrailImageSource$: StaticUnionSchema;
158
161
  export declare var ImageSource$: StaticUnionSchema;
159
162
  export declare var InvokeModelWithBidirectionalStreamInput$: StaticUnionSchema;
160
163
  export declare var InvokeModelWithBidirectionalStreamOutput$: StaticUnionSchema;
164
+ export declare var OutputFormatStructure$: StaticUnionSchema;
161
165
  export declare var PromptVariableValues$: StaticUnionSchema;
162
166
  export declare var ReasoningContentBlock$: StaticUnionSchema;
163
167
  export declare var ReasoningContentBlockDelta$: StaticUnionSchema;
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.982.0",
4
+ "version": "3.983.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
@@ -31,9 +31,9 @@
31
31
  "@aws-sdk/middleware-user-agent": "^3.972.6",
32
32
  "@aws-sdk/middleware-websocket": "^3.972.4",
33
33
  "@aws-sdk/region-config-resolver": "^3.972.3",
34
- "@aws-sdk/token-providers": "3.982.0",
34
+ "@aws-sdk/token-providers": "3.983.0",
35
35
  "@aws-sdk/types": "^3.973.1",
36
- "@aws-sdk/util-endpoints": "3.982.0",
36
+ "@aws-sdk/util-endpoints": "3.983.0",
37
37
  "@aws-sdk/util-user-agent-browser": "^3.972.3",
38
38
  "@aws-sdk/util-user-agent-node": "^3.972.4",
39
39
  "@smithy/config-resolver": "^4.4.6",