feat(product-suite): decouple ai writing gateway

This commit is contained in:
chengma
2026-07-23 10:42:55 +08:00
parent f7c9d761ee
commit 3d4976913e
10 changed files with 183 additions and 29 deletions
-4
View File
@@ -269,10 +269,6 @@ def analyze_product_images(
"""Use the dedicated cmhub vision route for product-suite AI writing."""
cfg = appconfig.load_config() if config is None else config
ai_cfg = appconfig.ai_config(cfg)
if _ai_backend(ai_cfg) != "cmhub":
raise AIError("商品套图AI帮写需要使用 cmhub 图片理解服务,请到设置配置 cmhub。")
paths = _validate_cmhub_vision_images(image_paths)
runtime = _cmhub_runtime(cfg, "vision", cmhub_config_path)
payload = {