@aws-sdk/client-bedrock-runtime 3.696.0 → 3.704.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
@@ -74,6 +74,7 @@ __export(src_exports, {
74
74
  ModelStreamErrorException: () => ModelStreamErrorException,
75
75
  ModelTimeoutException: () => ModelTimeoutException,
76
76
  PayloadPartFilterSensitiveLog: () => PayloadPartFilterSensitiveLog,
77
+ PerformanceConfigLatency: () => PerformanceConfigLatency,
77
78
  PromptVariableValues: () => PromptVariableValues,
78
79
  ResourceNotFoundException: () => ResourceNotFoundException,
79
80
  ResponseStream: () => ResponseStream,
@@ -555,6 +556,10 @@ var ConversationRole = {
555
556
  ASSISTANT: "assistant",
556
557
  USER: "user"
557
558
  };
559
+ var PerformanceConfigLatency = {
560
+ OPTIMIZED: "optimized",
561
+ STANDARD: "standard"
562
+ };
558
563
  var PromptVariableValues;
559
564
  ((PromptVariableValues3) => {
560
565
  PromptVariableValues3.visit = /* @__PURE__ */ __name((value, visitor) => {
@@ -898,6 +903,7 @@ var se_ConverseCommand = /* @__PURE__ */ __name(async (input, context) => {
898
903
  guardrailConfig: (_) => (0, import_smithy_client._json)(_),
899
904
  inferenceConfig: (_) => se_InferenceConfiguration(_, context),
900
905
  messages: (_) => se_Messages(_, context),
906
+ performanceConfig: (_) => (0, import_smithy_client._json)(_),
901
907
  promptVariables: (_) => (0, import_smithy_client._json)(_),
902
908
  system: (_) => (0, import_smithy_client._json)(_),
903
909
  toolConfig: (_) => se_ToolConfiguration(_, context)
@@ -921,6 +927,7 @@ var se_ConverseStreamCommand = /* @__PURE__ */ __name(async (input, context) =>
921
927
  guardrailConfig: (_) => (0, import_smithy_client._json)(_),
922
928
  inferenceConfig: (_) => se_InferenceConfiguration(_, context),
923
929
  messages: (_) => se_Messages(_, context),
930
+ performanceConfig: (_) => (0, import_smithy_client._json)(_),
924
931
  promptVariables: (_) => (0, import_smithy_client._json)(_),
925
932
  system: (_) => (0, import_smithy_client._json)(_),
926
933
  toolConfig: (_) => se_ToolConfiguration(_, context)
@@ -936,7 +943,8 @@ var se_InvokeModelCommand = /* @__PURE__ */ __name(async (input, context) => {
936
943
  [_a]: input[_a],
937
944
  [_xabt]: input[_t],
938
945
  [_xabg]: input[_gI],
939
- [_xabg_]: input[_gV]
946
+ [_xabg_]: input[_gV],
947
+ [_xabpl]: input[_pCL]
940
948
  });
941
949
  b.bp("/model/{modelId}/invoke");
942
950
  b.p("modelId", () => input.modelId, "{modelId}", false);
@@ -954,7 +962,8 @@ var se_InvokeModelWithResponseStreamCommand = /* @__PURE__ */ __name(async (inpu
954
962
  [_xaba]: input[_a],
955
963
  [_xabt]: input[_t],
956
964
  [_xabg]: input[_gI],
957
- [_xabg_]: input[_gV]
965
+ [_xabg_]: input[_gV],
966
+ [_xabpl]: input[_pCL]
958
967
  });
959
968
  b.bp("/model/{modelId}/invoke-with-response-stream");
960
969
  b.p("modelId", () => input.modelId, "{modelId}", false);
@@ -995,6 +1004,7 @@ var de_ConverseCommand = /* @__PURE__ */ __name(async (output, context) => {
995
1004
  additionalModelResponseFields: (_) => de_Document(_, context),
996
1005
  metrics: import_smithy_client._json,
997
1006
  output: (_) => de_ConverseOutput((0, import_core2.awsExpectUnion)(_), context),
1007
+ performanceConfig: import_smithy_client._json,
998
1008
  stopReason: import_smithy_client.expectString,
999
1009
  trace: (_) => de_ConverseTrace(_, context),
1000
1010
  usage: import_smithy_client._json
@@ -1019,7 +1029,8 @@ var de_InvokeModelCommand = /* @__PURE__ */ __name(async (output, context) => {
1019
1029
  }
1020
1030
  const contents = (0, import_smithy_client.map)({
1021
1031
  $metadata: deserializeMetadata(output),
1022
- [_cT]: [, output.headers[_ct]]
1032
+ [_cT]: [, output.headers[_ct]],
1033
+ [_pCL]: [, output.headers[_xabpl]]
1023
1034
  });
1024
1035
  const data = await (0, import_smithy_client.collectBody)(output.body, context);
1025
1036
  contents.body = data;
@@ -1031,7 +1042,8 @@ var de_InvokeModelWithResponseStreamCommand = /* @__PURE__ */ __name(async (outp
1031
1042
  }
1032
1043
  const contents = (0, import_smithy_client.map)({
1033
1044
  $metadata: deserializeMetadata(output),
1034
- [_cT]: [, output.headers[_xabct]]
1045
+ [_cT]: [, output.headers[_xabct]],
1046
+ [_pCL]: [, output.headers[_xabpl]]
1035
1047
  });
1036
1048
  const data = output.body;
1037
1049
  contents.body = de_ResponseStream(data, context);
@@ -1599,6 +1611,7 @@ var de_ConverseOutput = /* @__PURE__ */ __name((output, context) => {
1599
1611
  var de_ConverseStreamMetadataEvent = /* @__PURE__ */ __name((output, context) => {
1600
1612
  return (0, import_smithy_client.take)(output, {
1601
1613
  metrics: import_smithy_client._json,
1614
+ performanceConfig: import_smithy_client._json,
1602
1615
  trace: (_) => de_ConverseStreamTrace(_, context),
1603
1616
  usage: import_smithy_client._json
1604
1617
  });
@@ -1774,11 +1787,13 @@ var _cT = "contentType";
1774
1787
  var _ct = "content-type";
1775
1788
  var _gI = "guardrailIdentifier";
1776
1789
  var _gV = "guardrailVersion";
1790
+ var _pCL = "performanceConfigLatency";
1777
1791
  var _t = "trace";
1778
1792
  var _xaba = "x-amzn-bedrock-accept";
1779
1793
  var _xabct = "x-amzn-bedrock-content-type";
1780
1794
  var _xabg = "x-amzn-bedrock-guardrailidentifier";
1781
1795
  var _xabg_ = "x-amzn-bedrock-guardrailversion";
1796
+ var _xabpl = "x-amzn-bedrock-performanceconfig-latency";
1782
1797
  var _xabt = "x-amzn-bedrock-trace";
1783
1798
 
1784
1799
  // src/commands/ApplyGuardrailCommand.ts
@@ -1921,6 +1936,7 @@ var BedrockRuntime = _BedrockRuntime;
1921
1936
  ToolResultStatus,
1922
1937
  ContentBlock,
1923
1938
  ConversationRole,
1939
+ PerformanceConfigLatency,
1924
1940
  PromptVariableValues,
1925
1941
  SystemContentBlock,
1926
1942
  ToolChoice,
@@ -263,6 +263,10 @@ export const ConversationRole = {
263
263
  ASSISTANT: "assistant",
264
264
  USER: "user",
265
265
  };
266
+ export const PerformanceConfigLatency = {
267
+ OPTIMIZED: "optimized",
268
+ STANDARD: "standard",
269
+ };
266
270
  export var PromptVariableValues;
267
271
  (function (PromptVariableValues) {
268
272
  PromptVariableValues.visit = (value, visitor) => {
@@ -33,6 +33,7 @@ export const se_ConverseCommand = async (input, context) => {
33
33
  guardrailConfig: (_) => _json(_),
34
34
  inferenceConfig: (_) => se_InferenceConfiguration(_, context),
35
35
  messages: (_) => se_Messages(_, context),
36
+ performanceConfig: (_) => _json(_),
36
37
  promptVariables: (_) => _json(_),
37
38
  system: (_) => _json(_),
38
39
  toolConfig: (_) => se_ToolConfiguration(_, context),
@@ -54,6 +55,7 @@ export const se_ConverseStreamCommand = async (input, context) => {
54
55
  guardrailConfig: (_) => _json(_),
55
56
  inferenceConfig: (_) => se_InferenceConfiguration(_, context),
56
57
  messages: (_) => se_Messages(_, context),
58
+ performanceConfig: (_) => _json(_),
57
59
  promptVariables: (_) => _json(_),
58
60
  system: (_) => _json(_),
59
61
  toolConfig: (_) => se_ToolConfiguration(_, context),
@@ -69,6 +71,7 @@ export const se_InvokeModelCommand = async (input, context) => {
69
71
  [_xabt]: input[_t],
70
72
  [_xabg]: input[_gI],
71
73
  [_xabg_]: input[_gV],
74
+ [_xabpl]: input[_pCL],
72
75
  });
73
76
  b.bp("/model/{modelId}/invoke");
74
77
  b.p("modelId", () => input.modelId, "{modelId}", false);
@@ -87,6 +90,7 @@ export const se_InvokeModelWithResponseStreamCommand = async (input, context) =>
87
90
  [_xabt]: input[_t],
88
91
  [_xabg]: input[_gI],
89
92
  [_xabg_]: input[_gV],
93
+ [_xabpl]: input[_pCL],
90
94
  });
91
95
  b.bp("/model/{modelId}/invoke-with-response-stream");
92
96
  b.p("modelId", () => input.modelId, "{modelId}", false);
@@ -127,6 +131,7 @@ export const de_ConverseCommand = async (output, context) => {
127
131
  additionalModelResponseFields: (_) => de_Document(_, context),
128
132
  metrics: _json,
129
133
  output: (_) => de_ConverseOutput(__expectUnion(_), context),
134
+ performanceConfig: _json,
130
135
  stopReason: __expectString,
131
136
  trace: (_) => de_ConverseTrace(_, context),
132
137
  usage: _json,
@@ -152,6 +157,7 @@ export const de_InvokeModelCommand = async (output, context) => {
152
157
  const contents = map({
153
158
  $metadata: deserializeMetadata(output),
154
159
  [_cT]: [, output.headers[_ct]],
160
+ [_pCL]: [, output.headers[_xabpl]],
155
161
  });
156
162
  const data = await collectBody(output.body, context);
157
163
  contents.body = data;
@@ -164,6 +170,7 @@ export const de_InvokeModelWithResponseStreamCommand = async (output, context) =
164
170
  const contents = map({
165
171
  $metadata: deserializeMetadata(output),
166
172
  [_cT]: [, output.headers[_xabct]],
173
+ [_pCL]: [, output.headers[_xabpl]],
167
174
  });
168
175
  const data = output.body;
169
176
  contents.body = de_ResponseStream(data, context);
@@ -729,6 +736,7 @@ const de_ConverseOutput = (output, context) => {
729
736
  const de_ConverseStreamMetadataEvent = (output, context) => {
730
737
  return take(output, {
731
738
  metrics: _json,
739
+ performanceConfig: _json,
732
740
  trace: (_) => de_ConverseStreamTrace(_, context),
733
741
  usage: _json,
734
742
  });
@@ -911,9 +919,11 @@ const _cT = "contentType";
911
919
  const _ct = "content-type";
912
920
  const _gI = "guardrailIdentifier";
913
921
  const _gV = "guardrailVersion";
922
+ const _pCL = "performanceConfigLatency";
914
923
  const _t = "trace";
915
924
  const _xaba = "x-amzn-bedrock-accept";
916
925
  const _xabct = "x-amzn-bedrock-content-type";
917
926
  const _xabg = "x-amzn-bedrock-guardrailidentifier";
918
927
  const _xabg_ = "x-amzn-bedrock-guardrailversion";
928
+ const _xabpl = "x-amzn-bedrock-performanceconfig-latency";
919
929
  const _xabt = "x-amzn-bedrock-trace";
@@ -165,22 +165,27 @@ declare const ApplyGuardrailCommand_base: {
165
165
  * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
166
166
  *
167
167
  * @throws {@link AccessDeniedException} (client fault)
168
- * <p>The request is denied because of missing access permissions.</p>
168
+ * <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
169
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
169
170
  *
170
171
  * @throws {@link InternalServerException} (server fault)
171
- * <p>An internal server error occurred. Retry your request.</p>
172
+ * <p>An internal server error occurred. For troubleshooting this error,
173
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
172
174
  *
173
175
  * @throws {@link ResourceNotFoundException} (client fault)
174
- * <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
176
+ * <p>The specified resource ARN was not found. For troubleshooting this error,
177
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
175
178
  *
176
179
  * @throws {@link ServiceQuotaExceededException} (client fault)
177
180
  * <p>Your request exceeds the service quota for your account. You can view your quotas at <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html">Viewing service quotas</a>. You can resubmit your request later.</p>
178
181
  *
179
182
  * @throws {@link ThrottlingException} (client fault)
180
- * <p>Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html">Provisioned Throughput</a> to increase the rate or number of tokens you can process.</p>
183
+ * <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
184
+ * troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
181
185
  *
182
186
  * @throws {@link ValidationException} (client fault)
183
- * <p>Input validation failed. Check your request parameters and retry the request.</p>
187
+ * <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
188
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
184
189
  *
185
190
  * @throws {@link BedrockRuntimeServiceException}
186
191
  * <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
@@ -42,6 +42,15 @@ declare const ConverseCommand_base: {
42
42
  * <p>For example code, see <i>Converse API examples</i> in the <i>Amazon Bedrock User Guide</i>.
43
43
  * </p>
44
44
  * <p>This operation requires permission for the <code>bedrock:InvokeModel</code> action. </p>
45
+ * <important>
46
+ * <p>To deny all inference access to resources that you specify in the modelId field, you
47
+ * need to deny access to the <code>bedrock:InvokeModel</code> and
48
+ * <code>bedrock:InvokeModelWithResponseStream</code> actions. Doing this also denies
49
+ * access to the resource through the base inference actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html">InvokeModel</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html">InvokeModelWithResponseStream</a>). For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny access for inference on specific models</a>.
50
+ * </p>
51
+ * </important>
52
+ * <p>For troubleshooting some of the common errors you might encounter when using the <code>Converse</code> API,
53
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html">Troubleshooting Amazon Bedrock API Error Codes</a> in the Amazon Bedrock User Guide</p>
45
54
  * @example
46
55
  * Use a bare-bones client and the command you need to make an API call.
47
56
  * ```javascript
@@ -164,6 +173,9 @@ declare const ConverseCommand_base: {
164
173
  * additionalModelResponseFieldPaths: [ // AdditionalModelResponseFieldPaths
165
174
  * "STRING_VALUE",
166
175
  * ],
176
+ * performanceConfig: { // PerformanceConfiguration
177
+ * latency: "standard" || "optimized",
178
+ * },
167
179
  * };
168
180
  * const command = new ConverseCommand(input);
169
181
  * const response = await client.send(command);
@@ -410,6 +422,9 @@ declare const ConverseCommand_base: {
410
422
  * // },
411
423
  * // },
412
424
  * // },
425
+ * // performanceConfig: { // PerformanceConfiguration
426
+ * // latency: "standard" || "optimized",
427
+ * // },
413
428
  * // };
414
429
  *
415
430
  * ```
@@ -421,34 +436,40 @@ declare const ConverseCommand_base: {
421
436
  * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
422
437
  *
423
438
  * @throws {@link AccessDeniedException} (client fault)
424
- * <p>The request is denied because of missing access permissions.</p>
439
+ * <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
440
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
425
441
  *
426
442
  * @throws {@link InternalServerException} (server fault)
427
- * <p>An internal server error occurred. Retry your request.</p>
443
+ * <p>An internal server error occurred. For troubleshooting this error,
444
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
428
445
  *
429
446
  * @throws {@link ModelErrorException} (client fault)
430
447
  * <p>The request failed due to an error while processing the model.</p>
431
448
  *
432
449
  * @throws {@link ModelNotReadyException} (client fault)
433
450
  * <p>The model specified in the request is not ready to serve inference requests. The AWS SDK
434
- * will automatically retry the operation up to 5 times. For information about configuring
435
- * automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i>
436
- * reference guide.</p>
451
+ * will automatically retry the operation up to 5 times. For information about configuring
452
+ * automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i>
453
+ * reference guide.</p>
437
454
  *
438
455
  * @throws {@link ModelTimeoutException} (client fault)
439
456
  * <p>The request took too long to process. Processing time exceeded the model timeout length.</p>
440
457
  *
441
458
  * @throws {@link ResourceNotFoundException} (client fault)
442
- * <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
459
+ * <p>The specified resource ARN was not found. For troubleshooting this error,
460
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
443
461
  *
444
462
  * @throws {@link ServiceUnavailableException} (server fault)
445
- * <p>The service isn't currently available. Try again later.</p>
463
+ * <p>The service isn't currently available. For troubleshooting this error,
464
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
446
465
  *
447
466
  * @throws {@link ThrottlingException} (client fault)
448
- * <p>Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html">Provisioned Throughput</a> to increase the rate or number of tokens you can process.</p>
467
+ * <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
468
+ * troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
449
469
  *
450
470
  * @throws {@link ValidationException} (client fault)
451
- * <p>Input validation failed. Check your request parameters and retry the request.</p>
471
+ * <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
472
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
452
473
  *
453
474
  * @throws {@link BedrockRuntimeServiceException}
454
475
  * <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
@@ -48,6 +48,15 @@ declare const ConverseStreamCommand_base: {
48
48
  * <p>For example code, see <i>Conversation streaming example</i> in the <i>Amazon Bedrock User Guide</i>.
49
49
  * </p>
50
50
  * <p>This operation requires permission for the <code>bedrock:InvokeModelWithResponseStream</code> action.</p>
51
+ * <important>
52
+ * <p>To deny all inference access to resources that you specify in the modelId field, you
53
+ * need to deny access to the <code>bedrock:InvokeModel</code> and
54
+ * <code>bedrock:InvokeModelWithResponseStream</code> actions. Doing this also denies
55
+ * access to the resource through the base inference actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModel.html">InvokeModel</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_InvokeModelWithResponseStream.html">InvokeModelWithResponseStream</a>). For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny access for inference on specific models</a>.
56
+ * </p>
57
+ * </important>
58
+ * <p>For troubleshooting some of the common errors you might encounter when using the <code>ConverseStream</code> API,
59
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html">Troubleshooting Amazon Bedrock API Error Codes</a> in the Amazon Bedrock User Guide</p>
51
60
  * @example
52
61
  * Use a bare-bones client and the command you need to make an API call.
53
62
  * ```javascript
@@ -171,6 +180,9 @@ declare const ConverseStreamCommand_base: {
171
180
  * additionalModelResponseFieldPaths: [ // AdditionalModelResponseFieldPaths
172
181
  * "STRING_VALUE",
173
182
  * ],
183
+ * performanceConfig: { // PerformanceConfiguration
184
+ * latency: "standard" || "optimized",
185
+ * },
174
186
  * };
175
187
  * const command = new ConverseStreamCommand(input);
176
188
  * const response = await client.send(command);
@@ -386,6 +398,9 @@ declare const ConverseStreamCommand_base: {
386
398
  * // },
387
399
  * // },
388
400
  * // },
401
+ * // performanceConfig: { // PerformanceConfiguration
402
+ * // latency: "standard" || "optimized",
403
+ * // },
389
404
  * // },
390
405
  * // internalServerException: { // InternalServerException
391
406
  * // message: "STRING_VALUE",
@@ -416,34 +431,40 @@ declare const ConverseStreamCommand_base: {
416
431
  * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
417
432
  *
418
433
  * @throws {@link AccessDeniedException} (client fault)
419
- * <p>The request is denied because of missing access permissions.</p>
434
+ * <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
435
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
420
436
  *
421
437
  * @throws {@link InternalServerException} (server fault)
422
- * <p>An internal server error occurred. Retry your request.</p>
438
+ * <p>An internal server error occurred. For troubleshooting this error,
439
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
423
440
  *
424
441
  * @throws {@link ModelErrorException} (client fault)
425
442
  * <p>The request failed due to an error while processing the model.</p>
426
443
  *
427
444
  * @throws {@link ModelNotReadyException} (client fault)
428
445
  * <p>The model specified in the request is not ready to serve inference requests. The AWS SDK
429
- * will automatically retry the operation up to 5 times. For information about configuring
430
- * automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i>
431
- * reference guide.</p>
446
+ * will automatically retry the operation up to 5 times. For information about configuring
447
+ * automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i>
448
+ * reference guide.</p>
432
449
  *
433
450
  * @throws {@link ModelTimeoutException} (client fault)
434
451
  * <p>The request took too long to process. Processing time exceeded the model timeout length.</p>
435
452
  *
436
453
  * @throws {@link ResourceNotFoundException} (client fault)
437
- * <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
454
+ * <p>The specified resource ARN was not found. For troubleshooting this error,
455
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
438
456
  *
439
457
  * @throws {@link ServiceUnavailableException} (server fault)
440
- * <p>The service isn't currently available. Try again later.</p>
458
+ * <p>The service isn't currently available. For troubleshooting this error,
459
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
441
460
  *
442
461
  * @throws {@link ThrottlingException} (client fault)
443
- * <p>Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html">Provisioned Throughput</a> to increase the rate or number of tokens you can process.</p>
462
+ * <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
463
+ * troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
444
464
  *
445
465
  * @throws {@link ValidationException} (client fault)
446
- * <p>Input validation failed. Check your request parameters and retry the request.</p>
466
+ * <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
467
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
447
468
  *
448
469
  * @throws {@link BedrockRuntimeServiceException}
449
470
  * <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
@@ -45,6 +45,15 @@ declare const InvokeModelCommand_base: {
45
45
  * <p>For example code, see <i>Invoke model code examples</i> in the <i>Amazon Bedrock User Guide</i>.
46
46
  * </p>
47
47
  * <p>This operation requires permission for the <code>bedrock:InvokeModel</code> action.</p>
48
+ * <important>
49
+ * <p>To deny all inference access to resources that you specify in the modelId field, you
50
+ * need to deny access to the <code>bedrock:InvokeModel</code> and
51
+ * <code>bedrock:InvokeModelWithResponseStream</code> actions. Doing this also denies
52
+ * access to the resource through the Converse API actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a>). For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny access for inference on specific models</a>.
53
+ * </p>
54
+ * </important>
55
+ * <p>For troubleshooting some of the common errors you might encounter when using the <code>InvokeModel</code> API,
56
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html">Troubleshooting Amazon Bedrock API Error Codes</a> in the Amazon Bedrock User Guide</p>
48
57
  * @example
49
58
  * Use a bare-bones client and the command you need to make an API call.
50
59
  * ```javascript
@@ -59,12 +68,14 @@ declare const InvokeModelCommand_base: {
59
68
  * trace: "ENABLED" || "DISABLED",
60
69
  * guardrailIdentifier: "STRING_VALUE",
61
70
  * guardrailVersion: "STRING_VALUE",
71
+ * performanceConfigLatency: "standard" || "optimized",
62
72
  * };
63
73
  * const command = new InvokeModelCommand(input);
64
74
  * const response = await client.send(command);
65
75
  * // { // InvokeModelResponse
66
76
  * // body: new Uint8Array(), // required
67
77
  * // contentType: "STRING_VALUE", // required
78
+ * // performanceConfigLatency: "standard" || "optimized",
68
79
  * // };
69
80
  *
70
81
  * ```
@@ -76,37 +87,43 @@ declare const InvokeModelCommand_base: {
76
87
  * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
77
88
  *
78
89
  * @throws {@link AccessDeniedException} (client fault)
79
- * <p>The request is denied because of missing access permissions.</p>
90
+ * <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
91
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
80
92
  *
81
93
  * @throws {@link InternalServerException} (server fault)
82
- * <p>An internal server error occurred. Retry your request.</p>
94
+ * <p>An internal server error occurred. For troubleshooting this error,
95
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
83
96
  *
84
97
  * @throws {@link ModelErrorException} (client fault)
85
98
  * <p>The request failed due to an error while processing the model.</p>
86
99
  *
87
100
  * @throws {@link ModelNotReadyException} (client fault)
88
101
  * <p>The model specified in the request is not ready to serve inference requests. The AWS SDK
89
- * will automatically retry the operation up to 5 times. For information about configuring
90
- * automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i>
91
- * reference guide.</p>
102
+ * will automatically retry the operation up to 5 times. For information about configuring
103
+ * automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i>
104
+ * reference guide.</p>
92
105
  *
93
106
  * @throws {@link ModelTimeoutException} (client fault)
94
107
  * <p>The request took too long to process. Processing time exceeded the model timeout length.</p>
95
108
  *
96
109
  * @throws {@link ResourceNotFoundException} (client fault)
97
- * <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
110
+ * <p>The specified resource ARN was not found. For troubleshooting this error,
111
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
98
112
  *
99
113
  * @throws {@link ServiceQuotaExceededException} (client fault)
100
114
  * <p>Your request exceeds the service quota for your account. You can view your quotas at <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html">Viewing service quotas</a>. You can resubmit your request later.</p>
101
115
  *
102
116
  * @throws {@link ServiceUnavailableException} (server fault)
103
- * <p>The service isn't currently available. Try again later.</p>
117
+ * <p>The service isn't currently available. For troubleshooting this error,
118
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
104
119
  *
105
120
  * @throws {@link ThrottlingException} (client fault)
106
- * <p>Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html">Provisioned Throughput</a> to increase the rate or number of tokens you can process.</p>
121
+ * <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
122
+ * troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
107
123
  *
108
124
  * @throws {@link ValidationException} (client fault)
109
- * <p>Input validation failed. Check your request parameters and retry the request.</p>
125
+ * <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
126
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
110
127
  *
111
128
  * @throws {@link BedrockRuntimeServiceException}
112
129
  * <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
@@ -43,6 +43,15 @@ declare const InvokeModelWithResponseStreamCommand_base: {
43
43
  * example</i> in the <i>Amazon Bedrock User Guide</i>.
44
44
  * </p>
45
45
  * <p>This operation requires permissions to perform the <code>bedrock:InvokeModelWithResponseStream</code> action. </p>
46
+ * <important>
47
+ * <p>To deny all inference access to resources that you specify in the modelId field, you
48
+ * need to deny access to the <code>bedrock:InvokeModel</code> and
49
+ * <code>bedrock:InvokeModelWithResponseStream</code> actions. Doing this also denies
50
+ * access to the resource through the Converse API actions (<a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a> and <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html">ConverseStream</a>). For more information see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/security_iam_id-based-policy-examples.html#security_iam_id-based-policy-examples-deny-inference">Deny access for inference on specific models</a>.
51
+ * </p>
52
+ * </important>
53
+ * <p>For troubleshooting some of the common errors you might encounter when using the <code>InvokeModelWithResponseStream</code> API,
54
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html">Troubleshooting Amazon Bedrock API Error Codes</a> in the Amazon Bedrock User Guide</p>
46
55
  * @example
47
56
  * Use a bare-bones client and the command you need to make an API call.
48
57
  * ```javascript
@@ -57,6 +66,7 @@ declare const InvokeModelWithResponseStreamCommand_base: {
57
66
  * trace: "ENABLED" || "DISABLED",
58
67
  * guardrailIdentifier: "STRING_VALUE",
59
68
  * guardrailVersion: "STRING_VALUE",
69
+ * performanceConfigLatency: "standard" || "optimized",
60
70
  * };
61
71
  * const command = new InvokeModelWithResponseStreamCommand(input);
62
72
  * const response = await client.send(command);
@@ -87,6 +97,7 @@ declare const InvokeModelWithResponseStreamCommand_base: {
87
97
  * // },
88
98
  * // },
89
99
  * // contentType: "STRING_VALUE", // required
100
+ * // performanceConfigLatency: "standard" || "optimized",
90
101
  * // };
91
102
  *
92
103
  * ```
@@ -98,19 +109,21 @@ declare const InvokeModelWithResponseStreamCommand_base: {
98
109
  * @see {@link BedrockRuntimeClientResolvedConfig | config} for BedrockRuntimeClient's `config` shape.
99
110
  *
100
111
  * @throws {@link AccessDeniedException} (client fault)
101
- * <p>The request is denied because of missing access permissions.</p>
112
+ * <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
113
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
102
114
  *
103
115
  * @throws {@link InternalServerException} (server fault)
104
- * <p>An internal server error occurred. Retry your request.</p>
116
+ * <p>An internal server error occurred. For troubleshooting this error,
117
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
105
118
  *
106
119
  * @throws {@link ModelErrorException} (client fault)
107
120
  * <p>The request failed due to an error while processing the model.</p>
108
121
  *
109
122
  * @throws {@link ModelNotReadyException} (client fault)
110
123
  * <p>The model specified in the request is not ready to serve inference requests. The AWS SDK
111
- * will automatically retry the operation up to 5 times. For information about configuring
112
- * automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i>
113
- * reference guide.</p>
124
+ * will automatically retry the operation up to 5 times. For information about configuring
125
+ * automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i>
126
+ * reference guide.</p>
114
127
  *
115
128
  * @throws {@link ModelStreamErrorException} (client fault)
116
129
  * <p>An error occurred while streaming the response. Retry your request.</p>
@@ -119,19 +132,23 @@ declare const InvokeModelWithResponseStreamCommand_base: {
119
132
  * <p>The request took too long to process. Processing time exceeded the model timeout length.</p>
120
133
  *
121
134
  * @throws {@link ResourceNotFoundException} (client fault)
122
- * <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
135
+ * <p>The specified resource ARN was not found. For troubleshooting this error,
136
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
123
137
  *
124
138
  * @throws {@link ServiceQuotaExceededException} (client fault)
125
139
  * <p>Your request exceeds the service quota for your account. You can view your quotas at <a href="https://docs.aws.amazon.com/servicequotas/latest/userguide/gs-request-quota.html">Viewing service quotas</a>. You can resubmit your request later.</p>
126
140
  *
127
141
  * @throws {@link ServiceUnavailableException} (server fault)
128
- * <p>The service isn't currently available. Try again later.</p>
142
+ * <p>The service isn't currently available. For troubleshooting this error,
143
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
129
144
  *
130
145
  * @throws {@link ThrottlingException} (client fault)
131
- * <p>Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html">Provisioned Throughput</a> to increase the rate or number of tokens you can process.</p>
146
+ * <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
147
+ * troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
132
148
  *
133
149
  * @throws {@link ValidationException} (client fault)
134
- * <p>Input validation failed. Check your request parameters and retry the request.</p>
150
+ * <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
151
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
135
152
  *
136
153
  * @throws {@link BedrockRuntimeServiceException}
137
154
  * <p>Base exception class for all service exceptions from BedrockRuntime service.</p>
@@ -2,7 +2,8 @@ import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-cli
2
2
  import { DocumentType as __DocumentType } from "@smithy/types";
3
3
  import { BedrockRuntimeServiceException as __BaseException } from "./BedrockRuntimeServiceException";
4
4
  /**
5
- * <p>The request is denied because of missing access permissions.</p>
5
+ * <p>The request is denied because you do not have sufficient permissions to perform the requested action. For troubleshooting this error,
6
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-access-denied">AccessDeniedException</a> in the Amazon Bedrock User Guide</p>
6
7
  * @public
7
8
  */
8
9
  export declare class AccessDeniedException extends __BaseException {
@@ -681,7 +682,8 @@ export interface ApplyGuardrailResponse {
681
682
  guardrailCoverage?: GuardrailCoverage | undefined;
682
683
  }
683
684
  /**
684
- * <p>An internal server error occurred. Retry your request.</p>
685
+ * <p>An internal server error occurred. For troubleshooting this error,
686
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-internal-failure">InternalFailure</a> in the Amazon Bedrock User Guide</p>
685
687
  * @public
686
688
  */
687
689
  export declare class InternalServerException extends __BaseException {
@@ -693,7 +695,8 @@ export declare class InternalServerException extends __BaseException {
693
695
  constructor(opts: __ExceptionOptionType<InternalServerException, __BaseException>);
694
696
  }
695
697
  /**
696
- * <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
698
+ * <p>The specified resource ARN was not found. For troubleshooting this error,
699
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-resource-not-found">ResourceNotFound</a> in the Amazon Bedrock User Guide</p>
697
700
  * @public
698
701
  */
699
702
  export declare class ResourceNotFoundException extends __BaseException {
@@ -717,7 +720,8 @@ export declare class ServiceQuotaExceededException extends __BaseException {
717
720
  constructor(opts: __ExceptionOptionType<ServiceQuotaExceededException, __BaseException>);
718
721
  }
719
722
  /**
720
- * <p>Your request was throttled because of service-wide limitations. Resubmit your request later or in a different region. You can also purchase <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-throughput.html">Provisioned Throughput</a> to increase the rate or number of tokens you can process.</p>
723
+ * <p>Your request was denied due to exceeding the account quotas for <i>Amazon Bedrock</i>. For
724
+ * troubleshooting this error, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-throttling-exception">ThrottlingException</a> in the Amazon Bedrock User Guide</p>
721
725
  * @public
722
726
  */
723
727
  export declare class ThrottlingException extends __BaseException {
@@ -729,7 +733,8 @@ export declare class ThrottlingException extends __BaseException {
729
733
  constructor(opts: __ExceptionOptionType<ThrottlingException, __BaseException>);
730
734
  }
731
735
  /**
732
- * <p>Input validation failed. Check your request parameters and retry the request.</p>
736
+ * <p>The input fails to satisfy the constraints specified by <i>Amazon Bedrock</i>. For troubleshooting this error,
737
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-validation-error">ValidationError</a> in the Amazon Bedrock User Guide</p>
733
738
  * @public
734
739
  */
735
740
  export declare class ValidationException extends __BaseException {
@@ -1322,6 +1327,29 @@ export interface Message {
1322
1327
  */
1323
1328
  content: ContentBlock[] | undefined;
1324
1329
  }
1330
+ /**
1331
+ * @public
1332
+ * @enum
1333
+ */
1334
+ export declare const PerformanceConfigLatency: {
1335
+ readonly OPTIMIZED: "optimized";
1336
+ readonly STANDARD: "standard";
1337
+ };
1338
+ /**
1339
+ * @public
1340
+ */
1341
+ export type PerformanceConfigLatency = (typeof PerformanceConfigLatency)[keyof typeof PerformanceConfigLatency];
1342
+ /**
1343
+ * <p>Performance settings for a model.</p>
1344
+ * @public
1345
+ */
1346
+ export interface PerformanceConfiguration {
1347
+ /**
1348
+ * <p>To use a latency-optimized version of the model, set to <code>optimized</code>.</p>
1349
+ * @public
1350
+ */
1351
+ latency?: PerformanceConfigLatency | undefined;
1352
+ }
1325
1353
  /**
1326
1354
  * <p>Contains a map of variables in a prompt from Prompt management to an object containing the values to fill in for them when running model invocation. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management-how.html">How Prompt management works</a>.</p>
1327
1355
  * @public
@@ -1601,7 +1629,7 @@ export interface ConverseRequest {
1601
1629
  * <p>If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p>
1602
1630
  * </li>
1603
1631
  * <li>
1604
- * <p>To include a prompt that was defined in Prompt management, specify the ARN of the prompt version to use.</p>
1632
+ * <p>To include a prompt that was defined in <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html">Prompt management</a>, specify the ARN of the prompt version to use.</p>
1605
1633
  * </li>
1606
1634
  * </ul>
1607
1635
  * <p>The Converse API doesn't support <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported models</a>.</p>
@@ -1660,7 +1688,7 @@ export interface ConverseRequest {
1660
1688
  * ]</code>
1661
1689
  * </p>
1662
1690
  * <p>For information about the JSON Pointer syntax, see the
1663
- * <a href="https://datatracker.ietf.org/doc/html/rfc6901">Internet Engineering Task Force (IETF)</a> documentation.</p>
1691
+ * <a href="https://datatracker.ietf.org/doc/html/rfc6901">Internet Engineering Task Force (IETF)</a> documentation.</p>
1664
1692
  * <p>
1665
1693
  * <code>Converse</code> and <code>ConverseStream</code> reject an empty JSON Pointer or incorrectly structured
1666
1694
  * JSON Pointer with a <code>400</code> error code. if the JSON Pointer is valid, but the requested
@@ -1668,6 +1696,11 @@ export interface ConverseRequest {
1668
1696
  * @public
1669
1697
  */
1670
1698
  additionalModelResponseFieldPaths?: string[] | undefined;
1699
+ /**
1700
+ * <p>Model performance settings for the request.</p>
1701
+ * @public
1702
+ */
1703
+ performanceConfig?: PerformanceConfiguration | undefined;
1671
1704
  }
1672
1705
  /**
1673
1706
  * <p>Metrics for a call to <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html">Converse</a>.</p>
@@ -1815,6 +1848,11 @@ export interface ConverseResponse {
1815
1848
  * @public
1816
1849
  */
1817
1850
  trace?: ConverseTrace | undefined;
1851
+ /**
1852
+ * <p>Model performance settings for the request.</p>
1853
+ * @public
1854
+ */
1855
+ performanceConfig?: PerformanceConfiguration | undefined;
1818
1856
  }
1819
1857
  /**
1820
1858
  * <p>The request failed due to an error while processing the model.</p>
@@ -1840,9 +1878,9 @@ export declare class ModelErrorException extends __BaseException {
1840
1878
  }
1841
1879
  /**
1842
1880
  * <p>The model specified in the request is not ready to serve inference requests. The AWS SDK
1843
- * will automatically retry the operation up to 5 times. For information about configuring
1844
- * automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i>
1845
- * reference guide.</p>
1881
+ * will automatically retry the operation up to 5 times. For information about configuring
1882
+ * automatic retries, see <a href="https://docs.aws.amazon.com/sdkref/latest/guide/feature-retry-behavior.html">Retry behavior</a> in the <i>AWS SDKs and Tools</i>
1883
+ * reference guide.</p>
1846
1884
  * @public
1847
1885
  */
1848
1886
  export declare class ModelNotReadyException extends __BaseException {
@@ -1867,7 +1905,8 @@ export declare class ModelTimeoutException extends __BaseException {
1867
1905
  constructor(opts: __ExceptionOptionType<ModelTimeoutException, __BaseException>);
1868
1906
  }
1869
1907
  /**
1870
- * <p>The service isn't currently available. Try again later.</p>
1908
+ * <p>The service isn't currently available. For troubleshooting this error,
1909
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
1871
1910
  * @public
1872
1911
  */
1873
1912
  export declare class ServiceUnavailableException extends __BaseException {
@@ -1939,7 +1978,7 @@ export interface ConverseStreamRequest {
1939
1978
  * <p>If you use a custom model, first purchase Provisioned Throughput for it. Then specify the ARN of the resulting provisioned model. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-use.html">Use a custom model in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p>
1940
1979
  * </li>
1941
1980
  * <li>
1942
- * <p>To include a prompt that was defined in Prompt management, specify the ARN of the prompt version to use.</p>
1981
+ * <p>To include a prompt that was defined in <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-management.html">Prompt management</a>, specify the ARN of the prompt version to use.</p>
1943
1982
  * </li>
1944
1983
  * </ul>
1945
1984
  * <p>The Converse API doesn't support <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-customization-import-model.html">imported models</a>.</p>
@@ -1998,7 +2037,7 @@ export interface ConverseStreamRequest {
1998
2037
  * ]</code>
1999
2038
  * </p>
2000
2039
  * <p>For information about the JSON Pointer syntax, see the
2001
- * <a href="https://datatracker.ietf.org/doc/html/rfc6901">Internet Engineering Task Force (IETF)</a> documentation.</p>
2040
+ * <a href="https://datatracker.ietf.org/doc/html/rfc6901">Internet Engineering Task Force (IETF)</a> documentation.</p>
2002
2041
  * <p>
2003
2042
  * <code>Converse</code> and <code>ConverseStream</code> reject an empty JSON Pointer or incorrectly structured
2004
2043
  * JSON Pointer with a <code>400</code> error code. if the JSON Pointer is valid, but the requested
@@ -2006,6 +2045,11 @@ export interface ConverseStreamRequest {
2006
2045
  * @public
2007
2046
  */
2008
2047
  additionalModelResponseFieldPaths?: string[] | undefined;
2048
+ /**
2049
+ * <p>Model performance settings for the request.</p>
2050
+ * @public
2051
+ */
2052
+ performanceConfig?: PerformanceConfiguration | undefined;
2009
2053
  }
2010
2054
  /**
2011
2055
  * <p>The delta for a tool use block.</p>
@@ -2218,6 +2262,11 @@ export interface ConverseStreamMetadataEvent {
2218
2262
  * @public
2219
2263
  */
2220
2264
  trace?: ConverseStreamTrace | undefined;
2265
+ /**
2266
+ * <p>Model performance configuration metadata for the conversation stream event.</p>
2267
+ * @public
2268
+ */
2269
+ performanceConfig?: PerformanceConfiguration | undefined;
2221
2270
  }
2222
2271
  /**
2223
2272
  * <p>An error occurred while streaming the response. Retry your request.</p>
@@ -2431,7 +2480,8 @@ export declare namespace ConverseStreamOutput {
2431
2480
  $unknown?: never;
2432
2481
  }
2433
2482
  /**
2434
- * <p>The service isn't currently available. Try again later.</p>
2483
+ * <p>The service isn't currently available. For troubleshooting this error,
2484
+ * see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/troubleshooting-api-error-codes.html#ts-service-unavailable">ServiceUnavailable</a> in the Amazon Bedrock User Guide</p>
2435
2485
  * @public
2436
2486
  */
2437
2487
  interface ServiceUnavailableExceptionMember {
@@ -2525,12 +2575,15 @@ export interface InvokeModelRequest {
2525
2575
  accept?: string | undefined;
2526
2576
  /**
2527
2577
  * <p>The unique identifier of the model to invoke to run inference.</p>
2528
- * <p>The <code>modelId</code> to provide depends on the type of model that you use:</p>
2578
+ * <p>The <code>modelId</code> to provide depends on the type of model or throughput that you use:</p>
2529
2579
  * <ul>
2530
2580
  * <li>
2531
2581
  * <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p>
2532
2582
  * </li>
2533
2583
  * <li>
2584
+ * <p>If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html">Supported Regions and models for cross-region inference</a> in the Amazon Bedrock User Guide.</p>
2585
+ * </li>
2586
+ * <li>
2534
2587
  * <p>If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</p>
2535
2588
  * </li>
2536
2589
  * <li>
@@ -2571,6 +2624,11 @@ export interface InvokeModelRequest {
2571
2624
  * @public
2572
2625
  */
2573
2626
  guardrailVersion?: string | undefined;
2627
+ /**
2628
+ * <p>Model performance settings for the request.</p>
2629
+ * @public
2630
+ */
2631
+ performanceConfigLatency?: PerformanceConfigLatency | undefined;
2574
2632
  }
2575
2633
  /**
2576
2634
  * @public
@@ -2586,6 +2644,11 @@ export interface InvokeModelResponse {
2586
2644
  * @public
2587
2645
  */
2588
2646
  contentType: string | undefined;
2647
+ /**
2648
+ * <p>Model performance settings for the request.</p>
2649
+ * @public
2650
+ */
2651
+ performanceConfigLatency?: PerformanceConfigLatency | undefined;
2589
2652
  }
2590
2653
  /**
2591
2654
  * @public
@@ -2610,12 +2673,15 @@ export interface InvokeModelWithResponseStreamRequest {
2610
2673
  accept?: string | undefined;
2611
2674
  /**
2612
2675
  * <p>The unique identifier of the model to invoke to run inference.</p>
2613
- * <p>The <code>modelId</code> to provide depends on the type of model that you use:</p>
2676
+ * <p>The <code>modelId</code> to provide depends on the type of model or throughput that you use:</p>
2614
2677
  * <ul>
2615
2678
  * <li>
2616
2679
  * <p>If you use a base model, specify the model ID or its ARN. For a list of model IDs for base models, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html#model-ids-arns">Amazon Bedrock base model IDs (on-demand throughput)</a> in the Amazon Bedrock User Guide.</p>
2617
2680
  * </li>
2618
2681
  * <li>
2682
+ * <p>If you use an inference profile, specify the inference profile ID or its ARN. For a list of inference profile IDs, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference-support.html">Supported Regions and models for cross-region inference</a> in the Amazon Bedrock User Guide.</p>
2683
+ * </li>
2684
+ * <li>
2619
2685
  * <p>If you use a provisioned model, specify the ARN of the Provisioned Throughput. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prov-thru-use.html">Run inference using a Provisioned Throughput</a> in the Amazon Bedrock User Guide.</p>
2620
2686
  * </li>
2621
2687
  * <li>
@@ -2656,6 +2722,11 @@ export interface InvokeModelWithResponseStreamRequest {
2656
2722
  * @public
2657
2723
  */
2658
2724
  guardrailVersion?: string | undefined;
2725
+ /**
2726
+ * <p>Model performance settings for the request.</p>
2727
+ * @public
2728
+ */
2729
+ performanceConfigLatency?: PerformanceConfigLatency | undefined;
2659
2730
  }
2660
2731
  /**
2661
2732
  * <p>Payload content included in the response.</p>
@@ -2762,7 +2833,7 @@ export declare namespace ResponseStream {
2762
2833
  $unknown?: never;
2763
2834
  }
2764
2835
  /**
2765
- * <p>The service isn't currently available. Try again later.</p>
2836
+ * <p>The service isn't available. Try again later.</p>
2766
2837
  * @public
2767
2838
  */
2768
2839
  interface ServiceUnavailableExceptionMember {
@@ -2814,6 +2885,11 @@ export interface InvokeModelWithResponseStreamResponse {
2814
2885
  * @public
2815
2886
  */
2816
2887
  contentType: string | undefined;
2888
+ /**
2889
+ * <p>Model performance settings for the request.</p>
2890
+ * @public
2891
+ */
2892
+ performanceConfigLatency?: PerformanceConfigLatency | undefined;
2817
2893
  }
2818
2894
  /**
2819
2895
  * @internal
@@ -562,6 +562,15 @@ export interface Message {
562
562
  role: ConversationRole | undefined;
563
563
  content: ContentBlock[] | undefined;
564
564
  }
565
+ export declare const PerformanceConfigLatency: {
566
+ readonly OPTIMIZED: "optimized";
567
+ readonly STANDARD: "standard";
568
+ };
569
+ export type PerformanceConfigLatency =
570
+ (typeof PerformanceConfigLatency)[keyof typeof PerformanceConfigLatency];
571
+ export interface PerformanceConfiguration {
572
+ latency?: PerformanceConfigLatency | undefined;
573
+ }
565
574
  export type PromptVariableValues =
566
575
  | PromptVariableValues.TextMember
567
576
  | PromptVariableValues.$UnknownMember;
@@ -703,6 +712,7 @@ export interface ConverseRequest {
703
712
  additionalModelRequestFields?: __DocumentType | undefined;
704
713
  promptVariables?: Record<string, PromptVariableValues> | undefined;
705
714
  additionalModelResponseFieldPaths?: string[] | undefined;
715
+ performanceConfig?: PerformanceConfiguration | undefined;
706
716
  }
707
717
  export interface ConverseMetrics {
708
718
  latencyMs: number | undefined;
@@ -754,6 +764,7 @@ export interface ConverseResponse {
754
764
  metrics: ConverseMetrics | undefined;
755
765
  additionalModelResponseFields?: __DocumentType | undefined;
756
766
  trace?: ConverseTrace | undefined;
767
+ performanceConfig?: PerformanceConfiguration | undefined;
757
768
  }
758
769
  export declare class ModelErrorException extends __BaseException {
759
770
  readonly name: "ModelErrorException";
@@ -808,6 +819,7 @@ export interface ConverseStreamRequest {
808
819
  additionalModelRequestFields?: __DocumentType | undefined;
809
820
  promptVariables?: Record<string, PromptVariableValues> | undefined;
810
821
  additionalModelResponseFieldPaths?: string[] | undefined;
822
+ performanceConfig?: PerformanceConfiguration | undefined;
811
823
  }
812
824
  export interface ToolUseBlockDelta {
813
825
  input: string | undefined;
@@ -889,6 +901,7 @@ export interface ConverseStreamMetadataEvent {
889
901
  usage: TokenUsage | undefined;
890
902
  metrics: ConverseStreamMetrics | undefined;
891
903
  trace?: ConverseStreamTrace | undefined;
904
+ performanceConfig?: PerformanceConfiguration | undefined;
892
905
  }
893
906
  export declare class ModelStreamErrorException extends __BaseException {
894
907
  readonly name: "ModelStreamErrorException";
@@ -1113,10 +1126,12 @@ export interface InvokeModelRequest {
1113
1126
  trace?: Trace | undefined;
1114
1127
  guardrailIdentifier?: string | undefined;
1115
1128
  guardrailVersion?: string | undefined;
1129
+ performanceConfigLatency?: PerformanceConfigLatency | undefined;
1116
1130
  }
1117
1131
  export interface InvokeModelResponse {
1118
1132
  body: Uint8Array | undefined;
1119
1133
  contentType: string | undefined;
1134
+ performanceConfigLatency?: PerformanceConfigLatency | undefined;
1120
1135
  }
1121
1136
  export interface InvokeModelWithResponseStreamRequest {
1122
1137
  body?: Uint8Array | undefined;
@@ -1126,6 +1141,7 @@ export interface InvokeModelWithResponseStreamRequest {
1126
1141
  trace?: Trace | undefined;
1127
1142
  guardrailIdentifier?: string | undefined;
1128
1143
  guardrailVersion?: string | undefined;
1144
+ performanceConfigLatency?: PerformanceConfigLatency | undefined;
1129
1145
  }
1130
1146
  export interface PayloadPart {
1131
1147
  bytes?: Uint8Array | undefined;
@@ -1235,6 +1251,7 @@ export declare namespace ResponseStream {
1235
1251
  export interface InvokeModelWithResponseStreamResponse {
1236
1252
  body: AsyncIterable<ResponseStream> | undefined;
1237
1253
  contentType: string | undefined;
1254
+ performanceConfigLatency?: PerformanceConfigLatency | undefined;
1238
1255
  }
1239
1256
  export declare const ConverseRequestFilterSensitiveLog: (
1240
1257
  obj: ConverseRequest
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.696.0",
4
+ "version": "3.704.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",
@@ -20,10 +20,10 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
- "@aws-sdk/client-sso-oidc": "3.696.0",
24
- "@aws-sdk/client-sts": "3.696.0",
23
+ "@aws-sdk/client-sso-oidc": "3.699.0",
24
+ "@aws-sdk/client-sts": "3.699.0",
25
25
  "@aws-sdk/core": "3.696.0",
26
- "@aws-sdk/credential-provider-node": "3.696.0",
26
+ "@aws-sdk/credential-provider-node": "3.699.0",
27
27
  "@aws-sdk/middleware-host-header": "3.696.0",
28
28
  "@aws-sdk/middleware-logger": "3.696.0",
29
29
  "@aws-sdk/middleware-recursion-detection": "3.696.0",