Skip to content

feat(black-forest-labs): add video model support (FLUX 3) - #18417

Merged
gr2m merged 12 commits into
mainfrom
feat/bfl-flux-3-video
Aug 4, 2026
Merged

feat(black-forest-labs): add video model support (FLUX 3)#18417
gr2m merged 12 commits into
mainfrom
feat/bfl-flux-3-video

Conversation

@joshualipman123

@joshualipman123 joshualipman123 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Background

FLUX 3 is Black Forest Labs' first video model. @ai-sdk/black-forest-labs only exposed image models, so blackForestLabs.video(...) did not exist and FLUX 3 was unreachable through generateVideo.

Summary

Adds BlackForestLabsVideoModel (Experimental_VideoModelV4) and wires video / videoModel onto the provider.

The API is one endpoint with a mode discriminator, and the spec has no mode call option, so the mode is derived from which inputs are set:

Mode Selected by Body
t2v nothing else set prompt
i2v image / frameImages, or providerOptions.blackForestLabs.keyframes keyframes
v2v a video-typed inputReferences entry start_video
draft_enhance providerOptions.blackForestLabs.draftCache draft_cache

Mapping decisions (for review):

  • resolution — the API takes a named tier (hd/fhd) while the call option is {width}x{height}. Named tiers are accepted case-insensitively; dimensions resolve by their shorter side, with a compatibility warning only
    when the value snaps (1280x720 / 1920x1080 are silent).
  • keyframesimage / frameImages cover one and two keyframes. The shapes those options can't express (3+ images, images pinned to a second) go through providerOptions.blackForestLabs.keyframes. 3+ untimed keyframes without a duration get an other warning, since the API rejects that combination.
  • inputReferences — FLUX 3 has no reference-image concept, so image references warn and point at the keyframe inputs; a reference with no mediaType is treated as the video to continue from, with a warning.

Follow-ups

Route multi-image keyframes through inputReferences. Right now image and
frameImages cover one and two keyframes, and everything richer (3+ images, images pinned to a second) goes through providerOptions.blackForestLabs.keyframes. That leaves a bad seam — two images
is a top-level field, three is a provider option, though nothing about the caller's intent changed — and, more importantly, conditioning images hidden in providerOptions are invisible to anything downstream that meters inputs, which matters because FLUX 3 reports input_mp and bills for them. inputReferences is already an ordered array of image-or-video files, which is the shape a keyframe list wants.

@joshualipman123 joshualipman123 changed the title add balckforest video model support feat(black-forest-labs): add video model support (FLUX 3) Aug 4, 2026
@joshualipman123
joshualipman123 requested a review from gr2m August 4, 2026 18:17
@joshualipman123
joshualipman123 marked this pull request as ready for review August 4, 2026 18:28
@joshualipman123
joshualipman123 marked this pull request as draft August 4, 2026 18:29
@ai-sdk-factory ai-sdk-factory Bot assigned gr2m and unassigned joshualipman123 Aug 4, 2026
gr2m added 8 commits August 4, 2026 14:08
Ref: contributing/providers.md#workflow-serialization

Reason: video models must cross workflow steps
Ref: packages/ai/src/generate-video/generate-video.ts; https://docs.bfl.ai/flux_3/flux3_video

Reason: Core downloads signed provider URLs
Ref: packages/black-forest-labs/src/black-forest-labs-video-model.ts

Reason: mapping uses 720px threshold, not nearest tier
Ref: Lint & Format CI; .oxfmtrc.jsonc

Reason: oxfmt requires canonical layout
Ref: packages/provider-utils/src/serialize-model-options.ts

Reason: test filtering with non-serializable values
@joshualipman123 joshualipman123 added the backport Admins only: add this label to a pull request in order to backport it to the prior version label Aug 4, 2026
@gr2m
gr2m merged commit 53f1bc4 into main Aug 4, 2026
51 checks passed
@gr2m
gr2m deleted the feat/bfl-flux-3-video branch August 4, 2026 22:31
github-actions Bot added a commit that referenced this pull request Aug 4, 2026
@github-actions github-actions Bot removed the backport Admins only: add this label to a pull request in order to backport it to the prior version label Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

⚠️ Backport to release-v6.0 created but has conflicts: #18435

gr2m added a commit that referenced this pull request Aug 4, 2026
## Summary

- backport #18417 to v6
- adapt FLUX 3 to VideoModelV3 provider polling
- include tests, examples, docs, changeset

closes #18435
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🚀 Published in:

Package Version
ai 7.0.52 github npm
@ai-sdk/alibaba 2.0.25 github npm
@ai-sdk/amazon-bedrock 5.0.43 github npm
@ai-sdk/angular 3.0.52 github npm
@ai-sdk/anthropic 4.0.30 github npm
@ai-sdk/anthropic-aws 2.0.22 github npm
@ai-sdk/assemblyai 3.0.21 github npm
@ai-sdk/azure 4.0.31 github npm
@ai-sdk/baseten 2.1.1 github npm
@ai-sdk/black-forest-labs 2.0.21 github npm
@ai-sdk/bytedance 2.0.23 github npm
@ai-sdk/cartesia 3.0.16 github npm
@ai-sdk/cerebras 3.0.23 github npm
@ai-sdk/code-mode 1.0.9 github npm
@ai-sdk/cohere 4.0.21 github npm
@ai-sdk/deepgram 3.0.21 github npm
@ai-sdk/deepinfra 3.0.23 github npm
@ai-sdk/deepseek 3.0.22 github npm
@ai-sdk/elevenlabs 3.0.22 github npm
@ai-sdk/fal 3.0.22 github npm
@ai-sdk/fireworks 3.0.25 github npm
@ai-sdk/gateway 4.0.41 github npm
@ai-sdk/gladia 3.0.21 github npm
@ai-sdk/google 4.0.34 github npm
@ai-sdk/google-vertex 5.0.41 github npm
@ai-sdk/groq 4.0.22 github npm
@ai-sdk/harness 1.0.58 github npm
@ai-sdk/harness-claude-code 1.0.59 github npm
@ai-sdk/harness-codex 1.0.60 github npm
@ai-sdk/harness-deepagents 1.0.57 github npm
@ai-sdk/harness-opencode 1.0.59 github npm
@ai-sdk/harness-pi 1.0.58 github npm
@ai-sdk/huggingface 2.0.23 github npm
@ai-sdk/hume 3.0.21 github npm
@ai-sdk/klingai 4.0.23 github npm
@ai-sdk/langchain 3.0.52 github npm
@ai-sdk/llamaindex 3.0.52 github npm
@ai-sdk/lmnt 3.0.21 github npm
@ai-sdk/luma 3.0.22 github npm
@ai-sdk/mcp 2.0.25 github npm
@ai-sdk/minimax 3.0.6 github npm
@ai-sdk/mistral 4.0.23 github npm
@ai-sdk/moonshotai 3.0.26 github npm
@ai-sdk/open-responses 2.0.21 github npm
@ai-sdk/openai 4.0.30 github npm
@ai-sdk/openai-compatible 3.0.23 github npm
@ai-sdk/otel 1.0.52 github npm
@ai-sdk/perplexity 4.0.23 github npm
@ai-sdk/policy-opa 1.0.52 github npm
@ai-sdk/prodia 2.0.22 github npm
@ai-sdk/provider-utils 5.0.21 github npm
@ai-sdk/quiverai 2.0.21 github npm
@ai-sdk/react 4.0.55 github npm
@ai-sdk/replicate 3.0.22 github npm
@ai-sdk/revai 3.0.21 github npm
@ai-sdk/rsc 3.0.52 github npm
@ai-sdk/sandbox-just-bash 1.0.58 github npm
@ai-sdk/sandbox-vercel 1.0.58 github npm
@ai-sdk/svelte 5.0.52 github npm
@ai-sdk/togetherai 3.0.24 github npm
@ai-sdk/tui 1.0.53 github npm
@ai-sdk/valibot 3.0.21 github npm
@ai-sdk/vercel 3.0.23 github npm
@ai-sdk/voyage 2.0.21 github npm
@ai-sdk/vue 4.0.52 github npm
@ai-sdk/workflow 1.0.52 github npm
@ai-sdk/workflow-harness 1.0.58 github npm
@ai-sdk/xai 4.0.28 github npm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants