From c4c75c32c7f019e823300462f7fdb10cbc2ddd01 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 13 Apr 2026 17:28:55 +0800 Subject: [PATCH] revert: use blank `User-Agent` header when communicating with open-ai compatible service This reverts commit 26ab0a7529ff502e375baa42a6c7322c22d8b428. Signed-off-by: leo --- src/AI/Service.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/AI/Service.cs b/src/AI/Service.cs index f7eb25e6..e36bc15b 100644 --- a/src/AI/Service.cs +++ b/src/AI/Service.cs @@ -84,8 +84,8 @@ namespace SourceGit.AI { var credential = new ApiKeyCredential(ReadApiKeyFromEnv ? Environment.GetEnvironmentVariable(ApiKey) : ApiKey); return Server.Contains("openai.azure.com/", StringComparison.Ordinal) - ? new AzureOpenAIClient(new Uri(Server), credential, new AzureOpenAIClientOptions() { UserAgentApplicationId = string.Empty }) - : new OpenAIClient(credential, new() { Endpoint = new Uri(Server), UserAgentApplicationId = string.Empty }); + ? new AzureOpenAIClient(new Uri(Server), credential) + : new OpenAIClient(credential, new() { Endpoint = new Uri(Server) }); } private string _name = string.Empty;