* feat(plugin): add MiniMax-H3 /v2 video generation to the hailuo task plugin
MiniMax-H3 speaks a different contract from the other Hailuo models, so the
hailuo task plugin now branches on the upstream model instead of adding a Go
adaptor:
- submit builds /v2/video_generation with a multimodal `content` array
(text, first/last frame images, reference video/audio, or a full
`metadata.content` passthrough), an explicit `ratio`, and 768P/2K
resolutions; `metadata.callback_url` and `metadata.aigc_watermark` pass
through
- query uses /v2/query/video_generation/{task_id} and parses the
`{"task": {...}}` envelope, falling back to the /v1 shapes for every other
model
- the /v2 result is a public CDN URL, so its artifact is proxied
credentialless instead of through /v1/files/download
- request bounds (duration 4-15, resolution 768P/2K, ratio whitelist, at most
2 frame images and 9/3/3 reference images/videos/audios) are enforced while
the request body is built, which the host runs during validation, so an
out-of-range duration is rejected with a 400 before it can become a billing
multiplier
- duration and resolution are reported as usage facts only. Like the rest of
this plugin, extractUsage returns no billing ratios, so per-call pricing is
flat and 2K/duration pricing is expressed through the model's tiered billing
expression over those facts.
Query hooks are driver hooks and are documented to receive `ctx.model` and
`ctx.upstreamModel`, but polling has no relay info and never populated them.
The polling and realtime-fetch call sites now carry the persisted task model
properties and the plugin adaptor maps them onto the query context, with
`upstreamModel` falling back to the origin name for tasks submitted without a
channel mapping.
* fix(plugin): validate Hailuo H3 requests and errors
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| channel | Loading commit data... | |
| common | Loading commit data... | |
| common_handler | Loading commit data... | |
| constant | Loading commit data... | |
| helper | Loading commit data... | |
| alpha_search_handler.go | Loading commit data... | |
| alpha_search_handler_test.go | Loading commit data... | |
| audio_handler.go | Loading commit data... | |
| chat_completions_via_responses.go | Loading commit data... | |
| chat_completions_via_responses_test.go | Loading commit data... | |
| claude_handler.go | Loading commit data... | |
| compatible_handler.go | Loading commit data... | |
| convert_request_error.go | Loading commit data... | |
| convert_request_error_test.go | Loading commit data... | |
| embedding_handler.go | Loading commit data... | |
| gemini_handler.go | Loading commit data... | |
| image_handler.go | Loading commit data... | |
| mjproxy_handler.go | Loading commit data... | |
| param_override_error.go | Loading commit data... | |
| plugin_protocol.go | Loading commit data... | |
| plugin_protocol_test.go | Loading commit data... | |
| relay_adaptor.go | Loading commit data... | |
| relay_adaptor_jsplugin_test.go | Loading commit data... | |
| relay_task.go | Loading commit data... | |
| relay_task_test.go | Loading commit data... | |
| rerank_handler.go | Loading commit data... | |
| responses_handler.go | Loading commit data... | |
| task_platform_error_test.go | Loading commit data... | |
| task_platform_test.go | Loading commit data... | |
| websocket.go | Loading commit data... |