{"record":{"id":"c63f90db0b00fb5d","repo":"microsoft/semantic-kernel","slug":"ai-embedding-service-config-rag-aiembeddingservi","errorCode":null,"errorMessage":"AI Embedding service '{config.Rag.AIEmbeddingService}' is not supported.","messagePattern":"AI Embedding service '(.+?)' is not supported\\.","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.AppHost/Program.cs","lineNumber":107,"sourceCode":"            // Use an existing Azure OpenAI service via connection string\n            chatResource = embeddingsResource = builder.AddConnectionString(HostConfig.AzureOpenAIConnectionStringName);\n        }\n    }\n\n    // Add OpenAI service via connection string\n    if (config.AIChatService == OpenAIChatConfig.ConfigSectionName || config.Rag.AIEmbeddingService == OpenAIEmbeddingsConfig.ConfigSectionName)\n    {\n        chatResource = embeddingsResource = builder.AddConnectionString(HostConfig.OpenAIConnectionStringName);\n    }\n\n    if (chatResource is null)\n    {\n        throw new NotSupportedException($\"AI Chat service '{config.AIChatService}' is not supported.\");\n    }\n\n    if (embeddingsResource is null)\n    {\n        throw new NotSupportedException($\"AI Embedding service '{config.Rag.AIEmbeddingService}' is not supported.\");\n    }\n\n    return [chatResource, embeddingsResource];\n}\n\nstatic IResourceBuilder<IResourceWithConnectionString> AddVectorStore(IDistributedApplicationBuilder builder, HostConfig config)\n{\n    switch (config.Rag.VectorStoreType)\n    {\n        case AzureAISearchConfig.ConfigSectionName:\n        {\n            return builder.ExecutionContext.IsPublishMode ?\n                builder.AddAzureSearch(AzureAISearchConfig.ConnectionStringName) :\n                builder.AddConnectionString(AzureAISearchConfig.ConnectionStringName);\n        }\n        default:\n        {\n            throw new NotSupportedException($\"Vector Store type '{config.Rag.VectorStoreType}' is not supported.\");","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.AppHost/Program.cs#L89-L125","documentation":"Error \"AI Embedding service '{config.Rag.AIEmbeddingService}' is not supported.\" thrown in microsoft/semantic-kernel.","triggerScenarios":"Thrown at dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.AppHost/Program.cs:107 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set Rag:AIEmbeddingService to a supported embedding service value in the AppHost appsettings.","Consult Program.cs in the AppHost project for the supported service names and correct the setting."],"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"}