withInferenceProfile

Extension method to create a new LLModel with a different inference profile prefix. This allows you to easily switch inference profiles for predefined Bedrock models.

Return

A new LLModel with the specified inference profile prefix

Example usage:

// Use EU inference profile instead of default US
val euModel = BedrockModels.AnthropicClaude4Sonnet.withInferenceProfile(BedrockInferencePrefixes.EU.prefix)
// euModel.id will be "eu.anthropic.claude-sonnet-4-20250514-v1:0"

Parameters

inferencePrefix

The inference profile prefix to use (e.g., "eu", "us", "ap")