{"record":{"id":"4af4fe57716ec152","repo":"microsoft/semantic-kernel","slug":"unsupported-amazon-model-modelid","errorCode":null,"errorMessage":"Unsupported Amazon model: {modelId}","messagePattern":"Unsupported Amazon model: (.+?)","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"dotnet/src/Connectors/Connectors.Amazon/Bedrock/Core/BedrockServiceFactory.cs","lineNumber":64,"sourceCode":"\n        switch (modelProvider.ToUpperInvariant())\n        {\n            case \"AI21\":\n                if (modelName.StartsWith(\"jamba\", StringComparison.OrdinalIgnoreCase))\n                {\n                    return new AI21JambaService();\n                }\n                if (modelName.StartsWith(\"j2-\", StringComparison.OrdinalIgnoreCase))\n                {\n                    return new AI21JurassicService();\n                }\n                throw new NotSupportedException($\"Unsupported AI21 model: {modelId}\");\n            case \"AMAZON\":\n                if (modelName.StartsWith(\"titan-\", StringComparison.OrdinalIgnoreCase))\n                {\n                    return new AmazonService();\n                }\n                throw new NotSupportedException($\"Unsupported Amazon model: {modelId}\");\n            case \"ANTHROPIC\":\n                if (modelName.StartsWith(\"claude-\", StringComparison.OrdinalIgnoreCase))\n                {\n                    return new AnthropicService();\n                }\n                throw new NotSupportedException($\"Unsupported Anthropic model: {modelId}\");\n            case \"COHERE\":\n                if (modelName.StartsWith(\"command-r\", StringComparison.OrdinalIgnoreCase))\n                {\n                    return new CohereCommandRService();\n                }\n                if (modelName.StartsWith(\"command-\", StringComparison.OrdinalIgnoreCase))\n                {\n                    return new CohereCommandService();\n                }\n                throw new NotSupportedException($\"Unsupported Cohere model: {modelId}\");\n            case \"META\":\n                if (modelName.StartsWith(\"llama3-\", StringComparison.OrdinalIgnoreCase))","sourceCodeStart":46,"sourceCodeEnd":82,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/src/Connectors/Connectors.Amazon/Bedrock/Core/BedrockServiceFactory.cs#L46-L82","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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-'."],"exampleFix":"// before\nvar modelId = \"amazon.nova-pro-v1:0\";\n// -> NotSupportedException: Unsupported Amazon model\n\n// after\nvar modelId = \"amazon.titan-text-premier-v1:0\";","handlingStrategy":"validation","validationCode":"static bool IsSupportedAmazonTextModel(string modelId)\n{\n    var (provider, name) = SplitModelId(modelId);\n    return provider.Equals(\"amazon\", StringComparison.OrdinalIgnoreCase)\n        && name.StartsWith(\"titan-\", StringComparison.OrdinalIgnoreCase);\n}","typeGuard":"static bool IsSupportedAmazonTextModel(string modelId)\n{\n    var (provider, name) = SplitModelId(modelId);\n    return provider.Equals(\"amazon\", StringComparison.OrdinalIgnoreCase)\n        && name.StartsWith(\"titan-\", StringComparison.OrdinalIgnoreCase);\n}","tryCatchPattern":"try\n{\n    var text = await bedrockTextGen.GetTextContentAsync(prompt, settings, ct);\n}\ncatch (NotSupportedException ex) when (ex.Message.Contains(\"Amazon\"))\n{\n    logger.LogError(ex, \"Amazon modelId '{Id}' not supported for text generation. Use titan-*.\", modelId);\n    throw;\n}","preventionTips":["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."],"tags":["csharp","dotnet","semantic-kernel","bedrock","aws","amazon","model-id","not-supported"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}