From fc61b67fc0f3da6ac9defc444577011f346b3f4e Mon Sep 17 00:00:00 2001 From: ccnetcore Date: Sun, 11 Jan 2026 13:57:05 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=A8=A1=E5=9E=8B=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E4=B8=AD=E6=96=B0=E5=A2=9E=E4=BE=9B=E5=BA=94?= =?UTF-8?q?=E5=95=86=E5=90=8D=E7=A7=B0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在模型列表查询中增加 ProviderName 字段,并在 ModelGetListOutput DTO 中暴露,用于按供应商(如 OpenAI、Anthropic 等)分组展示模型。 --- .../Dtos/ModelGetListOutput.cs | 4 ++++ .../Services/Chat/AiChatService.cs | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/ModelGetListOutput.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/ModelGetListOutput.cs index c18d0e16..b26180db 100644 --- a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/ModelGetListOutput.cs +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application.Contracts/Dtos/ModelGetListOutput.cs @@ -48,4 +48,8 @@ public class ModelGetListOutput /// 模型图标URL /// public string? IconUrl { get; set; } + /// + /// 供应商分组名称(如:OpenAI、Anthropic、Google等) + /// + public string? ProviderName { get; set; } } \ No newline at end of file diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/Chat/AiChatService.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/Chat/AiChatService.cs index a41936e0..5f3dbe1c 100644 --- a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/Chat/AiChatService.cs +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/Chat/AiChatService.cs @@ -110,7 +110,8 @@ public class AiChatService : ApplicationService Remark = x.Description, IsPremiumPackage = x.IsPremium, ModelApiType = x.ModelApiType, - IconUrl = x.IconUrl + IconUrl = x.IconUrl, + ProviderName = x.ProviderName }).ToListAsync(); output.ForEach(x =>