fix: return 202 from OpenRouter video job creation - #492
Open
tombeckenham wants to merge 2 commits into
Conversation
The official SDK accepts only 202 for POST /api/v1/videos. Fixture replay and the record proxy now use that status for the same job envelope. Closes CopilotKit#491
commit: |
This branch has not been deployed
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.
Summary
POST /api/v1/videosnow returns202 Acceptedwith the same{ id, polling_url, status: "pending" }envelope.202. Poll and download stay200.@openrouter/sdkaccepts only202forvideoGeneration.generate, so job creation through the official SDK was failing before polling started.Closes #491
Test plan
vitestonopenrouter-video.test.ts,openrouter-video-record.test.ts, andmetrics.test.ts(326 passed)openrouter-video.drift.ts(3 passed, 1 skipped)@openrouter/sdkvideoGeneration.generatecall against the mock no longer throwsUnexpected Status or Content-Type: Status 200