Publish Seedance 2.5 draft mode and video updates

- Add the 样片模式 flow: 480p draft generation, a linkable draft task ID, and pre-flight verification before the 1080p final request.

- Allow reference images and audio in video edit/extend requests, matching the provider's 2.5 contract.

- Move 主模型 and 样片模式 ahead of 生成模式, default 主模型 to seedance 2.5, and migrate saved widget values.

- Refresh the video panel, asset API response logs, and LLM node handling; cover the new behavior with offline tests.
This commit is contained in:
Jony
2026-10-21 20:13:55 +08:00
parent 532d4a9541
commit ff1cf830fa
27 changed files with 1810 additions and 341 deletions
+45
View File
@@ -5,6 +5,7 @@ import sys
import types
import unittest
from pathlib import Path
from unittest.mock import patch
PACKAGE_DIR = Path(__file__).resolve().parents[1]
@@ -146,6 +147,50 @@ class SeedanceHCAssetClientTests(unittest.IsolatedAsyncioTestCase):
_, query_kwargs = session.get_call
self.assertEqual(query_kwargs["params"], {"type": "doubao"})
async def test_create_logs_full_response_but_folds_signed_urls(self):
session = _FakeSession(post_payload={
"success": True,
"data": {
"Id": "asset-test",
"Status": "Active",
"SourceUrl": "https://upload.example.com/a.png?signature=secret",
},
})
with patch("builtins.print") as print_mock:
await self.client.create_hc_asset(
name="参考图片1",
asset_url="https://upload.o1key.com/uploads/reference.png",
asset_type="image",
session=session,
)
printed = "\n".join(
str(call.args[0]) for call in print_mock.call_args_list if call.args
)
self.assertIn("创建响应体 HTTP 200", printed)
self.assertIn('"Id": "asset-test"', printed)
self.assertIn('"Status": "Active"', printed)
self.assertNotIn("signature=secret", printed)
async def test_query_logs_response_only_when_status_changes(self):
session = _FakeSession(get_payload={
"success": True,
"data": {"Id": "asset-q", "Status": "Processing"},
})
with patch("builtins.print") as print_mock:
await self.client.get_hc_asset("asset-q", session=session)
await self.client.get_hc_asset("asset-q", session=session)
printed = [
str(call.args[0])
for call in print_mock.call_args_list
if call.args
]
self.assertEqual(sum("查询响应体" in line for line in printed), 1)
self.assertIn('"Status": "Processing"', "\n".join(printed))
if __name__ == "__main__":
unittest.main()