feat: MCP support model

This commit is contained in:
junjun
2026-08-19 10:20:40 +08:00
parent 2a86aa926c
commit d33e42004c
+4
View File
@@ -226,7 +226,11 @@ class LLMService:
if any(str(model.id) == str(args[3].custom_model) for model in _ai_model_list):
specialized_model_id = args[3].custom_model
print("use custom model: id[" + specialized_model_id + "]")
# mcp call, custom model id
if args[2] and args[2].custom_model:
if args[1]:
ws_id = args[1].oid
_ai_model_list = get_ai_model_list_by_workspace(args[0], ws_id)
if any(str(model.id) == str(args[2].custom_model) for model in _ai_model_list):
specialized_model_id = args[2].custom_model
print("use custom model: id[" + specialized_model_id + "]")