microsoft/semantic-kernel · error · NotSupportedException

AI Embedding service '{config.Rag.AIEmbeddingService}' is no

Error message

AI Embedding service '{config.Rag.AIEmbeddingService}' is not supported.

What it means

Error "AI Embedding service '{config.Rag.AIEmbeddingService}' is not supported." thrown in microsoft/semantic-kernel.

Source

Thrown at dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.AppHost/Program.cs:107

            // Use an existing Azure OpenAI service via connection string
            chatResource = embeddingsResource = builder.AddConnectionString(HostConfig.AzureOpenAIConnectionStringName);
        }
    }

    // Add OpenAI service via connection string
    if (config.AIChatService == OpenAIChatConfig.ConfigSectionName || config.Rag.AIEmbeddingService == OpenAIEmbeddingsConfig.ConfigSectionName)
    {
        chatResource = embeddingsResource = builder.AddConnectionString(HostConfig.OpenAIConnectionStringName);
    }

    if (chatResource is null)
    {
        throw new NotSupportedException($"AI Chat service '{config.AIChatService}' is not supported.");
    }

    if (embeddingsResource is null)
    {
        throw new NotSupportedException($"AI Embedding service '{config.Rag.AIEmbeddingService}' is not supported.");
    }

    return [chatResource, embeddingsResource];
}

static IResourceBuilder<IResourceWithConnectionString> AddVectorStore(IDistributedApplicationBuilder builder, HostConfig config)
{
    switch (config.Rag.VectorStoreType)
    {
        case AzureAISearchConfig.ConfigSectionName:
        {
            return builder.ExecutionContext.IsPublishMode ?
                builder.AddAzureSearch(AzureAISearchConfig.ConnectionStringName) :
                builder.AddConnectionString(AzureAISearchConfig.ConnectionStringName);
        }
        default:
        {
            throw new NotSupportedException($"Vector Store type '{config.Rag.VectorStoreType}' is not supported.");

View on GitHub (pinned to c028a0c7dc)

Solutions

  1. Set Rag:AIEmbeddingService to a supported embedding service value in the AppHost appsettings.
  2. Consult Program.cs in the AppHost project for the supported service names and correct the setting.

When it happens

Trigger: Thrown at dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.AppHost/Program.cs:107 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/c63f90db0b00fb5d. Report an issue: GitHub.