Remix时未使用上游真实ID
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Start at the remix handling and task lookup around the referenced lines 47–65, then trace how the stored upstream task ID is exposed by the model. Verify that remix requests use that stored ID when calling the upstream service and that the existing task-not-found error path still applies when the original task is missing.
Written by the indexing model from the issue text.
Description
提交前必读(请勿删除本节)
- 文档:https://docs.newapi.ai/
- 使用问题先看或先问:https://deepwiki.com/QuantumNous/new-api
- 警告:删除本模板、删除小节标题或随意清空内容的 issue,可能会被直接关闭;重复恶意提交者可能会被 block。
您当前的 newapi 版本
v0.12.2
提交确认
- 我已确认目前没有类似 issue
- 我已完整查看过文档 https://docs.newapi.ai/ 和项目 README,尤其是常见问题部分
- 我未删除此模板中的任何引导内容或小节标题,并会按要求完整填写
- 我理解项目维护者精力有限,不遵循模板要求的 issue 可能会被无视或直接关闭
问题描述
当用户提交视频延长(remix)请求时,NewAPI没有使用数据库存储的上游真实任务ID(UpstreamTaskID),而是直接将用户端传来的 task_id 转发给上游服务,导致上游服务返回"任务不存在"错误。
复现步骤
// 第47-51行:直接使用用户端传来的task_id
if info.Action == constant.TaskActionRemix {
videoID := c.Param("video_id")
info.OriginTaskID = videoID // ← 问题:直接使用task_id
}
// 第59-65行:查询任务
originTask, exist, err := model.GetByTaskId(info.UserId, info.OriginTaskID)
// ← 查询后没有使用 originTask.GetUpstreamTaskID() 更新 info.OriginTaskID
预期结果
// 查询到原始任务后,应该使用上游真实ID
originTask, exist, err := model.GetByTaskId(info.UserId, info.OriginTaskID)
if !exist {
return service.TaskErrorWrapperLocal(...)
}
// 添加这行:获取上游真实的任务ID
if info.Action == constant.TaskActionRemix {
info.OriginTaskID = originTask.GetUpstreamTaskID() // ← 关键修复
}
相关截图
- Dominant language
- Go
- Stars
- 48.5k
- Forks
- 11.6k
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 61
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from QuantumNous/new-api
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
QuantumNous/new-api#7511 · 1 comment ·
-
fix(relay): terminal stream chunk with finish_reason is dropped when client does not request usage Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
QuantumNous/new-api#7489 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
QuantumNous/new-api#7479 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
QuantumNous/new-api#7467 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
QuantumNous/new-api#7417 · 1 comment ·
All issues in QuantumNous/new-api
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100