microsoft/semantic-kernel · error · NotSupportedException
Unsupported Amazon model: {modelId}
Error message
Unsupported Amazon model: {modelId} What it means
CreateTextGenerationService routes Amazon-provider models to AmazonService only when the model name starts with 'titan-'. Any other Amazon model name throws NotSupportedException. The provider segment is the part before the first dot.
Source
Thrown at dotnet/src/Connectors/Connectors.Amazon/Bedrock/Core/BedrockServiceFactory.cs:64
switch (modelProvider.ToUpperInvariant())
{
case "AI21":
if (modelName.StartsWith("jamba", StringComparison.OrdinalIgnoreCase))
{
return new AI21JambaService();
}
if (modelName.StartsWith("j2-", StringComparison.OrdinalIgnoreCase))
{
return new AI21JurassicService();
}
throw new NotSupportedException($"Unsupported AI21 model: {modelId}");
case "AMAZON":
if (modelName.StartsWith("titan-", StringComparison.OrdinalIgnoreCase))
{
return new AmazonService();
}
throw new NotSupportedException($"Unsupported Amazon model: {modelId}");
case "ANTHROPIC":
if (modelName.StartsWith("claude-", StringComparison.OrdinalIgnoreCase))
{
return new AnthropicService();
}
throw new NotSupportedException($"Unsupported Anthropic model: {modelId}");
case "COHERE":
if (modelName.StartsWith("command-r", StringComparison.OrdinalIgnoreCase))
{
return new CohereCommandRService();
}
if (modelName.StartsWith("command-", StringComparison.OrdinalIgnoreCase))
{
return new CohereCommandService();
}
throw new NotSupportedException($"Unsupported Cohere model: {modelId}");
case "META":
if (modelName.StartsWith("llama3-", StringComparison.OrdinalIgnoreCase))View on GitHub (pinned to c028a0c7dc)
Solutions
- Use an Amazon Titan modelId for text generation, e.g. 'amazon.titan-text-premier-v1:0'.
- Upgrade Connectors.Amazon to a version supporting the Amazon model you need.
- Confirm the modelId provider segment is exactly 'amazon' and the name starts with 'titan-'.
Example fix
// before var modelId = "amazon.nova-pro-v1:0"; // -> NotSupportedException: Unsupported Amazon model // after var modelId = "amazon.titan-text-premier-v1:0";
Defensive patterns
Strategy: validation
Validate before calling
static bool IsSupportedAmazonTextModel(string modelId)
{
var (provider, name) = SplitModelId(modelId);
return provider.Equals("amazon", StringComparison.OrdinalIgnoreCase)
&& name.StartsWith("titan-", StringComparison.OrdinalIgnoreCase);
} Type guard
static bool IsSupportedAmazonTextModel(string modelId)
{
var (provider, name) = SplitModelId(modelId);
return provider.Equals("amazon", StringComparison.OrdinalIgnoreCase)
&& name.StartsWith("titan-", StringComparison.OrdinalIgnoreCase);
} Try / catch
try
{
var text = await bedrockTextGen.GetTextContentAsync(prompt, settings, ct);
}
catch (NotSupportedException ex) when (ex.Message.Contains("Amazon"))
{
logger.LogError(ex, "Amazon modelId '{Id}' not supported for text generation. Use titan-*.", modelId);
throw;
} Prevention
- Use Amazon Titan ids for text generation with this connector.
- Validate provider/model prefix before creating the service.
- Upgrade the connector to support newer Amazon models like Nova.
When it happens
Trigger: Text generation with modelId provider 'amazon' whose model-name segment does not start with 'titan-' (e.g. 'amazon.nova-pro-v1' or a non-titan Amazon model).
Common situations: Using Amazon Nova or another non-Titan Amazon model that this connector version does not map for text generation. Wrong modelId string. Outdated connector missing newer Amazon models.
Related errors
- Unsupported AI21 model: {modelId}
- Unsupported Anthropic model: {modelId}
- Unsupported Cohere model: {modelId}
- Unsupported Meta model: {modelId}
- Unsupported Mistral model: {modelId}
AI-assisted analysis of microsoft/semantic-kernel@c028a0c7dc (2026-08-13).
Data as JSON: /api/errors/4af4fe57716ec152.
Report an issue: GitHub.