-
Notifications
You must be signed in to change notification settings - Fork 4.3k
chore(bedrock-alpha): add Claude 4 models and missing Cross region inference profile #35908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,37 +19,76 @@ class CrossRegionInferenceProfileError extends Error { | |
| * throughput and resilience during peak demands. | ||
| */ | ||
| export enum CrossRegionInferenceProfileRegion { | ||
| /** | ||
| * Global cross-region Inference Identifier. | ||
| * Routes requests to any supported commercial AWS Region. | ||
| */ | ||
| GLOBAL = 'global', | ||
| /** | ||
| * Cross-region Inference Identifier for the European area. | ||
| * According to the model chosen, this might include: | ||
| * - Frankfurt (`eu-central-1`) | ||
| * - Ireland (`eu-west-1`) | ||
| * - Paris (`eu-west-3`) | ||
| * - London (`eu-west-2`) | ||
| * - Stockholm (`eu-north-1`) | ||
| * - Milan (`eu-south-1`) | ||
| * - Spain (`eu-south-2`) | ||
| * - Zurich (`eu-central-2`) | ||
| */ | ||
| EU = 'eu', | ||
| /** | ||
| * Cross-region Inference Identifier for the United States area. | ||
| * According to the model chosen, this might include: | ||
| * - N. Virginia (`us-east-1`) | ||
| * - Oregon (`us-west-2`) | ||
| * - Ohio (`us-east-2`) | ||
| * - Oregon (`us-west-2`) | ||
| */ | ||
| US = 'us', | ||
| /** | ||
| * Cross-region Inference Identifier for the US GovCloud area. | ||
| * According to the model chosen, this might include: | ||
| * - GovCloud US-East (`us-gov-east-1`) | ||
| * - GovCloud US-West (`us-gov-west-1`) | ||
| */ | ||
| US_GOV = 'us-gov', | ||
| /** | ||
| * Cross-region Inference Identifier for the Asia-Pacific area. | ||
| * According to the model chosen, this might include: | ||
| * - Tokyo (`ap-northeast-1`) | ||
| * - Seoul (`ap-northeast-2`) | ||
| * - Osaka (`ap-northeast-3`) | ||
| * - Mumbai (`ap-south-1`) | ||
| * - Hyderabad (`ap-south-2`) | ||
| * - Singapore (`ap-southeast-1`) | ||
| * - Sydney (`ap-southeast-2`) | ||
| * - Jakarta (`ap-southeast-3`) | ||
| * - Melbourne (`ap-southeast-4`) | ||
| * - Malaysia (`ap-southeast-5`) | ||
| * - Thailand (`ap-southeast-7`) | ||
| * - Taipei (`ap-east-2`) | ||
| * - Middle East (UAE) (`me-central-1`) | ||
| */ | ||
| APAC = 'apac', | ||
| /** | ||
| * Cross-region Inference Identifier for the Japan area. | ||
| * According to the model chosen, this might include: | ||
| * - Tokyo (`ap-northeast-1`) | ||
| * - Osaka (`ap-northeast-3`) | ||
| */ | ||
| JP = 'jp', | ||
| /** | ||
| * Cross-region Inference Identifier for the Australia area. | ||
| * According to the model chosen, this might include: | ||
| * - Sydney (`ap-southeast-2`) | ||
| * - Melbourne (`ap-southeast-4`) | ||
| */ | ||
| AU = 'au', | ||
| } | ||
|
|
||
| /** | ||
| * Mapping of AWS regions to their corresponding geographic areas for cross-region inference. | ||
| * This mapping is used to determine which cross-region inference profile to use based on the current region. | ||
| * This mapping is used to determine which cross-region inference profile to use based on the current region in prompt router. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The mapping here is used only in the prompt router. Due to the expansion of cross-region inference grouping, the relationship between regions and groupings has become 1:n. For example, ap-northeast-1 is included in both APAC and JP. Therefore, if the supported models for the prompt router increases in the future, adjustments to this implementation will likely be necessary. |
||
| */ | ||
| export const REGION_TO_GEO_AREA: { [key: string]: CrossRegionInferenceProfileRegion } = { | ||
| // US Regions | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -344,6 +344,85 @@ export class BedrockFoundationModel implements IBedrockInvokable { | |
| * ANTHROPIC | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While there are other insufficient models besides Anthropic, there are too many to cover. |
||
| ***************************************************************************/ | ||
|
|
||
| /** | ||
| * Anthropic's Claude Haiku 4.5 model, most cost-efficient and fastest. | ||
| * Delivers near-frontier performance with substantially lower cost and faster speeds. | ||
| * | ||
| * Features: | ||
| * - Supports vision (Image input modality) | ||
| * - Cross-region support | ||
| * - Supports Bedrock Agents | ||
| * - Best for: Large-scale deployments, budget-conscious applications, real-time customer service, latency-sensitive use cases | ||
| */ | ||
|
Comment on lines
+348
to
+356
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm unsure about the extent to which we should describe this section. The content is written in the same format as the existing model explanations, based on the content from the following links. https://aws.amazon.com/bedrock/anthropic/ |
||
| public static readonly ANTHROPIC_CLAUDE_HAIKU_4_5_V1_0 = new BedrockFoundationModel( | ||
| 'anthropic.claude-haiku-4-5-20251001-v1:0', | ||
| { supportsAgents: true, supportsCrossRegion: true, optimizedForAgents: true }, | ||
| ); | ||
|
|
||
| /** | ||
| * Anthropic's Claude Sonnet 4.5 model, most intelligent in the Claude 4 series. | ||
| * Demonstrates advancements in agent capabilities with enhanced performance in tool handling, | ||
| * memory management, and context processing. Excels at autonomous long-horizon coding tasks. | ||
| * | ||
| * Features: | ||
| * - Supports vision (Image input modality) | ||
| * - Cross-region support | ||
| * - Supports Bedrock Agents | ||
| * - Enhanced tool handling and memory management for long-running tasks | ||
| * - Best for: Complex agents, coding, autonomous long-horizon tasks, research and analysis, cybersecurity and finance applications | ||
| */ | ||
| public static readonly ANTHROPIC_CLAUDE_SONNET_4_5_V1_0 = new BedrockFoundationModel( | ||
| 'anthropic.claude-sonnet-4-5-20250929-v1:0', | ||
| { supportsAgents: true, supportsCrossRegion: true, optimizedForAgents: true }, | ||
| ); | ||
|
|
||
| /** | ||
| * Anthropic's Claude Opus 4.1 model, most advanced for coding and agentic applications. | ||
| * Excels at independently planning and executing complex development tasks end-to-end. | ||
| * Drop-in replacement for Opus 4 with superior performance and precision. | ||
| * | ||
| * Features: | ||
| * - Supports vision (Image input modality) | ||
| * - Cross-region support | ||
| * - Supports Bedrock Agents | ||
| * - Best for: Complex end-to-end development, agentic applications, research, advanced reasoning | ||
| */ | ||
| public static readonly ANTHROPIC_CLAUDE_OPUS_4_1_V1_0 = new BedrockFoundationModel( | ||
| 'anthropic.claude-opus-4-1-20250805-v1:0', | ||
| { supportsAgents: true, supportsCrossRegion: true, optimizedForAgents: true }, | ||
| ); | ||
|
|
||
| /** | ||
| * Anthropic's Claude Opus 4 model, next-generation frontier model. | ||
| * High-performance model for advanced reasoning and complex multi-step tasks. | ||
| * | ||
| * Features: | ||
| * - Supports vision (Image input modality) | ||
| * - Cross-region support | ||
| * - Supports Bedrock Agents | ||
| * - Best for: Advanced reasoning, complex workflows, enterprise applications | ||
| */ | ||
| public static readonly ANTHROPIC_CLAUDE_OPUS_4_V1_0 = new BedrockFoundationModel( | ||
| 'anthropic.claude-opus-4-20250514-v1:0', | ||
| { supportsAgents: true, supportsCrossRegion: true, optimizedForAgents: true }, | ||
| ); | ||
|
|
||
| /** | ||
| * Anthropic's Claude Sonnet 4 model, next-generation frontier model. | ||
| * Advanced model with improved performance for production environments. | ||
| * Balances quality, cost-effectiveness, and responsiveness. | ||
| * | ||
| * Features: | ||
| * - Supports vision (Image input modality) | ||
| * - Cross-region support | ||
| * - Supports Bedrock Agents | ||
| * - Best for: Production applications, complex language tasks, balanced performance and cost | ||
| */ | ||
| public static readonly ANTHROPIC_CLAUDE_SONNET_4_V1_0 = new BedrockFoundationModel( | ||
| 'anthropic.claude-sonnet-4-20250514-v1:0', | ||
| { supportsAgents: true, supportsCrossRegion: true, optimizedForAgents: true }, | ||
| ); | ||
|
|
||
| /** | ||
| * Anthropic's Claude 3.7 Sonnet model, latest in the Claude 3 series. | ||
| * Advanced language model with enhanced capabilities. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding identifiers newly supported in Claude 4
https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-support.html