fix(knowledge_service): 修正知识创建时模型类型过滤条件

移除IMAGE类型过滤,仅保留CHAT类型,确保只筛选出支持视觉能力的聊天模型
This commit is contained in:
wxy
2026-04-17 11:38:45 +08:00
parent a5613314b8
commit 696b2d2417

View File

@@ -104,7 +104,7 @@ def create_knowledge(
if not knowledge.image2text_id:
image2text_models = db.query(ModelConfig).filter(
ModelConfig.tenant_id == tenant_id,
ModelConfig.type.in_([ModelType.CHAT.value, ModelType.IMAGE.value]),
ModelConfig.type.in_([ModelType.CHAT.value]),
ModelConfig.capability.contains(["vision"]),
ModelConfig.is_active == True,
ModelConfig.is_composite == False