Skip to content

Commit ea418df

Browse files
author
awstools
committed
feat(client-bedrock-runtime): Amazon Bedrock Runtime Service Tier Support Launch
1 parent 5d96b68 commit ea418df

File tree

8 files changed

+280
-16
lines changed

8 files changed

+280
-16
lines changed

clients/client-bedrock-runtime/src/commands/ConverseCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,9 @@ export interface ConverseCommandOutput extends ConverseResponse, __MetadataBeare
280280
* performanceConfig: { // PerformanceConfiguration
281281
* latency: "standard" || "optimized",
282282
* },
283+
* serviceTier: { // ServiceTier
284+
* type: "priority" || "default" || "flex", // required
285+
* },
283286
* };
284287
* const command = new ConverseCommand(input);
285288
* const response = await client.send(command);
@@ -886,6 +889,9 @@ export interface ConverseCommandOutput extends ConverseResponse, __MetadataBeare
886889
* // performanceConfig: { // PerformanceConfiguration
887890
* // latency: "standard" || "optimized",
888891
* // },
892+
* // serviceTier: { // ServiceTier
893+
* // type: "priority" || "default" || "flex", // required
894+
* // },
889895
* // };
890896
*
891897
* ```

clients/client-bedrock-runtime/src/commands/ConverseStreamCommand.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
281281
* performanceConfig: { // PerformanceConfiguration
282282
* latency: "standard" || "optimized",
283283
* },
284+
* serviceTier: { // ServiceTier
285+
* type: "priority" || "default" || "flex", // required
286+
* },
284287
* };
285288
* const command = new ConverseStreamCommand(input);
286289
* const response = await client.send(command);
@@ -792,6 +795,9 @@ export interface ConverseStreamCommandOutput extends ConverseStreamResponse, __M
792795
* // performanceConfig: { // PerformanceConfiguration
793796
* // latency: "standard" || "optimized",
794797
* // },
798+
* // serviceTier: { // ServiceTier
799+
* // type: "priority" || "default" || "flex", // required
800+
* // },
795801
* // },
796802
* // internalServerException: { // InternalServerException
797803
* // message: "STRING_VALUE",

clients/client-bedrock-runtime/src/commands/CountTokensCommand.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,31 @@ export interface CountTokensCommandOutput extends CountTokensResponse, __Metadat
233233
* },
234234
* },
235235
* ],
236+
* toolConfig: { // ToolConfiguration
237+
* tools: [ // Tools // required
238+
* { // Tool Union: only one key present
239+
* toolSpec: { // ToolSpecification
240+
* name: "STRING_VALUE", // required
241+
* description: "STRING_VALUE",
242+
* inputSchema: { // ToolInputSchema Union: only one key present
243+
* json: "DOCUMENT_VALUE",
244+
* },
245+
* },
246+
* systemTool: { // SystemTool
247+
* name: "STRING_VALUE", // required
248+
* },
249+
* cachePoint: "<CachePointBlock>",
250+
* },
251+
* ],
252+
* toolChoice: { // ToolChoice Union: only one key present
253+
* auto: {},
254+
* any: {},
255+
* tool: { // SpecificToolChoice
256+
* name: "STRING_VALUE", // required
257+
* },
258+
* },
259+
* },
260+
* additionalModelRequestFields: "DOCUMENT_VALUE",
236261
* },
237262
* },
238263
* };

clients/client-bedrock-runtime/src/commands/InvokeModelCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,15 @@ export interface InvokeModelCommandOutput extends InvokeModelCommandOutputType,
6060
* guardrailIdentifier: "STRING_VALUE",
6161
* guardrailVersion: "STRING_VALUE",
6262
* performanceConfigLatency: "standard" || "optimized",
63+
* serviceTier: "priority" || "default" || "flex",
6364
* };
6465
* const command = new InvokeModelCommand(input);
6566
* const response = await client.send(command);
6667
* // { // InvokeModelResponse
6768
* // body: new Uint8Array(), // required
6869
* // contentType: "STRING_VALUE", // required
6970
* // performanceConfigLatency: "standard" || "optimized",
71+
* // serviceTier: "priority" || "default" || "flex",
7072
* // };
7173
*
7274
* ```

clients/client-bedrock-runtime/src/commands/InvokeModelWithResponseStreamCommand.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export interface InvokeModelWithResponseStreamCommandOutput
5454
* guardrailIdentifier: "STRING_VALUE",
5555
* guardrailVersion: "STRING_VALUE",
5656
* performanceConfigLatency: "standard" || "optimized",
57+
* serviceTier: "priority" || "default" || "flex",
5758
* };
5859
* const command = new InvokeModelWithResponseStreamCommand(input);
5960
* const response = await client.send(command);
@@ -85,6 +86,7 @@ export interface InvokeModelWithResponseStreamCommandOutput
8586
* // },
8687
* // contentType: "STRING_VALUE", // required
8788
* // performanceConfigLatency: "standard" || "optimized",
89+
* // serviceTier: "priority" || "default" || "flex",
8890
* // };
8991
*
9092
* ```

clients/client-bedrock-runtime/src/models/models_0.ts

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3480,6 +3480,33 @@ export namespace PromptVariableValues {
34803480
}
34813481
}
34823482

3483+
/**
3484+
* @public
3485+
* @enum
3486+
*/
3487+
export const ServiceTierType = {
3488+
DEFAULT: "default",
3489+
FLEX: "flex",
3490+
PRIORITY: "priority",
3491+
} as const;
3492+
3493+
/**
3494+
* @public
3495+
*/
3496+
export type ServiceTierType = (typeof ServiceTierType)[keyof typeof ServiceTierType];
3497+
3498+
/**
3499+
* <p>Specifies the processing tier configuration used for serving the request.</p>
3500+
* @public
3501+
*/
3502+
export interface ServiceTier {
3503+
/**
3504+
* <p>Specifies the processing tier type used for serving the request.</p>
3505+
* @public
3506+
*/
3507+
type: ServiceTierType | undefined;
3508+
}
3509+
34833510
/**
34843511
* <p>Contains configurations for instructions to provide the model for how to handle input. To learn more, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference-call.html">Using the Converse API</a>.</p>
34853512
* @public
@@ -3867,6 +3894,12 @@ export interface ConverseRequest {
38673894
* @public
38683895
*/
38693896
performanceConfig?: PerformanceConfiguration | undefined;
3897+
3898+
/**
3899+
* <p>Specifies the processing tier configuration used for serving the request.</p>
3900+
* @public
3901+
*/
3902+
serviceTier?: ServiceTier | undefined;
38703903
}
38713904

38723905
/**
@@ -4078,6 +4111,12 @@ export interface ConverseResponse {
40784111
* @public
40794112
*/
40804113
performanceConfig?: PerformanceConfiguration | undefined;
4114+
4115+
/**
4116+
* <p>Specifies the processing tier configuration used for serving the request.</p>
4117+
* @public
4118+
*/
4119+
serviceTier?: ServiceTier | undefined;
40814120
}
40824121

40834122
/**
@@ -4269,6 +4308,12 @@ export interface ConverseStreamRequest {
42694308
* @public
42704309
*/
42714310
performanceConfig?: PerformanceConfiguration | undefined;
4311+
4312+
/**
4313+
* <p>Specifies the processing tier configuration used for serving the request.</p>
4314+
* @public
4315+
*/
4316+
serviceTier?: ServiceTier | undefined;
42724317
}
42734318

42744319
/**
@@ -4769,6 +4814,12 @@ export interface ConverseStreamMetadataEvent {
47694814
* @public
47704815
*/
47714816
performanceConfig?: PerformanceConfiguration | undefined;
4817+
4818+
/**
4819+
* <p>Specifies the processing tier configuration used for serving the request.</p>
4820+
* @public
4821+
*/
4822+
serviceTier?: ServiceTier | undefined;
47724823
}
47734824

47744825
/**
@@ -5151,6 +5202,12 @@ export interface InvokeModelRequest {
51515202
* @public
51525203
*/
51535204
performanceConfigLatency?: PerformanceConfigLatency | undefined;
5205+
5206+
/**
5207+
* <p>Specifies the processing tier type used for serving the request.</p>
5208+
* @public
5209+
*/
5210+
serviceTier?: ServiceTierType | undefined;
51545211
}
51555212

51565213
/**
@@ -5174,6 +5231,12 @@ export interface InvokeModelResponse {
51745231
* @public
51755232
*/
51765233
performanceConfigLatency?: PerformanceConfigLatency | undefined;
5234+
5235+
/**
5236+
* <p>Specifies the processing tier type used for serving the request.</p>
5237+
* @public
5238+
*/
5239+
serviceTier?: ServiceTierType | undefined;
51775240
}
51785241

51795242
/**
@@ -5471,6 +5534,12 @@ export interface InvokeModelWithResponseStreamRequest {
54715534
* @public
54725535
*/
54735536
performanceConfigLatency?: PerformanceConfigLatency | undefined;
5537+
5538+
/**
5539+
* <p>Specifies the processing tier type used for serving the request.</p>
5540+
* @public
5541+
*/
5542+
serviceTier?: ServiceTierType | undefined;
54745543
}
54755544

54765545
/**
@@ -5659,6 +5728,12 @@ export interface InvokeModelWithResponseStreamResponse {
56595728
* @public
56605729
*/
56615730
performanceConfigLatency?: PerformanceConfigLatency | undefined;
5731+
5732+
/**
5733+
* <p>Specifies the processing tier type used for serving the request.</p>
5734+
* @public
5735+
*/
5736+
serviceTier?: ServiceTierType | undefined;
56625737
}
56635738

56645739
/**
@@ -5677,6 +5752,18 @@ export interface ConverseTokensRequest {
56775752
* @public
56785753
*/
56795754
system?: SystemContentBlock[] | undefined;
5755+
5756+
/**
5757+
* <p>The toolConfig of Converse input request to count tokens for. Configuration information for the tools that the model can use when generating a response.</p>
5758+
* @public
5759+
*/
5760+
toolConfig?: ToolConfiguration | undefined;
5761+
5762+
/**
5763+
* <p>The additionalModelRequestFields of Converse input request to count tokens for. Use this field when you want to pass additional parameters that the model supports.</p>
5764+
* @public
5765+
*/
5766+
additionalModelRequestFields?: __DocumentType | undefined;
56805767
}
56815768

56825769
/**

0 commit comments

Comments
 (0)