fix: 统一处理模型 ID 的 -nx 后缀
在网关层对模型 ID 进行规范化处理,自动移除结尾的 -nx 后缀,避免因不同写法导致的模型识别或兼容性问题。
This commit is contained in:
@@ -92,6 +92,13 @@ public class AiGateWayManager : DomainService
|
|||||||
{
|
{
|
||||||
throw new UserFriendlyException($"【{modelId}】模型当前版本【{modelApiType}】格式不支持");
|
throw new UserFriendlyException($"【{modelId}】模型当前版本【{modelApiType}】格式不支持");
|
||||||
}
|
}
|
||||||
|
// ✅ 统一处理 -nx 后缀(网关层模型规范化)
|
||||||
|
if (!string.IsNullOrEmpty(aiModelDescribe.ModelId) &&
|
||||||
|
aiModelDescribe.ModelId.EndsWith("-nx", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
aiModelDescribe.ModelId = aiModelDescribe.ModelId[..^3];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return aiModelDescribe;
|
return aiModelDescribe;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user