mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
Adds Novita AI to the video-generation subsystem (VIDEO_PROVIDERS), alongside its existing text/chat gateway registration. Novita's async video APIs are per-model (POST /v3/async/<model-slug>, e.g. wan-t2v, kling-v1.6-t2v) sharing one poll endpoint (GET /v3/async/task-result?task_id=...) — confirmed against Novita's published API reference. Seeds Wan 2.1 T2V and Kling V1.6 T2V models; reuses the stored novita provider Bearer apiKey (no separate credential flow). To stay under the frozen videoGeneration.ts file-size cap, extracted the existing Alibaba/DashScope handler into a co-located sibling module (videoGeneration/dashscopeHandler.ts) alongside the new Novita handler (videoGeneration/novitaHandler.ts) and its pure helpers (videoGeneration/novita.ts). Also tags novita in VIDEO_PROVIDER_IDS (src/shared/constants/providers.ts) so it surfaces as a video-capable provider in PROVIDER_REFERENCE.md and A2A provider-discovery, and regenerates the provider reference doc. Tests: tests/unit/video-novita-6658.test.ts (18 cases) covering registry shape, pure helpers (URL building, param normalization, task-id/result parsing), and full handler wiring (submit->poll->mp4, missing credentials, missing task_id, task FAILED, task timeout).