mirror of
https://github.com/calesthio/OpenMontage.git
synced 2026-08-26 01:52:30 +08:00
refactor: remove TENCENT_TOKENHUB_MODEL env var, relocate Hunyuan entry in .env.example
The env var added complexity without meaningful benefit — explicit model selection via the "model" input parameter is sufficient for both image and video TokenHub tools. - tools/video/hunyuan_cloud_video.py: drop env var fallback from _resolve_model(), remove mention from install_instructions - tests/contracts/test_hunyuan_cloud_video.py: remove test_resolve_model_from_env and test_resolve_model_input_overrides_env - .env.example: move TENCENT_TOKENHUB_API_KEY to a dedicated "Tencent Hunyuan TokenHub API" section, drop TENCENT_TOKENHUB_MODEL comment, broaden description from "video generation" to generic "Tencent Hunyuan via TokenHub API"
This commit is contained in:
@@ -280,20 +280,6 @@ class TestToolSpecific:
|
||||
})
|
||||
assert model == "yt-video-2.0"
|
||||
|
||||
def test_resolve_model_from_env(self, monkeypatch):
|
||||
monkeypatch.setenv("TENCENT_TOKENHUB_MODEL", "hy-video-1.5")
|
||||
model = HunyuanCloudVideo._resolve_model({
|
||||
"prompt": "test", "operation": "image_to_video",
|
||||
})
|
||||
assert model == "hy-video-1.5"
|
||||
|
||||
def test_resolve_model_input_overrides_env(self, monkeypatch):
|
||||
monkeypatch.setenv("TENCENT_TOKENHUB_MODEL", "hy-video-1.5")
|
||||
model = HunyuanCloudVideo._resolve_model({
|
||||
"prompt": "test", "model": "yt-video-2.0",
|
||||
})
|
||||
assert model == "yt-video-2.0"
|
||||
|
||||
# -- _build_payload --
|
||||
|
||||
def test_build_payload_t2v_minimal(self):
|
||||
|
||||
Reference in New Issue
Block a user