From 184467e482cbc24661034f2a64754e68bc4dc69b Mon Sep 17 00:00:00 2001 From: ccnetcore Date: Sat, 27 Dec 2025 23:21:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=84=E7=90=86=20Anthropic=20?= =?UTF-8?q?=E6=A8=A1=E5=9E=8B=E5=90=8D=E7=A7=B0=E5=B8=A6=20-nx=20=E5=90=8E?= =?UTF-8?q?=E7=BC=80=E7=9A=84=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Yi.Framework.AiHub.Domain/Managers/AiGateWayManager.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/AiGateWayManager.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/AiGateWayManager.cs index d8fdbd51..2804a9ee 100644 --- a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/AiGateWayManager.cs +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Domain/Managers/AiGateWayManager.cs @@ -584,6 +584,12 @@ public class AiGateWayManager : DomainService var chatService = LazyServiceProvider.GetRequiredKeyedService(modelDescribe.HandlerName); + if (!string.IsNullOrEmpty(request.Model) && + request.Model.EndsWith("-nx", StringComparison.OrdinalIgnoreCase)) + { + request.Model = request.Model[..^3]; + } + var completeChatResponse = chatService.StreamChatCompletionsAsync(modelDescribe, request, cancellationToken); ThorUsageResponse? tokenUsage = null; StringBuilder backupSystemContent = new StringBuilder();