Skip to content

fix(video): support Fal-hosted Grok Imagine Video - #9969

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.50from
rinseaid:feat/fal-grok-video-v350
Aug 10, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.50from
rinseaid:feat/fal-grok-video-v350

Conversation

@rinseaid

@rinseaid rinseaid commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Problem

Fal-hosted Grok Imagine Video uses the queue model path xai/grok-imagine-video/text-to-video and expects an integer duration. The existing video registry has no Fal video provider, so the request is rejected before it can reach Fal.

Solution

  • add Fal's queue API as a video provider
  • register Veo 3.1 Lite and Grok Imagine Video model paths
  • preserve provider-relative Fal model paths
  • map Grok requests to its documented payload and normalize the completed video response
  • return an authentication error when no Fal credential is configured

Validation

  • node --import tsx/esm --import ./open-sse/utils/setupPolyfill.ts --test --test-force-exit tests/unit/video-fal-grok.test.ts tests/unit/video-generation-handler.test.ts tests/unit/video-xai-grok-imagine.test.ts
  • npm run typecheck:core
  • suppression-aware ESLint on changed files
  • git diff --check

@rinseaid
rinseaid requested a review from diegosouzapw as a code owner August 9, 2026 22:19
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks @rinseaid — Fal-hosted Grok Imagine Video support (queue polling) with tests. Merge-ready.

3 similar comments
@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks @rinseaid — Fal-hosted Grok Imagine Video support (queue polling) with tests. Merge-ready.

@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks @rinseaid — Fal-hosted Grok Imagine Video support (queue polling) with tests. Merge-ready.

@diegosouzapw

Copy link
Copy Markdown
Owner

Thanks @rinseaid — Fal-hosted Grok Imagine Video support (queue polling) with tests. Merge-ready.

@diegosouzapw
diegosouzapw merged commit a93f64e into diegosouzapw:release/v3.8.50 Aug 10, 2026
4 checks passed
diegosouzapw added a commit that referenced this pull request Aug 12, 2026
…sh (#10198)

The Build CI job is advisory, so eight module-level defects from eight
different PRs accumulated on release/v3.8.50 until `npm run build` failed
with 7 Turbopack errors and `npm run lint` with 14.

Build (link-time):
- modelSelectModalHelpers.ts: a lost `}` swallowed PROVIDER_TEST_CHUNK_SIZE
  into isProviderModelHidden's body (#9011).
- videoGeneration.ts: handleFalVideoGeneration imported twice; the standalone
  falHandler.ts is superseded by the provider-neutral mediaGeneration/fal.ts
  and is removed here (#9982 over #9969).
- catalog.ts: re-exported and called the injectable SWR policy that #9199
  deliberately replaced with a fixed 30s bound. Fixed on the consumer side —
  restoring the accessor would resurrect the unbounded window #9199 removed
  after measuring a 41s catalog build in production.
- tinycmsSigner.ts: generated wasm-bindgen glue kept a sidecar
  `new URL('wasm_signer_bg.wasm', import.meta.url)` that no file backs;
  Turbopack resolves it statically. The module ships inlined as WASM_BASE64
  and the only caller always passes it explicitly (#8736/#10087).
- conolDiscovery.ts: imported getProviderOutboundGuard from outboundUrlGuard,
  which does not export it. Fixed on the consumer side: outboundUrlGuard.ts is
  loaded by the packaged CLI without a tsconfig, so it must stay free of
  `@/`-aliased imports (#7682).

Runtime (the build never caught this one):
- catalogCache.ts::scheduleBackgroundRefresh had two dangling statements
  referencing undeclared `inFlight`/`promise`, so EVERY stale-while-revalidate
  read threw a ReferenceError. Surfaced by realigning the #8728 suite, which
  #9199 left asserting a removed contract.

Lint:
- driverFactory.test.ts: a case inserted between the preceding test's `finally`
  and its `});` left the file unparseable, so the SQLite driver-cascade suite
  (26 tests) had not run since 2026-08-11 (#9173).
- providerModelsConfig.ts: imported an executor directly, crossing the G14
  boundary; routed through a new open-sse/services/zaiWebCredentials.ts (#8451).
- image-combo.test.ts: 11 `any` violations, now typed (#9499).

Validation: npm run build exit 0, npm run lint clean, typecheck:core clean,
41/41 tests green across the affected suites.

Refs #9011 #9982 #9199 #8728 #8736 #10087 #8974 #9173 #8451 #9499

Co-authored-by: backryun <bakryun0718@proton.me>
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
Co-authored-by: rinseaid <rinseaid@rinseaid.net>
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…sh (diegosouzapw#10198)

The Build CI job is advisory, so eight module-level defects from eight
different PRs accumulated on release/v3.8.50 until `npm run build` failed
with 7 Turbopack errors and `npm run lint` with 14.

Build (link-time):
- modelSelectModalHelpers.ts: a lost `}` swallowed PROVIDER_TEST_CHUNK_SIZE
  into isProviderModelHidden's body (diegosouzapw#9011).
- videoGeneration.ts: handleFalVideoGeneration imported twice; the standalone
  falHandler.ts is superseded by the provider-neutral mediaGeneration/fal.ts
  and is removed here (diegosouzapw#9982 over diegosouzapw#9969).
- catalog.ts: re-exported and called the injectable SWR policy that diegosouzapw#9199
  deliberately replaced with a fixed 30s bound. Fixed on the consumer side —
  restoring the accessor would resurrect the unbounded window diegosouzapw#9199 removed
  after measuring a 41s catalog build in production.
- tinycmsSigner.ts: generated wasm-bindgen glue kept a sidecar
  `new URL('wasm_signer_bg.wasm', import.meta.url)` that no file backs;
  Turbopack resolves it statically. The module ships inlined as WASM_BASE64
  and the only caller always passes it explicitly (diegosouzapw#8736/diegosouzapw#10087).
- conolDiscovery.ts: imported getProviderOutboundGuard from outboundUrlGuard,
  which does not export it. Fixed on the consumer side: outboundUrlGuard.ts is
  loaded by the packaged CLI without a tsconfig, so it must stay free of
  `@/`-aliased imports (diegosouzapw#7682).

Runtime (the build never caught this one):
- catalogCache.ts::scheduleBackgroundRefresh had two dangling statements
  referencing undeclared `inFlight`/`promise`, so EVERY stale-while-revalidate
  read threw a ReferenceError. Surfaced by realigning the diegosouzapw#8728 suite, which
  diegosouzapw#9199 left asserting a removed contract.

Lint:
- driverFactory.test.ts: a case inserted between the preceding test's `finally`
  and its `});` left the file unparseable, so the SQLite driver-cascade suite
  (26 tests) had not run since 2026-08-11 (diegosouzapw#9173).
- providerModelsConfig.ts: imported an executor directly, crossing the G14
  boundary; routed through a new open-sse/services/zaiWebCredentials.ts (diegosouzapw#8451).
- image-combo.test.ts: 11 `any` violations, now typed (diegosouzapw#9499).

Validation: npm run build exit 0, npm run lint clean, typecheck:core clean,
41/41 tests green across the affected suites.

Refs diegosouzapw#9011 diegosouzapw#9982 diegosouzapw#9199 diegosouzapw#8728 diegosouzapw#8736 diegosouzapw#10087 diegosouzapw#8974 diegosouzapw#9173 diegosouzapw#8451 diegosouzapw#9499

Co-authored-by: backryun <bakryun0718@proton.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants