Skip to content

Commit 1c527a3

Browse files
authored
chore(bedrock): update foundation models (#29468)
### Issue # (if applicable) Could not find any in the backlog ### Reason for this change Update the CDK listed Bedrock foundation models to match the current availability, as well as add missing deprecated versions ### Description of changes * Added new models * Marked existing models as deprecated ### Description of how you validated changes I compared the current CDK models to live SDK data, using the `bedrock:ListFoundationModels` API results. Deprecated versions were established using the `modelLifecycle.status` field ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 7534dcd commit 1c527a3

File tree

1 file changed

+109
-10
lines changed

1 file changed

+109
-10
lines changed

packages/aws-cdk-lib/aws-bedrock/lib/foundation-model.ts

+109-10
Original file line numberDiff line numberDiff line change
@@ -8,60 +8,159 @@ import { ArnFormat, Stack } from '../../core';
88
* @see https://docs.aws.amazon.com/bedrock/latest/userguide/model-ids.html
99
*/
1010
export class FoundationModelIdentifier {
11-
/** Base model "ai21.j2-mid-v1". */
12-
public static readonly AI21_LABS_JURASSIC_2_MID_V1 = new FoundationModelIdentifier('ai21.j2-mid-v1');
11+
/** Base model "amazon.titan-tg1-large". */
12+
public static readonly AMAZON_TITAN_TG1_LARGE = new FoundationModelIdentifier('amazon.titan-tg1-large');
1313

14-
/** Base model "ai21.j2-ultra-v1". */
15-
public static readonly AI21_LABS_JURASSIC_2_ULTRA_V1 = new FoundationModelIdentifier('ai21.j2-ultra-v1');
14+
/** Base model "amazon.titan-text-lite-v1". */
15+
public static readonly AMAZON_TITAN_TEXT_LITE_V1 = new FoundationModelIdentifier('amazon.titan-text-lite-v1');
1616

17-
/** Base model "amazon.titan-embed-text-v1". */
18-
public static readonly AMAZON_TITAN_EMBEDDINGS_G1_TEXT_V1 = new FoundationModelIdentifier('amazon.titan-embed-text-v1');
17+
/** Base model "amazon.titan-text-lite-v1:0:4k". */
18+
public static readonly AMAZON_TITAN_TEXT_LITE_V1_0_4K = new FoundationModelIdentifier('amazon.titan-text-lite-v1:0:4k');
19+
20+
/** Base model "amazon.titan-text-express-v1:0:8k". */
21+
public static readonly AMAZON_TITAN_TEXT_EXPRESS_V1_0_8K = new FoundationModelIdentifier('amazon.titan-text-express-v1:0:8k');
1922

2023
/** Base model "amazon.titan-text-express-v1". */
2124
public static readonly AMAZON_TITAN_TEXT_G1_EXPRESS_V1 = new FoundationModelIdentifier('amazon.titan-text-express-v1');
2225

23-
/** Base model "amazon.titan-embed-image-v1". */
24-
public static readonly AMAZON_TITAN_MULTIMODAL_EMBEDDINGS_G1_V1 = new FoundationModelIdentifier('amazon.titan-embed-image-v1');
26+
/** Base model "amazon.titan-embed-text-v1". */
27+
public static readonly AMAZON_TITAN_EMBEDDINGS_G1_TEXT_V1 = new FoundationModelIdentifier('amazon.titan-embed-text-v1');
28+
29+
/** Base model "amazon.titan-embed-text-v1:2:8k". */
30+
public static readonly AMAZON_TITAN_EMBED_TEXT_V1_2_8K = new FoundationModelIdentifier('amazon.titan-embed-text-v1:2:8k');
31+
32+
/** Base model "amazon.titan-embed-g1-text-02". */
33+
public static readonly AMAZON_TITAN_EMBED_G1_TEXT_02 = new FoundationModelIdentifier('amazon.titan-embed-g1-text-02');
2534

2635
/** Base model "amazon.titan-image-generator-v1". */
2736
public static readonly AMAZON_TITAN_IMAGE_GENERATOR_G1_V1 = new FoundationModelIdentifier('amazon.titan-image-generator-v1');
2837

29-
/** Base model "anthropic.claude-v1". */
38+
/** Base model "amazon.titan-image-generator-v1:0". */
39+
public static readonly AMAZON_TITAN_IMAGE_GENERATOR_V1_0 = new FoundationModelIdentifier('amazon.titan-image-generator-v1:0');
40+
41+
/** Base model "amazon.titan-embed-image-v1:0". */
42+
public static readonly AMAZON_TITAN_EMBED_IMAGE_V1_0 = new FoundationModelIdentifier('amazon.titan-embed-image-v1:0');
43+
44+
/** Base model "amazon.titan-embed-image-v1". */
45+
public static readonly AMAZON_TITAN_MULTIMODAL_EMBEDDINGS_G1_V1 = new FoundationModelIdentifier('amazon.titan-embed-image-v1');
46+
47+
/** Base model "ai21.j2-mid". */
48+
public static readonly AI21_J2_MID = new FoundationModelIdentifier('ai21.j2-mid');
49+
50+
/** Base model "ai21.j2-mid-v1". */
51+
public static readonly AI21_LABS_JURASSIC_2_MID_V1 = new FoundationModelIdentifier('ai21.j2-mid-v1');
52+
53+
/** Base model "ai21.j2-ultra". */
54+
public static readonly AI21_J2_ULTRA = new FoundationModelIdentifier('ai21.j2-ultra');
55+
56+
/** Base model "ai21.j2-ultra-v1". */
57+
public static readonly AI21_LABS_JURASSIC_2_ULTRA_V1 = new FoundationModelIdentifier('ai21.j2-ultra-v1');
58+
59+
/** Base model "ai21.j2-grande-instruct". */
60+
public static readonly AI21_J2_GRANDE_INSTRUCT = new FoundationModelIdentifier('ai21.j2-grande-instruct');
61+
62+
/** Base model "ai21.j2-jumbo-instruct". */
63+
public static readonly AI21_J2_JUMBO_INSTRUCT = new FoundationModelIdentifier('ai21.j2-jumbo-instruct');
64+
65+
/**
66+
* Base model "anthropic.claude-v1".
67+
* @deprecated use latest version of the model
68+
**/
3069
public static readonly ANTHROPIC_CLAUDE_V1 = new FoundationModelIdentifier('anthropic.claude-v1');
3170

3271
/** Base model "anthropic.claude-v2". */
3372
public static readonly ANTHROPIC_CLAUDE_V2 = new FoundationModelIdentifier('anthropic.claude-v2');
3473

74+
/** Base model "anthropic.claude-v2:0:18k". */
75+
public static readonly ANTHROPIC_CLAUDE_V2_0_18K = new FoundationModelIdentifier('anthropic.claude-v2:0:18k');
76+
77+
/** Base model "anthropic.claude-v2:0:100k". */
78+
public static readonly ANTHROPIC_CLAUDE_V2_0_100K = new FoundationModelIdentifier('anthropic.claude-v2:0:100k');
79+
3580
/** Base model "anthropic.claude-v2:1". */
3681
public static readonly ANTHROPIC_CLAUDE_V2_1 = new FoundationModelIdentifier('anthropic.claude-v2:1');
3782

83+
/** Base model "anthropic.claude-v2:1:18k". */
84+
public static readonly ANTHROPIC_CLAUDE_V2_1_18K = new FoundationModelIdentifier('anthropic.claude-v2:1:18k');
85+
86+
/** Base model "anthropic.claude-v2:1:200k". */
87+
public static readonly ANTHROPIC_CLAUDE_V2_1_200K = new FoundationModelIdentifier('anthropic.claude-v2:1:200k');
88+
89+
/** Base model "anthropic.claude-3-sonnet-20240229-v1:0". */
90+
public static readonly ANTHROPIC_CLAUDE_3_SONNET_20240229_V1_0 = new FoundationModelIdentifier('anthropic.claude-3-sonnet-20240229-v1:0');
91+
3892
/** Base model "anthropic.claude-instant-v1". */
3993
public static readonly ANTHROPIC_CLAUDE_INSTANT_V1 = new FoundationModelIdentifier('anthropic.claude-instant-v1');
4094

95+
/** Base model "anthropic.claude-instant-v1:2:100k". */
96+
public static readonly ANTHROPIC_CLAUDE_INSTANT_V1_2_100K = new FoundationModelIdentifier('anthropic.claude-instant-v1:2:100k');
97+
4198
/** Base model "cohere.command-text-v14". */
4299
public static readonly COHERE_COMMAND_V14 = new FoundationModelIdentifier('cohere.command-text-v14');
43100

44101
/** Base model "cohere.command-light-text-v14". */
45102
public static readonly COHERE_COMMAND_LIGHT_V14 = new FoundationModelIdentifier('cohere.command-light-text-v14');
46103

104+
/** Base model "cohere.command-text-v14:7:4k". */
105+
public static readonly COHERE_COMMAND_TEXT_V14_7_4K = new FoundationModelIdentifier('cohere.command-text-v14:7:4k');
106+
107+
/** Base model "cohere.command-light-text-v14:7:4k". */
108+
public static readonly COHERE_COMMAND_LIGHT_TEXT_V14_7_4K = new FoundationModelIdentifier('cohere.command-light-text-v14:7:4k');
109+
47110
/** Base model "cohere.embed-english-v3". */
48111
public static readonly COHERE_EMBED_ENGLISH_V3 = new FoundationModelIdentifier('cohere.embed-english-v3');
49112

50113
/** Base model "cohere.embed-multilingual-v3". */
51114
public static readonly COHERE_EMBED_MULTILINGUAL_V3 = new FoundationModelIdentifier('cohere.embed-multilingual-v3');
52115

116+
/** Base model "meta.llama2-13b-v1". */
117+
public static readonly META_LLAMA_2_13B_V1 = new FoundationModelIdentifier('meta.llama2-13b-v1');
118+
119+
/** Base model "meta.llama2-13b-v1:0:4k". */
120+
public static readonly META_LLAMA_2_13B_V1_0_4K = new FoundationModelIdentifier('meta.llama2-13b-v1:0:4k');
121+
122+
/** Base model "meta.llama2-13b-chat-v1:0:4k". */
123+
public static readonly META_LLAMA_2_13B_CHAT_V1_0_4K = new FoundationModelIdentifier('meta.llama2-13b-chat-v1:0:4k');
124+
125+
/** Base model "meta.llama2-70b-v1". */
126+
public static readonly META_LLAMA_2_70B_V1 = new FoundationModelIdentifier('meta.llama2-70b-v1');
127+
128+
/** Base model "meta.llama2-70b-v1:0:4k". */
129+
public static readonly META_LLAMA_2_70B_V1_0_4K = new FoundationModelIdentifier('meta.llama2-70b-v1:0:4k');
130+
53131
/** Base model "meta.llama2-13b-chat-v1". */
54132
public static readonly META_LLAMA_2_CHAT_13B_V1 = new FoundationModelIdentifier('meta.llama2-13b-chat-v1');
55133

56134
/** Base model "meta.llama2-70b-chat-v1". */
57135
public static readonly META_LLAMA_2_CHAT_70B_V1 = new FoundationModelIdentifier('meta.llama2-70b-chat-v1');
58136

59-
/** Base model "stability.stable-diffusion-xl-v0". */
137+
/** Base model "meta.llama2-70b-chat-v1:0:4k". */
138+
public static readonly META_LLAMA_2_70B_CHAT_V1_0_4K = new FoundationModelIdentifier('meta.llama2-70b-chat-v1:0:4k');
139+
140+
/** Base model "mistral.mistral-7b-instruct-v0:2". */
141+
public static readonly MISTRAL_MISTRAL_7B_INSTRUCT_V0_2 = new FoundationModelIdentifier('mistral.mistral-7b-instruct-v0:2');
142+
143+
/** Base model "mistral.mixtral-8x7b-instruct-v0:1". */
144+
public static readonly MISTRAL_MIXTRAL_8X7B_INSTRUCT_V0_1 = new FoundationModelIdentifier('mistral.mixtral-8x7b-instruct-v0:1');
145+
146+
/**
147+
* Base model "stability.stable-diffusion-xl".
148+
* @deprecated use latest version of the model
149+
**/
150+
public static readonly STABILITY_STABLE_DIFFUSION_XL = new FoundationModelIdentifier('stability.stable-diffusion-xl');
151+
152+
/**
153+
* Base model "stability.stable-diffusion-xl-v0".
154+
* @deprecated use latest version of the model
155+
*/
60156
public static readonly STABILITY_STABLE_DIFFUSION_XL_V0 = new FoundationModelIdentifier('stability.stable-diffusion-xl-v0');
61157

62158
/** Base model "stability.stable-diffusion-xl-v1". */
63159
public static readonly STABILITY_STABLE_DIFFUSION_XL_V1 = new FoundationModelIdentifier('stability.stable-diffusion-xl-v1');
64160

161+
/** Base model "stability.stable-diffusion-xl-v1:0". */
162+
public static readonly STABILITY_STABLE_DIFFUSION_XL_V1_0 = new FoundationModelIdentifier('stability.stable-diffusion-xl-v1:0');
163+
65164
/**
66165
* Constructor for foundation model identifier
67166
* @param modelId the model identifier

0 commit comments

Comments
 (0)