Repository navigation
feat(video): isolate Lxmone Seedance from Argolink - #44
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74fb16dd1d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "seedance-2", | ||
| "seedance-2-pro", | ||
| "seedance-2-fast", | ||
| "seedance-2-mini", | ||
| "seedance-2.5-pro", |
There was a problem hiding this comment.
Register Lxmone models for completion settlement
Add these new public model names to constant.TaskPricePerSecondModels; otherwise their required configured ModelPrice makes buildTaskBillingContext set PerCallBilling=true, and resolveTaskBillingOnComplete returns before calling this adaptor's AdjustBillingOnComplete. Consequently seedance-2, seedance-2-pro, seedance-2-fast, seedance-2-mini, and seedance-2.5-pro always retain the requested-duration charge instead of reconciling to the provider-reported delivered duration; only the existing seedance-2.5 alias currently reaches settlement.
AGENTS.md reference: AGENTS.md:L108-L110
Useful? React with 👍 / 👎.
| hasFirst := len(request.InputReference) > 0 || len(request.Image) > 0 | ||
| hasLast := len(request.ImageEnd) > 0 || len(request.EndImageURL) > 0 | ||
| hasReferences := len(request.ReferenceImages)+len(request.ReferenceVideos)+len(request.ReferenceAudios) > 0 |
There was a problem hiding this comment.
Treat null media aliases as absent
Check the decoded value rather than len(json.RawMessage): JSON null has nonzero length, so a request such as {"image":null,"reference_images":[...]} is incorrectly classified as mixing frame and reference modes and rejected with invalid_media. Clients that serialize unused optional media fields as null therefore cannot submit otherwise valid reference requests.
Useful? React with 👍 / 👎.
Important
📝 变更描述 / Description
Lxmone and Argolink both expose seedance-2.5 but require different request and billing contracts. Select Lxmone behavior only for its host and supported models, normalize its duration/resolution aliases, preserve public model names, and persist provider identity for task responses. Argolink keeps its existing endpoint, request constraints, and pricing behavior.
Lxmone resolution ratios are channel-local and mandatory; missing configuration rejects the request before charging or contacting upstream. No production prices are invented or changed. Channel 148 remains disabled pending confirmed prices and live validation. AI-assisted implementation, manually reviewed for provider isolation and quota safety.
🚀 变更类型 / Type of change
🔗 关联任务 / Related Issue
✅ 提交前检查项 / Checklist
Bug fix,我已提交或关联对应 Issue,且不会将设计取舍、预期不一致或理解偏差直接归类为 bug。📸 运行证明 / Proof of Work
Passed: go test ./relay/channel/task/sora ./relay ./controller ./dto ./model; go vet ./relay/channel/task/sora ./dto; git diff --check. Regression cases cover both providers, all four new models, effective resolution billing, duration bounds, incompatible media, missing prices, public task IDs/model names, and saved-ratio settlement. Live generation is pending price configuration; no paid calls submitted.