feat(video): Seedance reference media and output controls, guarded per model and rail (supersedes #70) - #80
Merged
Merged
Conversation
…l account-rail jobs on Solana - One shared validate_video_request (validation.py) replaces the copies in VideoClient.generate and SolanaLLMClient._build_video_body. It mirrors the MCP's capability table. It refuses reference media on the wallet rails (both gateways 400 before quoting), clips on 2.5, reference images on models without them, audio-only references, and Seedance-only controls on the wrong model. It also refuses seedance-2.5 last frame on the Solana wallet gateway (MCP 0.53.1 parity), clip dicts with extra keys, and non-http(s) reference images. Empty reference lists are omitted consistently. - SolanaLLMClient / AsyncSolanaLLMClient media on the account rail: the first POST is the billed submit, and its 202 stub used to be returned as the result. VideoResponse then raised after the charge. The job is now polled unsigned to completion. 502/503 is not replayed (a replay could bill twice). A timeout says the account was billed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… billing, changelog Replaces the root SEEDANCE_CAPABILITIES.md, which described gateway and MCP internals and claimed parity this SDK does not have (2.5 last frame on Solana, reference media on every rail). The new doc lives in docs/ and covers only what the SDK accepts. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
added 2 commits
October 2, 2026 22:22
….5 reference clips - VideoClient and the shared jobs.py poller returned an absolute poll_url before resolve_poll_url could pin it, so a response naming another host received the API key. Every poll URL now goes through the pin; a refusal raises PollOriginRefusedError (APIError + ValueError) with id and poll_url. Solana account-rail polling uses the same helper. - Solana music/speech/sound_effect with an API key route through the media helper: no 5xx replay of the billed submit, a 202 job is polled unsigned to completion. Wallet rail unchanged. Sync and async. - seedance-2.5 accepts reference_videos/reference_audios (gateway supportsReferenceMedia, 30.2s per-clip ceiling); bitrate_mode models unchanged. Docs state the ceiling per model.
…pletion; say so in errors and docs
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.
Supersedes #70 by @KillerQueen-Z. Their commit is cherry-picked onto current main with authorship kept. #70's branch carried 253 rewritten copies of main's commits and conflicted with main.
What #70 adds (kept)
reference_videosandreference_audiosonVideoClient.generateandSolanaLLMClient.video(sync and async).bitrate_mode,output_format,camera_fixed,safety_identifier.VideoClip.last_frame_url/last_frame_backed_up.What review found, and the fixes
brk_key,_request_image_with_payment's first POST is the billed submit. Its 202{id, poll_url}stub was returned as the result, soVideoResponseraised after the charge, with no job id.poll_url.reference_*field before quoting (blockrun#728, blockrun-sol#374).BLOCKRUN_API_KEY.validate_video_request(validation.py) mirrors the MCP's table insrc/tools/video.ts. It replaces the two duplicated validator blocks.output_formatoff 2.5,bitrate_modeoff 2.x,camera_fixedoff 1.5-pro, and seedance-2.5 last frame on the Solana wallet gateway (MCP 0.53.1 parity).docs/seedance-capabilities.md.SEEDANCE_CAPABILITIES.mddescribed gateway and MCP internals and claimed parity the SDK does not have. It is replaced by an SDK-scoped doc. A CHANGELOG entry is added under Unreleased.Behaviour change to note
reference_image_urlson a wallet client now raisesValueErrorlocally. Before, the SDK forwarded it and the gateway refused it with a 400. Either way it did not work; it now fails before any request.Verification
pytest tests/unit: 1016 passed. Offline only, with an isolated HOME and mock transports.black --check .andruff check .are clean.🤖 Generated with Claude Code