fix(canvas): 画布智能体 - 严格校验模型选择并修正任务与 DNS 错误诊断

This commit is contained in:
ddCat
2026-09-20 12:47:07 +08:00
parent 46c498ff87
commit be5f2733b6
17 changed files with 407 additions and 13 deletions

View File

@@ -847,6 +847,9 @@ func failCloudAgentAdmission(current *model.CloudAgentExecution, state *cloudAge
// Only expose known failure categories; raw provider errors can contain URLs and credentials.
func cloudAgentModelFailure(task *model.Task) (string, string) {
detail, reason := "模型任务未成功", "model_task_failed"
if diagnostic := taskExecutionDiagnostic(task); diagnostic != nil && diagnostic.Code == string(ReasonUpstreamDNSFailed) {
return "模型服务域名解析失败,请检查渠道域名和后端 DNS 配置;本轮已停止。请在任务中心检查模型任务 " + task.ID, string(ReasonUpstreamDNSFailed)
}
raw := strings.ToLower(task.Error)
switch {
case strings.Contains(raw, "connection reset by peer"):