Class BedrockFoundationModel

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.bedrock.alpha.BedrockFoundationModel
All Implemented Interfaces:
IBedrockInvokable, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-04-02T21:55:35.412Z") @Stability(Experimental) public class BedrockFoundationModel extends software.amazon.jsii.JsiiObject implements IBedrockInvokable
(experimental) Bedrock models.

If you need to use a model name that doesn't exist as a static member, you can instantiate a BedrockFoundationModel object, e.g: new BedrockFoundationModel('my-model').

Example:

 Function parserFunction = Function.Builder.create(this, "ParserFunction")
         .runtime(Runtime.PYTHON_3_10)
         .handler("index.handler")
         .code(Code.fromAsset("lambda"))
         .build();
 Agent agent = Agent.Builder.create(this, "Agent")
         .foundationModel(BedrockFoundationModel.AMAZON_NOVA_LITE_V1)
         .instruction("You are a helpful assistant.")
         .promptOverrideConfiguration(PromptOverrideConfiguration.withCustomParser(CustomParserProps.builder()
                 .parser(parserFunction)
                 .preProcessingStep(PromptPreProcessingConfigCustomParser.builder()
                         .stepType(AgentStepType.PRE_PROCESSING)
                         .useCustomParser(true)
                         .build())
                 .build()))
         .build();
 
  • Field Details

    • AI21_JAMBA_1_5_LARGE_V1

      @Stability(Experimental) public static final BedrockFoundationModel AI21_JAMBA_1_5_LARGE_V1
      (experimental) AI21's Jamba 1.5 Large model optimized for text generation tasks. Suitable for complex language understanding and generation tasks.

      Features:

      • Supports Bedrock Agents integration
      • Optimized for natural language processing
      • Best for: Content generation, summarization, and complex text analysis
    • AI21_JAMBA_1_5_MINI_V1

      @Stability(Experimental) public static final BedrockFoundationModel AI21_JAMBA_1_5_MINI_V1
      (experimental) AI21's Jamba 1.5 Mini model, a lighter version optimized for faster processing. Balances performance with efficiency for general text tasks.

      Features:

      • Supports Bedrock Agents integration
      • Faster response times compared to larger models
      • Best for: Quick text processing, basic content generation
    • AI21_JAMBA_INSTRUCT_V1

      @Stability(Experimental) public static final BedrockFoundationModel AI21_JAMBA_INSTRUCT_V1
      (experimental) AI21's Jamba Instruct model, specifically designed for instruction-following tasks. Optimized for understanding and executing specific instructions.

      Features:

      • Supports Bedrock Agents integration
      • Enhanced instruction understanding
      • Best for: Task-specific instructions, command processing
    • AMAZON_NOVA_LITE_V1

      @Stability(Experimental) public static final BedrockFoundationModel AMAZON_NOVA_LITE_V1
      (experimental) Amazon's Nova Lite model, balancing performance with efficiency.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Optimized for agents
      • Best for: General-purpose language tasks, moderate complexity
    • AMAZON_NOVA_MICRO_V1

      @Stability(Experimental) public static final BedrockFoundationModel AMAZON_NOVA_MICRO_V1
      (experimental) Amazon's Nova Micro model, a lightweight model optimized for efficiency.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Optimized for agents
      • Best for: Quick processing tasks, basic language understanding
    • AMAZON_NOVA_PREMIER_V1

      @Stability(Experimental) public static final BedrockFoundationModel AMAZON_NOVA_PREMIER_V1
      (experimental) Amazon's Nova Premier model, the most advanced in the Nova series.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Optimized for agents
      • Best for: High-end applications, complex analysis, premium performance
    • AMAZON_NOVA_PRO_V1

      @Stability(Experimental) public static final BedrockFoundationModel AMAZON_NOVA_PRO_V1
      (experimental) Amazon's Nova Pro model, offering advanced capabilities for complex tasks.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Optimized for agents
      • Best for: Complex language tasks, professional applications
    • AMAZON_TITAN_PREMIER_V1_0

      @Stability(Experimental) public static final BedrockFoundationModel AMAZON_TITAN_PREMIER_V1_0
      (experimental) Amazon's Titan Text Premier model, designed for high-quality text generation. Offers enhanced capabilities for complex language tasks.

      Features:

      • Supports Bedrock Agents integration
      • Advanced language understanding
      • Best for: Complex content generation, detailed analysis
    • AMAZON_TITAN_TEXT_EXPRESS_V1

      @Stability(Experimental) public static final BedrockFoundationModel AMAZON_TITAN_TEXT_EXPRESS_V1
      (experimental) Amazon's Titan Text Express model, optimized for fast text generation. Provides quick responses while maintaining good quality output.

      Features:

      • Supports Bedrock Agents integration
      • Fast response times
      • Best for: Real-time applications, chatbots, quick content generation
    • ANTHROPIC_CLAUDE_3_5_HAIKU_V1_0

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_3_5_HAIKU_V1_0
      (experimental) Anthropic's Claude 3.5 Haiku model, optimized for quick responses. Lightweight model focused on speed and efficiency.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Optimized for agents
      • Best for: Fast responses, lightweight processing
    • ANTHROPIC_CLAUDE_3_5_SONNET_V1_0

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_3_5_SONNET_V1_0
      (experimental) Anthropic's Claude 3.5 Sonnet V1 model, balanced performance model. Offers good balance between performance and efficiency.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Optimized for agents
      • Best for: General language tasks, balanced performance
    • ANTHROPIC_CLAUDE_3_5_SONNET_V2_0

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_3_5_SONNET_V2_0
      (experimental) Anthropic's Claude 3.5 Sonnet V2 model, optimized for agent interactions. Enhanced version with improved performance and capabilities.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Optimized for agents
      • Best for: Agent-based applications, complex dialogue
    • ANTHROPIC_CLAUDE_3_7_SONNET_V1_0

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_3_7_SONNET_V1_0
      (experimental) Anthropic's Claude 3.7 Sonnet model, latest in the Claude 3 series. Advanced language model with enhanced capabilities.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Best for: Complex reasoning, analysis, and content generation
    • ANTHROPIC_CLAUDE_HAIKU_4_5_V1_0

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_HAIKU_4_5_V1_0
      (experimental) 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
    • ANTHROPIC_CLAUDE_HAIKU_V1_0

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_HAIKU_V1_0
      (experimental) Anthropic's Claude Haiku model, optimized for efficiency. Fast and efficient model for lightweight tasks.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Optimized for agents
      • Best for: Quick responses, simple tasks
    • ANTHROPIC_CLAUDE_INSTANT_V1_2

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_INSTANT_V1_2
      (experimental) Anthropic's Claude Instant V1.2 model, legacy version. Fast and efficient model optimized for quick responses.

      Features:

      • Supports Bedrock Agents integration
      • Legacy model with EOL date
      • Optimized for agents
      • Best for: Quick responses, simple tasks, legacy applications
    • ANTHROPIC_CLAUDE_OPUS_4_1_V1_0

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_OPUS_4_1_V1_0
      (experimental) 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
    • ANTHROPIC_CLAUDE_OPUS_4_5_V1_0

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_OPUS_4_5_V1_0
      (experimental) Anthropic's Claude Opus 4.5 model, the flagship model released November 2025. Excels at real-world programming tasks, scoring highest on SWE-bench Verified benchmarks. Demonstrates superior performance in long-horizon, goal-directed agentic work with fewer dead-ends.

      Features:

      • Supports vision (Image input modality)
      • Cross-region support
      • Supports Bedrock Agents
      • Best for: Software engineering, code migration, agentic workflows, financial modeling, deep research
    • ANTHROPIC_CLAUDE_OPUS_4_6_V1

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_OPUS_4_6_V1
      (experimental) Anthropic's Claude Opus 4.6 model, the most intelligent model and the world's best model for coding, enterprise agents, and professional work. Supports both 200K and 1M context tokens (with the latter in preview). Excels in agentic workflows, complex coding projects, and enterprise applications requiring sophisticated reasoning.

      Features:

      • Supports vision (Image input modality)
      • Cross-region support
      • Supports Bedrock Agents
      • Best for: Financial analysis, cybersecurity, computer use workflows, long-horizon development, multi-tool orchestration
    • ANTHROPIC_CLAUDE_OPUS_4_V1_0

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_OPUS_4_V1_0
      (experimental) 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
    • ANTHROPIC_CLAUDE_OPUS_V1_0

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_OPUS_V1_0
      (experimental) Anthropic's Claude Opus model, designed for advanced tasks. High-performance model with extensive capabilities.

      Features:

      • Supports Bedrock Agents integration
      • Optimized for agents
      • Best for: Complex reasoning, research, and analysis
    • ANTHROPIC_CLAUDE_SONNET_4_5_V1_0

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_SONNET_4_5_V1_0
      (experimental) 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
    • ANTHROPIC_CLAUDE_SONNET_4_6

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_SONNET_4_6
      (experimental) Anthropic's Claude Sonnet 4.6 model. Improved performance for coding, agentic workflows, and browser-based automation.

      Features:

      • Supports vision (Image input modality)
      • Cross-region support
      • Supports Bedrock Agents
      • Best for: Coding, agentic workflows, browser-based automation, enterprise applications
    • ANTHROPIC_CLAUDE_SONNET_4_V1_0

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_SONNET_4_V1_0
      (experimental) 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
    • ANTHROPIC_CLAUDE_SONNET_V1_0

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_SONNET_V1_0
      (experimental) Anthropic's Claude Sonnet model, legacy version. Balanced model for general-purpose tasks.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Legacy model with EOL date
      • Best for: General language tasks, standard applications
    • ANTHROPIC_CLAUDE_V2

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_V2
      (experimental) Anthropic's Claude V2 model, legacy version. Original Claude V2 model with broad capabilities.

      Features:

      • Supports Bedrock Agents integration
      • Legacy model with EOL date
      • Optimized for agents
      • Best for: General language tasks, legacy applications
    • ANTHROPIC_CLAUDE_V2_1

      @Stability(Experimental) public static final BedrockFoundationModel ANTHROPIC_CLAUDE_V2_1
      (experimental) Anthropic's Claude V2.1 model, legacy version. Improved version of Claude V2 with enhanced capabilities.

      Features:

      • Supports Bedrock Agents integration
      • Legacy model with EOL date
      • Optimized for agents
      • Best for: General language tasks, legacy applications
    • COHERE_EMBED_ENGLISH_V3

      @Stability(Experimental) public static final BedrockFoundationModel COHERE_EMBED_ENGLISH_V3
      (experimental) Cohere's English embedding model, optimized for English text embeddings. Specialized for semantic understanding of English content.

      Features:

      • Supports Knowledge Base integration
      • 1024-dimensional vectors
      • Supports both floating-point and binary vectors
      • Best for: English text embeddings, semantic search, content similarity
    • COHERE_EMBED_MULTILINGUAL_V3

      @Stability(Experimental) public static final BedrockFoundationModel COHERE_EMBED_MULTILINGUAL_V3
      (experimental) Cohere's Multilingual embedding model, supporting multiple languages. Enables semantic understanding across different languages.

      Features:

      • Supports Knowledge Base integration
      • 1024-dimensional vectors
      • Supports both floating-point and binary vectors
      • Best for: Cross-lingual embeddings, multilingual semantic search
    • DEEPSEEK_R1_V1

      @Stability(Experimental) public static final BedrockFoundationModel DEEPSEEK_R1_V1
      (experimental) Deepseek's R1 model, designed for general language understanding. Balanced model for various language tasks.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Best for: General language tasks, content generation
    • META_LLAMA_3_1_70_B_INSTRUCT_V1

      @Stability(Experimental) public static final BedrockFoundationModel META_LLAMA_3_1_70_B_INSTRUCT_V1
      (experimental) Meta's Llama 3 70B Instruct model, large-scale instruction model. High-capacity model for complex language understanding.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Best for: Complex instructions, advanced language tasks
    • META_LLAMA_3_1_8_B_INSTRUCT_V1

      @Stability(Experimental) public static final BedrockFoundationModel META_LLAMA_3_1_8_B_INSTRUCT_V1
      (experimental) Meta's Llama 3 1.8B Instruct model, compact instruction-following model. Efficient model optimized for instruction-based tasks.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Best for: Lightweight instruction processing, quick responses
    • META_LLAMA_3_2_11_B_INSTRUCT_V1

      @Stability(Experimental) public static final BedrockFoundationModel META_LLAMA_3_2_11_B_INSTRUCT_V1
      (experimental) Meta's Llama 3.2 11B Instruct model, mid-sized instruction model. Balanced model for general instruction processing.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Best for: General instruction tasks, balanced performance
    • META_LLAMA_3_2_1_B_INSTRUCT_V1

      @Stability(Experimental) public static final BedrockFoundationModel META_LLAMA_3_2_1_B_INSTRUCT_V1
      (experimental) Meta's Llama 3.2 1B Instruct model, ultra-lightweight model. Most compact model in the Llama 3.2 series.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Best for: Simple instructions, fastest response times
    • META_LLAMA_3_2_3_B_INSTRUCT_V1

      @Stability(Experimental) public static final BedrockFoundationModel META_LLAMA_3_2_3_B_INSTRUCT_V1
      (experimental) Meta's Llama 3.2 3B Instruct model, compact efficient model. Lightweight model for basic instruction processing.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Best for: Basic instructions, efficient processing
    • META_LLAMA_3_3_70_B_INSTRUCT_V1

      @Stability(Experimental) public static final BedrockFoundationModel META_LLAMA_3_3_70_B_INSTRUCT_V1
      (experimental) Meta's Llama 3.3 70B Instruct model, latest large-scale model. Advanced model with enhanced capabilities.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Best for: Complex reasoning, advanced language tasks
    • META_LLAMA_4_MAVERICK_17_B_INSTRUCT_V1

      @Stability(Experimental) public static final BedrockFoundationModel META_LLAMA_4_MAVERICK_17_B_INSTRUCT_V1
      (experimental) Meta's Llama 4 Maverick 17B Instruct model, innovative mid-sized model. Specialized for creative and dynamic responses.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Best for: Creative tasks, innovative solutions
    • META_LLAMA_4_SCOUT_17_B_INSTRUCT_V1

      @Stability(Experimental) public static final BedrockFoundationModel META_LLAMA_4_SCOUT_17_B_INSTRUCT_V1
      (experimental) Meta's Llama 4 Scout 17B Instruct model, analytical mid-sized model. Focused on precise and analytical responses.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Best for: Analytical tasks, precise responses
    • MISTRAL_7_B_INSTRUCT_V0

      @Stability(Experimental) public static final BedrockFoundationModel MISTRAL_7_B_INSTRUCT_V0
      (experimental) Mistral's 7B Instruct model, efficient instruction-following model. Balanced performance for instruction processing.

      Features:

      • Supports Bedrock Agents integration
      • Optimized for instruction tasks
      • Best for: General instruction processing, balanced performance
    • MISTRAL_LARGE_2402_V1

      @Stability(Experimental) public static final BedrockFoundationModel MISTRAL_LARGE_2402_V1
      (experimental) Mistral's Large 2402 model, high-capacity language model. Advanced model for complex language understanding.

      Features:

      • Supports Bedrock Agents integration
      • Enhanced language capabilities
      • Best for: Complex reasoning, detailed analysis
    • MISTRAL_LARGE_2407_V1

      @Stability(Experimental) public static final BedrockFoundationModel MISTRAL_LARGE_2407_V1
      (experimental) Mistral's Large 2407 model, updated large-scale model. Enhanced version with improved capabilities.

      Features:

      • Supports Bedrock Agents integration
      • Advanced language processing
      • Best for: Sophisticated language tasks, complex analysis
    • MISTRAL_MIXTRAL_8_X7_B_INSTRUCT_V0

      @Stability(Experimental) public static final BedrockFoundationModel MISTRAL_MIXTRAL_8_X7_B_INSTRUCT_V0
      (experimental) Mistral's Mixtral 8x7B Instruct model, mixture-of-experts architecture. Advanced model combining multiple expert networks.

      Features:

      • Supports Bedrock Agents integration
      • Specialized expert networks
      • Best for: Complex tasks, diverse language understanding
    • MISTRAL_PIXTRAL_LARGE_2502_V1

      @Stability(Experimental) public static final BedrockFoundationModel MISTRAL_PIXTRAL_LARGE_2502_V1
      (experimental) Mistral's Pixtral Large 2502 model, specialized large model. Advanced model with cross-region support.

      Features:

      • Supports Bedrock Agents integration
      • Cross-region support
      • Best for: Advanced language tasks, distributed applications
    • MISTRAL_SMALL_2402_V1

      @Stability(Experimental) public static final BedrockFoundationModel MISTRAL_SMALL_2402_V1
      (experimental) Mistral's Small 2402 model, compact efficient model. Optimized for quick responses and efficiency.

      Features:

      • Supports Bedrock Agents integration
      • Efficient processing
      • Best for: Quick responses, basic language tasks
    • TITAN_EMBED_TEXT_V1

      @Stability(Experimental) public static final BedrockFoundationModel TITAN_EMBED_TEXT_V1
      (experimental) Amazon's Titan Embed Text V1 model for text embeddings.

      Features:

      • Supports Knowledge Base integration
      • 1536-dimensional vectors
      • Floating-point vector type
      • Best for: Text embeddings, semantic search, document similarity
    • TITAN_EMBED_TEXT_V2_1024

      @Stability(Experimental) public static final BedrockFoundationModel TITAN_EMBED_TEXT_V2_1024
      (experimental) Amazon's Titan Embed Text V2 model with 1024-dimensional vectors.

      Features:

      • Supports Knowledge Base integration
      • 1024-dimensional vectors
      • Supports both floating-point and binary vectors
      • Best for: High-dimensional embeddings, advanced semantic search
    • TITAN_EMBED_TEXT_V2_256

      @Stability(Experimental) public static final BedrockFoundationModel TITAN_EMBED_TEXT_V2_256
      (experimental) Amazon's Titan Embed Text V2 model with 256-dimensional vectors.

      Features:

      • Supports Knowledge Base integration
      • 256-dimensional vectors
      • Supports both floating-point and binary vectors
      • Best for: Efficient embeddings with lower dimensionality
    • TITAN_EMBED_TEXT_V2_512

      @Stability(Experimental) public static final BedrockFoundationModel TITAN_EMBED_TEXT_V2_512
      (experimental) Amazon's Titan Embed Text V2 model with 512-dimensional vectors.

      Features:

      • Supports Knowledge Base integration
      • 512-dimensional vectors
      • Supports both floating-point and binary vectors
      • Best for: Balanced performance and dimensionality
  • Constructor Details

    • BedrockFoundationModel

      protected BedrockFoundationModel(software.amazon.jsii.JsiiObjectRef objRef)
    • BedrockFoundationModel

      protected BedrockFoundationModel(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • BedrockFoundationModel

      @Stability(Experimental) public BedrockFoundationModel(@NotNull String value, @Nullable BedrockFoundationModelProps props)
      Parameters:
      value - This parameter is required.
      props -
    • BedrockFoundationModel

      @Stability(Experimental) public BedrockFoundationModel(@NotNull String value)
      Parameters:
      value - This parameter is required.
  • Method Details

    • fromCdkFoundationModel

      @Stability(Experimental) @NotNull public static BedrockFoundationModel fromCdkFoundationModel(@NotNull FoundationModel modelId, @Nullable BedrockFoundationModelProps props)
      (experimental) Creates a BedrockFoundationModel from a FoundationModel.

      Use this method when you have a foundation model from the CDK.

      Parameters:
      modelId -
      • The foundation model.
      This parameter is required.
      props -
      • Optional properties for the model.
      Returns:
      A new BedrockFoundationModel instance
    • fromCdkFoundationModel

      @Stability(Experimental) @NotNull public static BedrockFoundationModel fromCdkFoundationModel(@NotNull FoundationModel modelId)
      (experimental) Creates a BedrockFoundationModel from a FoundationModel.

      Use this method when you have a foundation model from the CDK.

      Parameters:
      modelId -
      • The foundation model.
      This parameter is required.
      Returns:
      A new BedrockFoundationModel instance
    • fromCdkFoundationModelId

      @Stability(Experimental) @NotNull public static BedrockFoundationModel fromCdkFoundationModelId(@NotNull FoundationModelIdentifier modelId, @Nullable BedrockFoundationModelProps props)
      (experimental) Creates a BedrockFoundationModel from a FoundationModelIdentifier.

      Use this method when you have a model identifier from the CDK.

      Parameters:
      modelId -
      • The foundation model identifier.
      This parameter is required.
      props -
      • Optional properties for the model.
      Returns:
      A new BedrockFoundationModel instance
    • fromCdkFoundationModelId

      @Stability(Experimental) @NotNull public static BedrockFoundationModel fromCdkFoundationModelId(@NotNull FoundationModelIdentifier modelId)
      (experimental) Creates a BedrockFoundationModel from a FoundationModelIdentifier.

      Use this method when you have a model identifier from the CDK.

      Parameters:
      modelId -
      • The foundation model identifier.
      This parameter is required.
      Returns:
      A new BedrockFoundationModel instance
    • asArn

      @Stability(Experimental) @NotNull public String asArn()
      (experimental) Returns the ARN of the foundation model in the following format: arn:${Partition}:bedrock:${Region}::foundation-model/${ResourceId}.
    • asIModel

      @Stability(Experimental) @NotNull public IModel asIModel()
      (experimental) Returns the IModel.
    • grantInvoke

      @Stability(Experimental) @NotNull public Grant grantInvoke(@NotNull IGrantable grantee)
      (experimental) Gives the appropriate policies to invoke and use the Foundation Model in the stack region.

      [disable-awslint:no-grants]

      Specified by:
      grantInvoke in interface IBedrockInvokable
      Parameters:
      grantee - This parameter is required.
    • grantInvokeAllRegions

      @Stability(Experimental) @NotNull public Grant grantInvokeAllRegions(@NotNull IGrantable grantee)
      (experimental) Gives the appropriate policies to invoke and use the Foundation Model in all regions.

      [disable-awslint:no-grants]

      Parameters:
      grantee - This parameter is required.
    • toString

      @Stability(Experimental) @NotNull public String toString()
      (experimental) Returns a string representation of an object.
      Overrides:
      toString in class Object
    • getInvokableArn

      @Stability(Experimental) @NotNull public String getInvokableArn()
      (experimental) The ARN used for invoking the model.

      This is the same as modelArn for foundation models.

      Specified by:
      getInvokableArn in interface IBedrockInvokable
    • getModelArn

      @Stability(Experimental) @NotNull public String getModelArn()
      (experimental) The ARN of the foundation model.

      Format: arn:${Partition}:bedrock:${Region}::foundation-model/${ResourceId}

    • getModelId

      @Stability(Experimental) @NotNull public String getModelId()
      (experimental) The unique identifier of the foundation model.
    • getSupportsAgents

      @Stability(Experimental) @NotNull public Boolean getSupportsAgents()
      (experimental) Whether this model supports integration with Bedrock Agents.

      When true, the model can be used with Bedrock Agents for automated task execution.

    • getSupportsCrossRegion

      @Stability(Experimental) @NotNull public Boolean getSupportsCrossRegion()
      (experimental) Whether this model supports cross-region inference.

      When true, the model can be used with Cross-Region Inference Profiles.

    • getSupportsKnowledgeBase

      @Stability(Experimental) @NotNull public Boolean getSupportsKnowledgeBase()
      (experimental) Whether this model supports integration with Bedrock Knowledge Base.

      When true, the model can be used for knowledge base operations.

    • getSupportedVectorType

      @Stability(Experimental) @Nullable public List<VectorType> getSupportedVectorType()
      (experimental) The vector types supported by this model for embeddings.

      Defines whether the model supports floating-point or binary vectors.

    • getVectorDimensions

      @Stability(Experimental) @Nullable public Number getVectorDimensions()
      (experimental) The dimensionality of the vector embeddings produced by this model.

      Only applicable for embedding models.