Repository navigation
feat(video): add Wan 3.0 resolution pricing and request validation - #42
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: 071ad78652
ℹ️ 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".
| if common.WanVideoResolutionRatios(info.OriginModelName) != nil { | ||
| return validateWanVideoRequest(c, info) |
There was a problem hiding this comment.
Apply Wan handling after model mapping
When a channel exposes an alias mapped to a Wan 3.0 model, this check sees only the public alias because RelayTaskSubmit calls ModelMappedHelper after validation and later restores OriginModelName before billing. The request therefore falls through to the generic validator, and EstimateBilling and BuildRequestBody also miss their Wan branches; for example, an aliased 1080p request is billed at the default resolution ratio, while durations above 30 seconds are accepted. Detect the effective mapped model before validation or otherwise carry the Wan protocol classification through validation, billing, and forwarding.
AGENTS.md reference: AGENTS.md:L110-L110
Useful? React with 👍 / 👎.
Important
📝 变更描述 / Description
Add the four lxmone Wan 3.0 video models to the OpenAI video adapter. Normalize duration and resolution aliases before billing and send those same values upstream, preserving reference media and explicit false flags. Reject conflicting aliases, invalid media layouts, multiple outputs, and durations outside 2–30 seconds.
Use the configured 720p per-second price as the base and expose matching 480p/720p/1080p prices in the public catalog. At a $0.30 base, the three output-second prices are $0.25/$0.30/$0.35, before existing group multipliers. Treat upstream archiving as an in-progress task.
This change was AI-assisted. Production channel configuration and site API validation are tracked separately from the code change.
🚀 变更类型 / Type of change
🔗 关联任务 / Related Issue
✅ 提交前检查项 / Checklist
📸 运行证明 / Proof of Work
go test ./relay/channel/task/sora ./common ./model.go test ./relay ./controller -run 'Task|Video|Sora|Wan' -count=1.go vet ./relay/channel/task/sora ./modelandgit diff --check.go vet ./commonreports existing mutex-copy warnings incustom-event.goand an IPv6 address-format warning inemail_test.go.