microsoft/semantic-kernel · error · NotSupportedException
AI embeddings service '{config.Rag.AIEmbeddingService}' is n
Error message
AI embeddings service '{config.Rag.AIEmbeddingService}' is not supported. What it means
Error "AI embeddings service '{config.Rag.AIEmbeddingService}' is not supported." thrown in microsoft/semantic-kernel.
Source
Thrown at dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.ApiService/Program.cs:150
default:
throw new NotSupportedException($"AI chat service '{config.AIChatService}' is not supported.");
}
// Add text embedding generation services.
switch (config.Rag.AIEmbeddingService)
{
case AzureOpenAIEmbeddingsConfig.ConfigSectionName:
{
builder.Services.AddAzureOpenAIEmbeddingGenerator(config.AzureOpenAIEmbeddings.DeploymentName, modelId: config.AzureOpenAIEmbeddings.ModelName);
break;
}
case OpenAIEmbeddingsConfig.ConfigSectionName:
{
builder.Services.AddOpenAIEmbeddingGenerator(config.OpenAIEmbeddings.ModelName);
break;
}
default:
throw new NotSupportedException($"AI embeddings service '{config.Rag.AIEmbeddingService}' is not supported.");
}
}
/// <summary>
/// Adds the vector store to the service collection.
/// </summary>
/// <param name="builder">The web application builder.</param>
/// <param name="config">The host configuration.</param>
private static void AddVectorStore(WebApplicationBuilder builder, HostConfig config)
{
// Don't add vector store if no collection name is provided. Allows for a basic experience where no data has been uploaded to the vector store yet.
if (string.IsNullOrWhiteSpace(config.Rag.CollectionName))
{
return;
}
// Add Vector Store
switch (config.Rag.VectorStoreType)View on GitHub (pinned to c028a0c7dc)
Solutions
- Set Rag:AIEmbeddingService to a supported embeddings provider value in configuration.
- Review Program.cs for the supported embedding service names and update appsettings.json accordingly.
When it happens
Trigger: Thrown at dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.ApiService/Program.cs:150 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of microsoft/semantic-kernel@c028a0c7dc (2026-08-13).
Data as JSON: /api/errors/3d2d68f33c3242ff.
Report an issue: GitHub.