Skip to content

.Net: Remove SingleAuthorizationHeaderPolicy #11538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
using Azure.Core;
using Microsoft.SemanticKernel.ChatCompletion;
using Microsoft.SemanticKernel.Connectors.AzureOpenAI;
using SemanticKernel.Connectors.AzureOpenAI.Core;

namespace SemanticKernel.Connectors.AzureOpenAI.UnitTests.Core;

Expand Down Expand Up @@ -46,9 +45,6 @@ public async Task AuthenticationHeaderShouldBeProvidedOnlyOnce()
NetworkTimeout = TimeSpan.FromSeconds(10),
};

// Bug fix workaround
options.AddPolicy(new SingleAuthorizationHeaderPolicy(), PipelinePosition.PerTry);

var azureClient = new AzureOpenAIClient(
endpoint: new Uri("http://any"),
credential: new TestJWTBearerTokenCredential(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
using Microsoft.SemanticKernel.Connectors.OpenAI;
using Microsoft.SemanticKernel.Http;
using OpenAI;
using SemanticKernel.Connectors.AzureOpenAI.Core;

namespace Microsoft.SemanticKernel.Connectors.AzureOpenAI;

Expand Down Expand Up @@ -153,7 +152,6 @@ internal static AzureOpenAIClientOptions GetAzureOpenAIClientOptions(HttpClient?

options.UserAgentApplicationId = HttpHeaderConstant.Values.UserAgent;
options.AddPolicy(CreateRequestHeaderPolicy(HttpHeaderConstant.Names.SemanticKernelVersion, HttpHeaderConstant.Values.GetAssemblyVersion(typeof(AzureClientCore))), PipelinePosition.PerCall);
options.AddPolicy(new SingleAuthorizationHeaderPolicy(), PipelinePosition.PerTry);

if (httpClient is not null)
{
Expand Down

This file was deleted.

Loading