Files
comfyui_o1key/tests/test_chat_panel.py
T
Jony ff1cf830fa 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.
2026-10-21 20:13:55 +08:00

35 lines
1.3 KiB
Python

import re
import unittest
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
class ChatPanelModelTests(unittest.TestCase):
def test_chat_model_list_uses_current_gpt_model_names(self):
frontend = (ROOT / "web" / "js" / "chatPanel.js").read_text(encoding="utf-8")
backend = (ROOT / "__init__.py").read_text(encoding="utf-8")
self.assertIn('const DEFAULT_MODEL = "claude-opus-5-5";', frontend)
self.assertIn("let currentModel = DEFAULT_MODEL;", frontend)
models = re.search(r"const MODELS = \[(.*?)\];", frontend, re.DOTALL)
self.assertIsNotNone(models)
model_list = models.group(1).strip()
self.assertEqual(model_list.splitlines()[0].strip(), "DEFAULT_MODEL,")
self.assertIn('"gemini-4-argon"', model_list)
self.assertIn('"gpt-6.1-sol"', model_list)
self.assertNotIn('"gpt-6-sol"', model_list)
self.assertNotIn('"gpt-5.5"', model_list)
self.assertIn('data.get("model", "claude-opus-5-5")', backend)
self.assertIn('if model in ("claude-fable-5", "claude-opus-5-5"):', backend)
self.assertRegex(
backend,
r'elif model in \([^\n]*"gpt-6\.1-sol"[^\n]*\):\n\s+body\["reasoning_effort"\] = reasoning',
)
if __name__ == "__main__":
unittest.main()