Skip to content

.Net: Bug: .Net: Semantic Kernel. 'The SSL connection could not be established, see inner exception.' #12908

Description

@imranshams

Describe the bug
I have a .net app which use custom domain with corporate network and self signed SSL. My app uses 2 different services of SK & Azure Open AI and uses authentication via Managed identity (Entra ID):

Azure Open AI Chat Completion:

builder.AddAzureOpenAIChatCompletion(
    kernelConfig?.ChatCompletion?.DeploymentName,
    endpoint,
    new DefaultAzureCredential(),
    httpClient: new HttpClient() { Timeout = TimeSpan.FromMinutes(10) }
);

It's working without any issue.

Azure Open AI Text 2 Image:

SSL could not accepted from SK nuget package and as I found in other related issues, solution is to use custom HttpClient as explained here:

Related Issue 1
Related Issue 2
Related Issue 3

To Reproduce
Create a self signed SSL and use it with a custom domain in Azure App Service which has no internet and just available in a corporate network with intranet DNS

Expected behavior
There is no override for AddAzureOpenAITextToImage in AzureOpenAIKernelBuilderExtensions Class which accept both httpClient and managed identity, we can't use apikey for authentication

Platform

  • Language: C#
  • Source: NuGet package version 1.61.0
  • AI model: Azure Open AI / dall-e-3
  • IDE: VS Code
  • OS: Linux

Additional context
I can make a contribution, if it takes to much time, because we need it as soon as possible

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETIssue or Pull requests regarding .NET codebugSomething isn't workingtriage

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions