feat(*): 模型生成链路 - 完善 Agnes 结果兼容、价格展示与请求日志追踪

This commit is contained in:
ddCat
2026-08-28 06:53:57 +08:00
parent 2c02f5ef3d
commit bd0d0fd4fd
20 changed files with 671 additions and 108 deletions

View File

@@ -752,7 +752,10 @@ func parseAgnesPoll(c PollContext, payload map[string]any) (PollResult, error) {
metadata := object(payload["metadata"])
videoURL := firstString(metadata, "url")
if videoURL == "" {
return PollResult{}, fmt.Errorf("Agnes 完成响应没有 metadata.url")
videoURL = firstString(payload, "url")
}
if videoURL == "" {
return PollResult{}, fmt.Errorf("Agnes 完成响应没有返回视频 URL")
}
return PollResult{TaskID: id, Status: status, Result: &Result{Videos: []MediaReference{{URL: videoURL, Kind: string(CapabilityVideo)}}}}, nil
}