feat: add Reactor.inc fast-h3 video generation API provider to MediaGen and FableLoom - #6224
Merged
Conversation
…en and FableLoom (#6214) Adds server/services/videoGen/reactor.js — a token-minting/submit/poll/download provider mirroring videoGen/fal.js's queue REST contract — as a first-class mediaJobQueue cloud-lane video backend with native clip-to-clip chaining via continue_from_clip_id. A new GET /api/video-gen/reactor/token route mints a short-lived, scoped session JWT from REACTOR_API_KEY server-side (never exposed to the client), re-minted automatically if a render's poll loop outlives the session. Wires 'reactor' through the VIDEO_GEN_MODE alphabet, the video pin ladder, prepareVideoGenParams' backend short-circuit, submitJob's dispatch, and the VideoGen page's backend switch (clip id / clip length / seed fields), plus a Settings > Image Gen field for the REACTOR_API_KEY / API key.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
server/services/videoGen/reactor.js— a token-minting/submit/poll/download cloud video provider for reactor.inc'sfast-h3model, mirroring thevideoGen/fal.jsqueue-REST contract as a first-classmediaJobQueuecloud-lane backend.GET /api/video-gen/reactor/tokenroute mints a short-lived, scoped session JWT fromREACTOR_API_KEYserver-side — the raw key never reaches the client — with automatic re-minting if a render's poll loop outlives the session.continue_from_clip_id,starting_frame(image-to-video),seconds, andseed.reactorthrough theVIDEO_GEN_MODEalphabet, the video pin ladder,prepareVideoGenParams' backend short-circuit,submitJob's dispatch, and resume-from-active-job param restore.reactorbackend option to the VideoGen page (clip id / clip length / seed fields) and FableLoom's render backend picker, plus a Settings → Image Gen field for theREACTOR_API_KEY/ API key.Closes #6214
Test plan
server/services/videoGen/reactor.test.js— 13 new tests covering token minting/failure, request-body building (including prompt truncation and seed=0 preservation), full submit→poll→download→history flow, error handling, chaining params, and automatic token re-mint on a 401 mid-poll.server/services/videoGen/*,server/services/mediaJobQueue/*,server/routes/videoGen.test.js,server/lib/{generationModes,validation}.test.js(1213 passed), and the client hooks/pages/settings suites touched by this change (125 passed).npx biome lintclean on all touched client files.opencodeagainst the branch diff; applied its findings (JWT re-mint on 401, resume-param whitelist gap forcontinueFromClipId/seconds,seed=0dropped by|| undefined, dead width/height fields in the reactor payload).