Skip to content

feat(novita): add Vidu Q1/Q2/Q3 request shapes - #17

Merged
duanbing merged 1 commit into
mainfrom
feat/vidu-request-shapes
Jul 9, 2026
Merged

feat(novita): add Vidu Q1/Q2/Q3 request shapes#17
duanbing merged 1 commit into
mainfrom
feat/vidu-request-shapes

Conversation

@duanbing

@duanbing duanbing commented Jul 8, 2026

Copy link
Copy Markdown

Adds nine NovitaRequestShape variants for the Vidu video family on the Novita async media proxy, shared where request bodies are identical (Q2 pro/turbo img2video, the Q2 subject/reference pair, and each Q3 task across turbo/pro tiers).

build_body behavior

  • Remaps RouterBase's image_urls array onto Vidu's native images field; start-end (f2v) keeps [start, end] order.
  • prompt is optional for the i2v / start-end shapes (the source image carries intent); required for every other shape.
  • subjects[] forwarded verbatim for reference/subject video.
  • off_peak is never forwarded — RouterBase always charges Vidu's peak rate (matches how fal.ai / wavespeed.ai price Vidu).

Tests — six build_body unit tests: image→images remap, start-end ordering, prompt optional/required, off_peak exclusion, subjects passthrough.

Paired with the RouterBase-side seed migration, request_shape_for() rows, regenerated tensorzero.toml, and docs.

🤖 Generated with Claude Code

Nine new NovitaRequestShape variants covering the Vidu video family on
Novita's async media proxy, shared where request bodies are identical
(the two Q2 img2video tiers, the Q2 subject/reference pair, and each Q3
task across its turbo/pro tiers):

  - ViduQ1{TextToVideo,ImageToVideo,ReferenceToVideo}
  - ViduQ2{TextToVideo,ImageToVideo,SubjectToVideo}
  - ViduQ3{TextToVideo,ImageToVideo,FirstLastToVideo}

build_body:
  - remaps RouterBase's `image_urls` array onto Vidu's native `images`
    field (start-end frames keep [start, end] order);
  - makes `prompt` optional for the i2v / start-end shapes (the source
    image carries the intent) while every other shape still requires it;
  - forwards `subjects[]` verbatim for reference/subject video;
  - never forwards `off_peak` — RouterBase always charges the peak rate.

Covered by six build_body unit tests.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the Contributor License Agreement (CLA) and hereby sign the CLA.


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@duanbing
duanbing merged commit 2cbb701 into main Jul 9, 2026
6 of 7 checks passed
@duanbing
duanbing deleted the feat/vidu-request-shapes branch July 9, 2026 07:10
duanbing added a commit that referenced this pull request Aug 9, 2026
Commit 141516f ("chore: build docker images", Jan 26) sed-replaced
`github.repository == 'tensorzero/tensorzero'` with 'RouterBase/tensorzero'
across 24 workflow files while wiring up the gateway container build.

That guard is upstream's fork killswitch — the mechanism by which
tensorzero/tensorzero keeps its org-only machinery from running in anyone
else's copy. Rewriting the org name turned all of it on in a fork that has
none of the matching secrets:

  - Batch Inference Completion-time Cron, hourly: 23/23 runs failing on an
    empty OPENAI_API_KEY.
  - Live Batch Tests (daily) and Scheduled Optimization Tests (daily +
    weekly): failing, ~29 minutes of runner time each.
  - Two crons at */5 (auto-approve trusted PR workflows, cancel merge queue
    on job failure): ~576 no-op runs a day for a fork with no merge queue.
  - On our own PRs: CLAAssistant, which signs contributors against
    upstream's CLA, and the CI-bot feedback job, which wants Tailscale and
    ClickHouse credentials. Both red on #17-#22.

Restore the upstream string in all 63 guards. Every upstream job now
self-skips here, and because this is upstream's own text, future syncs
conflict less rather than more. Nothing we depend on is lost: the gateway
image comes from RouterBase's ci.yml, which builds this submodule directly;
the fork's build-gateway-container pushes to ghcr.io/RouterBase/tensorzero,
which nothing references.

Add routerbase-fork-ci.yml to fill the gap that leaves — see the header
comment there for what it does and does not check.
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.

1 participant