{"record":{"id":"3d2d68f33c3242ff","repo":"microsoft/semantic-kernel","slug":"ai-embeddings-service-config-rag-aiembeddingserv","errorCode":null,"errorMessage":"AI embeddings service '{config.Rag.AIEmbeddingService}' is not supported.","messagePattern":"AI embeddings service '(.+?)' is not supported\\.","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.ApiService/Program.cs","lineNumber":150,"sourceCode":"            default:\n                throw new NotSupportedException($\"AI chat service '{config.AIChatService}' is not supported.\");\n        }\n\n        // Add text embedding generation services.\n        switch (config.Rag.AIEmbeddingService)\n        {\n            case AzureOpenAIEmbeddingsConfig.ConfigSectionName:\n            {\n                builder.Services.AddAzureOpenAIEmbeddingGenerator(config.AzureOpenAIEmbeddings.DeploymentName, modelId: config.AzureOpenAIEmbeddings.ModelName);\n                break;\n            }\n            case OpenAIEmbeddingsConfig.ConfigSectionName:\n            {\n                builder.Services.AddOpenAIEmbeddingGenerator(config.OpenAIEmbeddings.ModelName);\n                break;\n            }\n            default:\n                throw new NotSupportedException($\"AI embeddings service '{config.Rag.AIEmbeddingService}' is not supported.\");\n        }\n    }\n\n    /// <summary>\n    /// Adds the vector store to the service collection.\n    /// </summary>\n    /// <param name=\"builder\">The web application builder.</param>\n    /// <param name=\"config\">The host configuration.</param>\n    private static void AddVectorStore(WebApplicationBuilder builder, HostConfig config)\n    {\n        // 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.\n        if (string.IsNullOrWhiteSpace(config.Rag.CollectionName))\n        {\n            return;\n        }\n\n        // Add Vector Store\n        switch (config.Rag.VectorStoreType)","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.ApiService/Program.cs#L132-L168","documentation":"Error \"AI embeddings service '{config.Rag.AIEmbeddingService}' is not supported.\" thrown in microsoft/semantic-kernel.","triggerScenarios":"Thrown at dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.ApiService/Program.cs:150 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}