Skip to content

fix: resolve string video model IDs via AI_SDK_DEFAULT_PROVIDER - #234

Merged
SecurityQQ merged 1 commit into
mainfrom
fix/video-string-model-id
Aug 19, 2026
Merged

SecurityQQ merged 1 commit into
mainfrom
fix/video-string-model-id

Conversation

@SecurityQQ

Copy link
Copy Markdown
Contributor

Summary

  • <Video model="seedance_2_5" /> passed a string to generateVideo(), which called model.doGenerate() directly — strings have no doGenerate, causing "model.doGenerate is not a function" on every clip.
  • generateImage() from the Vercel AI SDK already resolves string IDs via globalThis.AI_SDK_DEFAULT_PROVIDER (set by the render service before render()). This adds the same resolution to generateVideo().
  • Added toVideoModelV3() shell for preview mode (matching existing toImageModelV3()).
  • VideoProps.model, TalkingHeadProps.model/lipsyncModel, and DefaultModels.video now accept VideoModel (string | VideoModelV3).

Test plan

  • tsc --noEmit passes (0 new errors)
  • bun test src/react/renderers/ — all pass
  • Cloud render with <Video model="seedance_2_5" /> succeeds

Generated with Devin

`<Video model="seedance_2_5" />` passed a string to generateVideo(),
which called model.doGenerate() directly — strings have no doGenerate,
causing "model.doGenerate is not a function" on every clip.

generateImage() from the Vercel AI SDK already resolves string IDs via
globalThis.AI_SDK_DEFAULT_PROVIDER (set by the render service before
render()). This adds the same resolution to generateVideo(), plus a
toVideoModelV3() shell for preview mode (matching toImageModelV3()).

VideoProps.model, TalkingHeadProps.model/lipsyncModel, and
DefaultModels.video now accept VideoModel (string | VideoModelV3).

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 15602903-a6f9-47a9-a892-d9f404dd20d5

📥 Commits

Reviewing files that changed from the base of the PR and between 234ae26 and a8daf65.

📒 Files selected for processing (4)
  • src/ai-sdk/generate-video.ts
  • src/ai-sdk/index.ts
  • src/react/renderers/render.ts
  • src/react/types.ts

📝 Walkthrough

walkthrough

video generation now accepts string model ids or VideoModelV3 objects. string ids resolve through the default provider. react video props and preview rendering support both model forms.

changes

video model support

layer / file(s) summary
video model contract and resolution
src/ai-sdk/generate-video.ts, src/ai-sdk/index.ts
VideoModel accepts string ids and VideoModelV3 objects. generateVideo resolves string ids before calling doGenerate.
react video model types
src/react/types.ts
video props, talking-head props, lipsync models, and default video models use VideoModel.
preview video adaptation
src/react/renderers/render.ts
preview rendering adapts string models to a v3 shell. pricing metadata supports string and object model inputs.

estimated code review effort: 3 (moderate) | ~20 minutes

sequence diagram(s)

sequenceDiagram
  participant caller
  participant generateVideo
  participant defaultProvider
  participant previewRenderer

  caller->>generateVideo: provide string model id
  generateVideo->>defaultProvider: resolve video model
  defaultProvider-->>generateVideo: return VideoModelV3
  generateVideo->>previewRenderer: render with resolved model
Loading

poem

a model name takes flight
the provider makes it right
v3 waits in a shell
preview casts its spell
strings and objects now meow

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/video-string-model-id

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@SecurityQQ
SecurityQQ merged commit 540014f into main Aug 19, 2026
0 of 2 checks passed
SecurityQQ added a commit that referenced this pull request Aug 24, 2026
Brings the computation-graph IR, render lifecycle split, and derived
audio nodes (vid.audio with transcribe/speechRange/silence detection)
to main. Resolved conflicts in audio.ts (combined resolveVideoMixVolume
+ renderAudio), clip.ts (import line), render.ts (took feature branch
refactored structure, integrated resolveVideoMixVolume into
renderOverlays), and context-builder.ts (added toVideoModelV3 for
string model ID support from PR #234).

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.

1 participant