Skip to content

fix: return 202 from OpenRouter video job creation - #492

Open
tombeckenham wants to merge 2 commits into
CopilotKit:mainfrom
tombeckenham:491-openrouter-video-post-api-v1-videos-returns-200-but-the-official-sdk-only-accepts-202
Open

tombeckenham wants to merge 2 commits into
CopilotKit:mainfrom
tombeckenham:491-openrouter-video-post-api-v1-videos-returns-200-but-the-official-sdk-only-accepts-202

Conversation

@tombeckenham

Copy link
Copy Markdown
Contributor

Summary

  • POST /api/v1/videos now returns 202 Accepted with the same { id, polling_url, status: "pending" } envelope.
  • Both the fixture replay path and the record/proxy path send 202. Poll and download stay 200.
  • @openrouter/sdk accepts only 202 for videoGeneration.generate, so job creation through the official SDK was failing before polling started.

Closes #491

Test plan

  • vitest on openrouter-video.test.ts, openrouter-video-record.test.ts, and metrics.test.ts (326 passed)
  • drift config run of openrouter-video.drift.ts (3 passed, 1 skipped)
  • Confirm a real @openrouter/sdk videoGeneration.generate call against the mock no longer throws Unexpected Status or Content-Type: Status 200

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
@pkg-pr-new

pkg-pr-new Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@copilotkit/aimock@492

commit: 32d4d41

This branch has not been deployed

No deployments
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.

OpenRouter video: POST /api/v1/videos returns 200, but the official SDK only accepts 202

1 participant