Repository navigation
fix(video): seedance-2.5 takes reference clips; per-model reference ceiling - #166
Merged
Merged
Conversation
…eiling The gateway enabled reference video/audio on seedance-2.5 on 2026-09-26 (enterprise#297): supportsReferenceMedia is true and the clip ceiling was probed at 30.2s, twice the 2.0 family's 15.2s. blockrun_video still refused reference_videos / reference_audios on 2.5 and reserved every clip at a flat 15.2s, which would have under-reserved a 2.5 clip by half on the account rail, where the reserve is the only pre-payment budget control. - REFERENCE_CEILING_SECONDS mirrors the gateway map (2.0 / 2.0-fast / 2.0-mini 15.2s, 2.5 30.2s); the reference-clip model set is derived from it. - estimateVideoCost prices clips at the model's own ceiling and throws for a token-priced model with no ceiling (1.5-pro) instead of borrowing one. - Tool description, field descriptions, README and seedance-capabilities doc name 2.5 for clips and give each family its ceiling. - Wallet-rail rule unchanged: both wallet gateways still 400 every reference field, 2.5 included. - Schema token table updated for the description change (14,046 full).
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.
Why
The gateway now serves reference video/audio on
bytedance/seedance-2.5, and the clip ceiling is per model.blockrun_videostill refused clips on 2.5 and reserved every clip at a flat 15.2s.Gateway evidence
BlockRunAI/enterpriseorigin/main@87ffed0e, filesrc/vendor/gateway/lib/models.ts. The change landed ine072ab36(#297 / #311, 2026-09-25):supportsReferenceMedia: true("On since 2026-09-26 (enterprise#297): ceiling 30.2s probed, rate measured at the same 21,600 tok/s as 2.0"). Description: "up to 30 reference images, and reference video/audio clips up to 30s each (billed per reference second)".REFERENCE_CEILING_SECONDS:seedance-2.0,-2.0-fastand-2.0-miniare 15.2.seedance-2.5is 30.2. 1.5-pro has no entry (upstream: "supports at most 0 reference_videos").app/api/v1/videos/generations/route.ts: reference_videos / reference_audios are.max(3)each, and every clip is quoted at its model's ceiling. A model with no ceiling refuses clips.blockrun(src/app/api/v1/videos/generations/route.ts:180) andblockrun-sol(route.ts:157) both still callcheckReferenceMediaIsEnterpriseOnly, which returns a 400 for everyreference_*field. So reference media stays account-rail only, 2.5 included.Changes
src/tools/video.tsREFERENCE_CEILING_SECONDS, which mirrors the gateway map. The set of models that take reference clips is derived from it, so 2.5 is now in that set.referenceCeilingSeconds().estimateVideoCostprices each clip at its model's ceiling. For a token-priced model with no ceiling (1.5-pro) it throws instead of borrowing another model's ceiling.docs/seedance-capabilities.md: the matrix row for 2.5 now allows clips. Adds a ceiling table and 2.5 reserve examples ($1.58 / $11.07 / $38.59).README.md: the tools table now gives the per-model ceiling.README.mdanddocs/mcp-schema-overhead.md: the schema token rows are re-measured (full 14,046, media 6,827). The card stays 14.0K / 61%.CHANGELOG.md: adds an Unreleased entry. There is no version bump.Tests
test/video-reference-media.test.ts:image_urlare still refused.test/video-models.test.ts: renamed the 2.0 ceiling test.Results:
npm run build,npm run typecheck,npm test(1372/1372) andsync-brand-numbers --checkall pass. The repo has no lint script.🤖 Generated with Claude Code