feat: generic OpenAI-compatible video custom provider - #9818
Closed
oyi77 wants to merge 0 commit into
Closed
Conversation
Owner
|
Thanks for the PR. Please address the mandatory items (tests and/or merge blockers) in this branch, then rerun checks before /merge-prs. |
2 similar comments
Owner
|
Thanks for the PR. Please address the mandatory items (tests and/or merge blockers) in this branch, then rerun checks before /merge-prs. |
Owner
|
Thanks for the PR. Please address the mandatory items (tests and/or merge blockers) in this branch, then rerun checks before /merge-prs. |
oyi77
added a commit
to oyi77/OmniRoute
that referenced
this pull request
Aug 9, 2026
… test coverage (diegosouzapw#9818) - job.ts: presets (agnes-video-job, muapi-video-job) with submit→poll→done executor - videoGeneration.ts: generationConfig.preset dispatch branch + mediaGenerationRoute pass-through - provider-models/route.ts + models.ts: generationConfig persisted on addCustomModel - provider schema: generationConfig optional field - tests: resolvedProvider bare-model + job preset happy/failed/unknown paths - docs/video-preset-generation.md
Owner
|
Obrigado pelo PR. Mantive a revisão de
|
oyi77
added a commit
to oyi77/OmniRoute
that referenced
this pull request
Aug 9, 2026
…ecks - file-size-baseline: open-sse/handlers/videoGeneration.ts 1063 -> 1197 with _rebaseline_2026_08_09_9818_openai_video_dispatch justification (resolveVideoBaseUrl + getCustomModelVideoPreset dispatch wiring for generic OpenAI-compatible video custom provider, PR diegosouzapw#9818) - job.ts: use explicit `ok === false` for submitResult/pollResult guards so TypeScript narrows the union (build reproducibility; real tsc blocker when the result type is not a discriminated boolean)
diegosouzapw
added a commit
that referenced
this pull request
Aug 9, 2026
…ovider (#9844) * feat: generic OpenAI-compatible video custom provider Adds a generic OpenAI-compatible video generation path so users can add custom video providers (base URL + API key) without per-provider code. Changes: - open-sse/handlers/videoGeneration/openai.ts (new): generic handler with resolveVideoEndpoint, fetchVideoEndpoint, handleOpenAIVideoGeneration - open-sse/handlers/videoGeneration.ts: added resolveVideoBaseUrl(), dispatch for 'openai-video' format before 'vertex-veo', synthetic config for custom providers, fallback for resolvedProvider - src/app/api/v1/videos/generations/route.ts: scans custom models for supportedEndpoints.includes('videos'), resolves credentials via getProviderCredentialsWithQuotaPreflight, passes resolvedProvider - src/shared/validation/schemas/provider.ts: added 'videos' to supportedEndpoints enum - tests/unit/video-generation-handler.test.ts: handler-level test for custom provider - tests/unit/video-custom-provider-route.test.ts (new): route-level tests covering custom provider with/without videos endpoint, unknown provider All verification: - typecheck:core passes - 17 video tests pass (3 new route tests + 1 new handler test) - no regressions in image generation tests * test(video): drop duplicated test.after cleanup in custom-provider route test * feat(video): declarative job presets + dispatcher, route, and handler test coverage (#9818) - job.ts: presets (agnes-video-job, muapi-video-job) with submit→poll→done executor - videoGeneration.ts: generationConfig.preset dispatch branch + mediaGenerationRoute pass-through - provider-models/route.ts + models.ts: generationConfig persisted on addCustomModel - provider schema: generationConfig optional field - tests: resolvedProvider bare-model + job preset happy/failed/unknown paths - docs/video-preset-generation.md * fix(video): restore dashscope + novita handler imports dropped in refactor * refactor(video): extract Runway helpers Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com> --------- Co-authored-by: oyi77 <oyi77@users.noreply.github.com>
oyi77
force-pushed
the
feat/generic-openai-video-provider
branch
from
August 9, 2026 17:07
8033525 to
382449d
Compare
Contributor
Author
|
Closing as superseded — the feature content is already merged upstream:
|
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
Adds a generic OpenAI-compatible video generation path so users can add custom video providers (base URL + API key) without per-provider code changes.
Changes
Core Implementation
open-sse/handlers/videoGeneration/openai.ts (new): Generic handler with:
resolveVideoEndpoint()- resolves endpoint URL from credentials (prefersproviderSpecificData.baseUrl)fetchVideoEndpoint()- fetches with timeout, error handling, and logginghandleOpenAIVideoGeneration()- main handler acceptingdurationparameteropen-sse/handlers/videoGeneration.ts:
resolveVideoBaseUrl()helper (mirrorsresolveImageBaseUrl)handleOpenAIVideoGenerationopenai-videoformat beforevertex-veoformat: "openai-video"for custom providersresolvedProvider(custom models), returningUnsupported video formatfor unknown built-in formatsadobe-firefly-videodispatch branchsrc/app/api/v1/videos/generations/route.ts: Already had correct custom model logic:
getAllCustomModelssupportedEndpoints.includes("videos")providerId/modelIdfrom custom model registrygetProviderCredentialsWithQuotaPreflight(provider, null, null, requestedModel)resolvedProviderto handlersrc/shared/validation/schemas/provider.ts: Added
"videos"tosupportedEndpointsenumTests
videosendpoint (happy path)videosendpoint (400)Design Decisions (Locked)
duration"videos"insupportedEndpointsresolvedProvider(images parity)"openai-video"dispatched FIRST (beforevertex-veo){id, baseUrl, authType:"apikey", authHeader:"bearer", format:"openai-video"}when!providerConfig && resolvedProvidergetProviderCredentialsWithQuotaPreflight(provider, null, null, requestedModel)sanitizeErrorMessagefetchWithTimeoutfrom@/shared/utils/fetchTimeout(no.ts)Verification
npm run typecheck:corepassesVerification
npm run typecheck:core— PASS (zero output, exit 0)tests/unit/video-custom-provider-route.test.ts— 3/3 passtests/unit/video-generation-handler.test.ts— 14/14 passtests/unit/image-generation-handler.test.ts— 43/43 pass (no regression)Coverage (c8, isolated output dirs)
Scoping note (official Sora SDK)
The
openai-videohandler is a gateway-house convention for OpenAI-compatible videoproviders —
POST /v1/videos/generations→ synchronous MP4 response, credentials from thecustom-provider connection (
baseUrl+ API key). This is not the official OpenAI SDKSora job API (
POST /v1/videos→GET /videos/{id}polling). Sora-style async job providersare planned in the follow-up mapping layer (
generationConfigpresets + job/poll branch).