fix: 获取图像模型时仅返回启用模型

在查询图像模型列表时加入 IsEnabled == true 过滤,避免返回已禁用的模型。文件:AiImageService.cs
This commit is contained in:
chenchun
2026-01-05 14:15:21 +08:00
parent cad145f067
commit 6101ea46d3

View File

@@ -370,6 +370,7 @@ public class AiImageService : ApplicationService
public async Task<List<ModelGetListOutput>> GetModelAsync()
{
var output = await _aiModelRepository._DbQueryable
.Where(x=>x.IsEnabled==true)
.Where(x => x.ModelType == ModelTypeEnum.Image)
.Where(x => x.ModelApiType == ModelApiTypeEnum.GenerateContent)
.OrderByDescending(x => x.OrderNum)