Merge pull request '完善图片工具通用失败的核对建议' (#27) from codex/image-tool-failure-advice-20261104 into main
This commit is contained in:
commit
34ba1919c4
@ -258,6 +258,9 @@ export function getRequestFailureDetails(
|
||||
if (/neither a task ID nor output URLs|已完成.*未取回|completed without.*output/i.test(text)) {
|
||||
return detail("RESULT_UNCONFIRMED", "模型服务没有返回可读取的任务结果,生成状态尚未确认。", "请保留当前任务并联系管理员核对,避免重复生成。", "unknown");
|
||||
}
|
||||
if (/(?:抠图|去水印|图片增强|图片|扩图)处理失败/.test(text)) {
|
||||
return detail("PROCESSING_FAILED", "图片处理服务执行失败,未返回具体原因。", "请联系管理员并提供请求编号,先核对原任务结果,避免重复处理。", "unknown");
|
||||
}
|
||||
if (/service_error|upstream_server_error|excessive system load|generate(?: image)? failed/i.test(text)) {
|
||||
return detail("PROVIDER_EXECUTION_FAILED", "模型服务未能完成本次处理。", "请稍后重试;若连续失败,请切换模型或联系管理员,并提供请求编号。");
|
||||
}
|
||||
|
||||
@ -17,6 +17,8 @@ test("known provider and platform failures explain their cause and next action",
|
||||
["generate image failed", "PROVIDER_EXECUTION_FAILED", "稍后重试"],
|
||||
["excessive system load", "PROVIDER_EXECUTION_FAILED", "稍后重试"],
|
||||
["get image url failed", "SOURCE_IMAGE_UNAVAILABLE", "重新上传"],
|
||||
["抠图处理失败", "PROCESSING_FAILED", "核对原任务"],
|
||||
["去水印处理失败", "PROCESSING_FAILED", "核对原任务"],
|
||||
["图片上传到存储桶失败", "RESULT_STORAGE_FAILED", "不要重复生成"],
|
||||
["任务执行中断,结果尚未确认", "RESULT_UNCONFIRMED", "避免重复生成"],
|
||||
]) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user