{"record":{"id":"d64770af6b275f3a","repo":"microsoft/semantic-kernel","slug":"ai-service-config-rag-aiembeddingservice-is-no","errorCode":null,"errorMessage":"AI service '{config.Rag.AIEmbeddingService}' is not supported.","messagePattern":"AI service '(.+?)' is not supported\\.","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.AppHost/Extensions/ResourceBuilderExtensions.cs","lineNumber":67,"sourceCode":"        builder.WithEnvironment($\"{nameof(config.Rag)}__{nameof(config.Rag.CollectionName)}\", config.Rag.CollectionName);\n\n        switch (config.Rag.AIEmbeddingService)\n        {\n            case AzureOpenAIEmbeddingsConfig.ConfigSectionName:\n            {\n                builder.WithEnvironment($\"{HostConfig.AIServicesSectionName}__{nameof(config.AzureOpenAIEmbeddings)}__{nameof(config.AzureOpenAIEmbeddings.DeploymentName)}\", config.AzureOpenAIEmbeddings.DeploymentName);\n                builder.WithEnvironment($\"{HostConfig.AIServicesSectionName}__{nameof(config.AzureOpenAIEmbeddings)}__{nameof(config.AzureOpenAIEmbeddings.ModelName)}\", config.AzureOpenAIEmbeddings.ModelName);\n                break;\n            }\n\n            case OpenAIEmbeddingsConfig.ConfigSectionName:\n            {\n                builder.WithEnvironment($\"{HostConfig.AIServicesSectionName}__{nameof(config.OpenAIEmbeddings)}__{nameof(config.OpenAIEmbeddings.ModelName)}\", config.OpenAIEmbeddings.ModelName);\n                break;\n            }\n\n            default:\n                throw new NotSupportedException($\"AI service '{config.Rag.AIEmbeddingService}' is not supported.\");\n        }\n\n        return builder;\n    }\n\n    /// <summary>\n    /// Adds connection strings of source resources to a destination resource.\n    /// </summary>\n    /// <typeparam name=\"T\">The type of the destination resource.</typeparam>\n    /// <param name=\"builder\">The destination resource.</param>\n    /// <param name=\"resources\">The source resource with the connection string.</param>\n    /// <returns>The updated resource builder.</returns>\n    public static IResourceBuilder<T> WithReferences<T>(this IResourceBuilder<T> builder, IList<IResourceBuilder<IResourceWithConnectionString>> resources) where T : IResourceWithEnvironment\n    {\n        ArgumentNullException.ThrowIfNull(builder);\n        ArgumentNullException.ThrowIfNull(resources);\n\n        foreach (var resource in resources)","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.AppHost/Extensions/ResourceBuilderExtensions.cs#L49-L85","documentation":"Error \"AI service '{config.Rag.AIEmbeddingService}' is not supported.\" thrown in microsoft/semantic-kernel.","triggerScenarios":"Thrown at dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.AppHost/Extensions/ResourceBuilderExtensions.cs:67 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure Rag:AIEmbeddingService with a supported embedding service name.","Check the supported values in ResourceBuilderExtensions.cs and fix the configuration entry."],"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"}