{"record":{"id":"48ed5d69b5ab465e","repo":"microsoft/semantic-kernel","slug":"ai-chat-service-config-aichatservice-is-not-su-48ed5d","errorCode":null,"errorMessage":"AI Chat service '{config.AIChatService}' is not supported.","messagePattern":"AI Chat service '(.+?)' is not supported\\.","errorType":"exception","errorClass":"NotSupportedException","httpStatus":null,"severity":"error","filePath":"dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.AppHost/Program.cs","lineNumber":102,"sourceCode":"                    });\n            }\n        }\n        else\n        {\n            // 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) :","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.AppHost/Program.cs#L84-L120","documentation":"Error \"AI Chat service '{config.AIChatService}' is not supported.\" thrown in microsoft/semantic-kernel.","triggerScenarios":"Thrown at dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.AppHost/Program.cs:102 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set AIChatService to a supported chat 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"}