Skip to content

Complete partial video generation foundation#217

Merged
felixarntz merged 2 commits intotrunkfrom
video-generation-foundation
Mar 10, 2026
Merged

Complete partial video generation foundation#217
felixarntz merged 2 commits intotrunkfrom
video-generation-foundation

Conversation

@felixarntz
Copy link
Member

@felixarntz felixarntz commented Mar 8, 2026

While we partially had the required pieces for video generation already present, for some reason we were missing part of the foundation. This PR fixes that.

This does not actually implement any video generation features - it just completes the API. It will allow providers to implement video support in the future.

Nothing special here, this entirely follows the existing patterns we already use for e.g. text generation, image generation, speech generation, ...

@felixarntz felixarntz added this to the 1.3.0 milestone Mar 8, 2026
@felixarntz felixarntz requested a review from JasonTheAdams March 8, 2026 19:09
@felixarntz felixarntz added the [Type] Bug An existing feature does not function as intended label Mar 8, 2026
@codecov
Copy link

codecov bot commented Mar 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.54%. Comparing base (30a1506) to head (bda379c).
⚠️ Report is 7 commits behind head on trunk.

Additional details and impacted files
@@             Coverage Diff              @@
##              trunk     #217      +/-   ##
============================================
+ Coverage     87.45%   87.54%   +0.09%     
- Complexity     1194     1201       +7     
============================================
  Files            60       60              
  Lines          3858     3878      +20     
============================================
+ Hits           3374     3395      +21     
+ Misses          484      483       -1     
Flag Coverage Δ
unit 87.54% <100.00%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link

github-actions bot commented Mar 8, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: felixarntz <flixos90@git.wordpress.org>
Co-authored-by: gziolo <gziolo@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All checks pass locally (tests, PHPCS clean, PHPStan clean).

Verified the implementation follows the established patterns for speech/image generation:

  • VideoGenerationModelInterface and VideoGenerationOperationModelInterface match the existing interface pairs (sync + async)
  • PromptBuilder additions (generateVideoResult, generateVideo, generateVideos) follow the same flow: set output modality → delegate to generateResult with the correct capability
  • Capability inference works from both the model interface and explicit output modality, consistent with other modalities
  • The old "video not yet supported" throw is replaced with proper delegation, and the unsupported modality test now uses document instead
  • Test coverage is thorough — mirrors the existing speech/image test structure across all code paths (result generation, error cases, shorthand helpers, capability inference, isSupported check)

Based on my research, the two-interface split (sync ModelInterface + async OperationModelInterface) is a good fit for providers like OpenAI/Sora where video generation is inherently asynchronous (job submission + polling), while the sync interface can wrap create_and_poll + download for simpler usage.

No issues found.

@felixarntz felixarntz merged commit 82ad3db into trunk Mar 10, 2026
10 checks passed
@felixarntz felixarntz deleted the video-generation-foundation branch March 10, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants