Repository navigation
fix(openai): use canonical multipart video submissions - #116995
Merged
Merged
Conversation
steipete
marked this pull request as ready for review
July 31, 2026 18:58
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Aug 1, 2026
Co-authored-by: Peter Steinberger <[email protected]>
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.
What Problem This Solves
OpenAI Sora video generation sent both text-only and image-reference requests as JSON even though the official OpenAI API and the installed
[email protected]SDK require multipart uploads forPOST /v1/videos.Two independently verified user-visible root causes:
application/jsoninstead of multipartprompt,model, and generation options.input_referencefile.Why This Change Was Made
The private OpenAI video owner now builds one canonical multipart request for text generation, image-reference generation, and existing video edits. Text and image creation target
/videos; edits continue targeting/videos/editswith only the SDK-supportedpromptandvideofields.The refactor deletes duplicate JSON/data-URL request branches and removes 42 production lines. Authentication, SSRF policy, dispatcher policy, polling, timeout budgets, download bounds, release cleanup, and public provider contracts remain unchanged.
User Impact
Evidence
Frozen canonical baseline:
36b80ada3ceae2de21b3d8710b883d778e4c4578.Immutable reviewed candidate:
31c962e4f769736e9b4d7ece9a7b763fdd5b024c.Official OpenAI SDK inspected directly:
node_modules/openai/src/resources/videos.ts:14,:84,:178, and:225.Actual installed SDK capture-fetch proof confirmed that text creation, image-reference creation, and video edits all emit multipart requests; the image is uploaded under
input_referenceand edits send onlypromptplusvideo.Remote Blacksmith Testbox recreated a detached worktree from the exact frozen baseline, verified both changed Git blobs, and proved its complete staged tree exactly matched immutable candidate tree
be47a1ed9fca5486d677a89f218a117eefa3ce75.Exact reconstructed candidate owner suite:
pnpm test extensions/openai/video-generation-provider.test.ts19/19 owner tests passed. Provider:
blacksmith-testbox; lease:tbx_01kywr09d6pf5bxg0a89kzfs2h; run: https://github.com/openclaw/openclaw/actions/runs/30656525347. The lease was stopped and its completed status verified.Exact full-branch Codex/Sol high-reasoning autoreview with explicit
--max-priority P3: zero actionable P0/P1/P2/P3 findings, confidence 0.96, genuine TruffleHog clean.Separate blind owner/SDK/source review: clean across P0/P1/P2/P3.
Targeted oxfmt, oxlint,
git diff --check, immutable base/tree/blob guards, and clean final worktree: passed.Production delta: 32 additions / 74 deletions = -42 lines; regression tests: 28 additions / 26 deletions.