- 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.
44 lines
1.5 KiB
Python
44 lines
1.5 KiB
Python
import sys
|
|
import types
|
|
import unittest
|
|
from pathlib import Path
|
|
|
|
|
|
PACKAGE_DIR = Path(__file__).resolve().parents[1]
|
|
sys.path.insert(0, str(PACKAGE_DIR.parent))
|
|
|
|
# Import the node module without running the root registry, whose unrelated
|
|
# ComfyUI imports initialize CUDA during package import.
|
|
package = types.ModuleType("comfyui_o1key")
|
|
package.__path__ = [str(PACKAGE_DIR)]
|
|
sys.modules.setdefault("comfyui_o1key", package)
|
|
nodes_package = types.ModuleType("comfyui_o1key.nodes")
|
|
nodes_package.__path__ = [str(PACKAGE_DIR / "nodes")]
|
|
sys.modules.setdefault("comfyui_o1key.nodes", nodes_package)
|
|
|
|
from comfyui_o1key.nodes.universal_llm import ( # noqa: E402
|
|
DEFAULT_MODEL,
|
|
SUPPORTED_MODELS,
|
|
UniversalLLMChat,
|
|
)
|
|
|
|
|
|
class UniversalLLMModelTests(unittest.TestCase):
|
|
def test_new_models_are_supported_and_claude_opus_5_5_is_default(self):
|
|
schema = UniversalLLMChat.GET_SCHEMA()
|
|
schema.validate()
|
|
model_input = next(item for item in schema.inputs if item.id == "模型")
|
|
|
|
self.assertEqual(DEFAULT_MODEL, "claude-opus-5-5")
|
|
self.assertEqual(SUPPORTED_MODELS[0], DEFAULT_MODEL)
|
|
self.assertIn("gemini-4-argon", SUPPORTED_MODELS)
|
|
self.assertIn("gpt-6-sol", SUPPORTED_MODELS)
|
|
self.assertIn("claude-opus-5", SUPPORTED_MODELS)
|
|
self.assertIn("gpt-6-astra", SUPPORTED_MODELS)
|
|
self.assertEqual(model_input.options, SUPPORTED_MODELS)
|
|
self.assertEqual(model_input.default, DEFAULT_MODEL)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|