You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE] Add a DubVideo tool that returns a clip with its generated soundtrack #1840
The Content workflow has a face half (TextToVideo) and a voice half (TextToSpeech). Sound is the missing third. Today a dubbed clip means scoring it with VideoToSFX (#1839) and muxing the audio onto the video locally with ffmpeg. Once the gateway serves dubbing through the Videos API (inference-gateway/inference-gateway#868, spec inference-gateway/schemas#315), the CLI gets the finished MP4 in one flow: POST /v1/videos with a Mirelo model and a video part returns a job, and /v1/videos/{video_id}/content downloads the clip with the generated sound in place of its soundtrack.
Add a DubVideo tool, registered only when both video_to_sfx.enabled and video_to_sfx.dub are true - the same switch pattern CreateAvatar uses under text_to_video. It reuses video_to_sfx.model and the job polling TextToVideo already has.
Parameters:video (required, same lookup as VideoToSFX), prompt, preserve_speech, and output_path (bare MP4 file name placed in <media root>/video).
Acceptance Criteria
DubVideo is registered only when video_to_sfx.enabled and video_to_sfx.dub are both true.
The tool posts the multipart form to /v1/videos, polls the job with the TextToVideo polling code and its timeout and poll_interval semantics, and downloads the MP4 from /content.
The tool description states Mirelo's limit that only the mix goes onto the clip, so it offers no track parameter.
Tests cover create, poll and download against a stubbed Videos API.
docs/tools-reference.md and docs/text-to-video.md describe it as the sound half of the Content workflow.
All done. Everything is committed to fix/issue-1840 (commits be444af2 feat + df31eec8 docs), pushed, and PR #1844 is open and ready for review.
Summary
I implemented the DubVideo tool from issue #1840 - a Mirelo-model dub of an existing clip through the gateway's Videos API, as the sound half of the Content workflow.
Acceptance criteria, all met:
DubVideo registers only when video_to_sfx.enabled and video_to_sfx.dub are both true (the switch pattern CreateAvatar uses under text_to_video): internal/tools/DubVideo.yaml, internal/tools/dub_video.go, tool_manifests.go constant, and the registry.go gate; the golden tool-definitions snapshot grew to 51 tools.
The tool posts the multipart create to POST /v1/videos, polls the job with the TextToVideo polling code and its timeout/poll_interval semantics (extracted into a shared finishVideoJob), and downloads the MP4 from /content, saving it into text_to_video.output_dir (<media root>/video). Config: new video_to_sfx block (enabled, dub, model default mirelo/sfx-2.0) with provider/model validation.
Parameters exactly as specified: video (required, working directory then TextToVideo output dir lookup), prompt, preserve_speech, output_path. The description states Mirelo's mix-only limit and that there is no track parameter.
Tests cover create, poll and download against a stubbed Videos API: infrastructure unit tests plus a full-loop integration test (DubVideoToolAgainstMockGateway), plus config, tool and registry tests.
Docs: docs/tools-reference.md (row + section), docs/text-to-video.md (a Dubbing section as the sound half), docs/configuration-reference.md (block + env overrides).
One discovery worth flagging: the SDK's hand-written CreateVideo encoder silently drops the video, preserve_speech and start_offset_seconds fields that schemas v1.14.0 regenerated its types for - so the dub create rides a small CLI-side multipart gateway (agentinfra.DubGateway, container-wired with the resolved base URL, bearer key and the propagated transport) while retrieve/download stay on the SDK client. go.mod ends byte-identical to main. I filed the upstream bug as inference-gateway/sdk#254, and the CLI can move back to sdk.Client.CreateVideo once it forwards the fields. Also fixed along the way: the auto-started gateway now gets VIDEOS_ENABLED=true while the dub switch is on (dubbing alone would otherwise 404).
Checks: go test ./... green, task precommit:run green (0 lint issues).
Skipped: a require_approval override for the new config (the issue listed only enabled/dub/model) and a supervisor env test (that table covers only loadEnvironment); risk: the dub create skips the SDK's retry wrapper - on failed creates the agent retries the tool call instead.
Activity
edenreich commentedon Nov 15, 2026
@infer can you work on this? use /ponytail:ponytail /go /go-concurrency /domain-driven-design /clean-architecture /clean-code
inference-gateway-maintainer commentedon Nov 15, 2026
Model:
ollama_cloud/glm-5.3-flash· Action:v0.59.8· CLI:v0.261.0· Gateway:v0.66.0· View JobTodos
Pull Request
#1844
✅ Infer Result: Success
All done. Everything is committed to
fix/issue-1840(commitsbe444af2feat +df31eec8docs), pushed, and PR #1844 is open and ready for review.Summary
I implemented the
DubVideotool from issue #1840 - a Mirelo-model dub of an existing clip through the gateway's Videos API, as the sound half of the Content workflow.Acceptance criteria, all met:
DubVideoregisters only whenvideo_to_sfx.enabledandvideo_to_sfx.dubare both true (the switch patternCreateAvataruses undertext_to_video):internal/tools/DubVideo.yaml,internal/tools/dub_video.go,tool_manifests.goconstant, and theregistry.gogate; the golden tool-definitions snapshot grew to 51 tools.POST /v1/videos, polls the job with theTextToVideopolling code and itstimeout/poll_intervalsemantics (extracted into a sharedfinishVideoJob), and downloads the MP4 from/content, saving it intotext_to_video.output_dir(<media root>/video). Config: newvideo_to_sfxblock (enabled,dub,modeldefaultmirelo/sfx-2.0) with provider/model validation.video(required, working directory thenTextToVideooutput dir lookup),prompt,preserve_speech,output_path. The description states Mirelo's mix-only limit and that there is notrackparameter.DubVideoToolAgainstMockGateway), plus config, tool and registry tests.docs/tools-reference.md(row + section),docs/text-to-video.md(a Dubbing section as the sound half),docs/configuration-reference.md(block + env overrides).One discovery worth flagging: the SDK's hand-written
CreateVideoencoder silently drops thevideo,preserve_speechandstart_offset_secondsfields that schemas v1.14.0 regenerated its types for - so the dub create rides a small CLI-side multipart gateway (agentinfra.DubGateway, container-wired with the resolved base URL, bearer key and the propagated transport) while retrieve/download stay on the SDK client.go.modends byte-identical to main. I filed the upstream bug as inference-gateway/sdk#254, and the CLI can move back tosdk.Client.CreateVideoonce it forwards the fields. Also fixed along the way: the auto-started gateway now getsVIDEOS_ENABLED=truewhile the dub switch is on (dubbing alone would otherwise 404).Follow-ups opened: inference-gateway/sdk#254 (SDK encoder fix), inference-gateway/docs#1219 (site docs mirror). Board item for #1840 is at QA.
Checks:
go test ./...green,task precommit:rungreen (0 lint issues).Skipped: a
require_approvaloverride for the new config (the issue listed onlyenabled/dub/model) and a supervisor env test (that table covers onlyloadEnvironment); risk: the dub create skips the SDK's retry wrapper - on failed creates the agent retries the tool call instead.Model:
ollama_cloud/glm-5.3-flash· Action:v0.59.8· CLI:v0.261.0· Gateway:v0.66.0· Exit Code:0· Duration: 26m 22sTokens: 27,605,478 in · 142,256 out · 27,747,734 total (148 requests)
Tool calls: 186 total · 100% success rate
Traces
Stats
Triggered by edenreich · Infer Action · OSS
inference-gateway-releaser commentedon Nov 16, 2026
🎉 This issue has been resolved in version 0.262.0 🎉
The release is available on:
Your semantic-release bot 📦🚀