Class DefaultPromptRouterIdentifier

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

@Generated(value="jsii-pacmak/1.112.0 (build de1bc80)", date="2025-08-06T18:14:48.059Z") @Stability(Experimental) public class DefaultPromptRouterIdentifier extends software.amazon.jsii.JsiiObject
(experimental) Represents identifiers for default prompt routers in Bedrock.

These are pre-configured routers provided by AWS that route between different models in the same family for optimal performance and cost.

Example:

 // Create a prompt router for intelligent model selection
 PromptRouter promptRouter = PromptRouter.fromDefaultId(DefaultPromptRouterIdentifier.ANTHROPIC_CLAUDE_V1, "us-east-1");
 // Use the prompt router with a prompt variant
 IPromptVariant variant = PromptVariant.text(TextPromptVariantProps.builder()
         .variantName("variant1")
         .promptText("What is the capital of France?")
         .model(promptRouter)
         .build());
 Prompt.Builder.create(this, "Prompt")
         .promptName("prompt-router-test")
         .variants(List.of(variant))
         .build();
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (experimental) Anthropic Claude V1 router configuration.
    (experimental) Meta Llama 3.1 router configuration.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    DefaultPromptRouterIdentifier(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    DefaultPromptRouterIdentifier(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (experimental) The unique identifier for this prompt router.
    (experimental) The foundation models that this router can route between.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Field Details

    • ANTHROPIC_CLAUDE_V1

      @Stability(Experimental) public static final DefaultPromptRouterIdentifier ANTHROPIC_CLAUDE_V1
      (experimental) Anthropic Claude V1 router configuration.

      Routes between Claude Haiku and Claude 3.5 Sonnet models for optimal balance between performance and cost.

    • META_LLAMA_3_1

      @Stability(Experimental) public static final DefaultPromptRouterIdentifier META_LLAMA_3_1
      (experimental) Meta Llama 3.1 router configuration. Routes between different sizes of Llama 3.1 models (8B and 70B) for optimal performance based on request complexity.
  • Constructor Details

    • DefaultPromptRouterIdentifier

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

      protected DefaultPromptRouterIdentifier(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
  • Method Details

    • getPromptRouterId

      @Stability(Experimental) @NotNull public String getPromptRouterId()
      (experimental) The unique identifier for this prompt router.
    • getRoutingModels

      @Stability(Experimental) @NotNull public List<BedrockFoundationModel> getRoutingModels()
      (experimental) The foundation models that this router can route between.