fix(gemini): 移除空返图占位并暴露失败原因

Gemini 图片响应未包含可提取资源时,不再返回伪造占位图,改为非重试失败并保留安全拦截、候选结束状态和上游错误等结构化诊断。\n\n同步将诊断写入 HTTP 错误、任务结果、attempt 指标和日志,确保任务失败时不结算,并补充单元及 PostgreSQL 验收测试。\n\n验证:gofmt、go test ./... -count=1、go vet ./...、迁移安全检查、pnpm openapi。
This commit is contained in:
2026-07-29 19:50:43 +08:00
parent 012823adff
commit 3886048e0f
9 changed files with 506 additions and 8 deletions
+3
View File
@@ -1710,6 +1710,9 @@ func runErrorDetails(err error) map[string]any {
if detail := store.ModelCandidateErrorDetails(err); len(detail) > 0 {
return detail
}
if detail := clients.ErrorDetails(err); len(detail) > 0 {
return detail
}
return nil
}