From be5a5e92ed4d8ba1b38321730806598181db7cbb Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 27 Oct 2026 14:55:34 +0800 Subject: [PATCH] fix: enhance resource mapping and application setting handling to include default model IDs and improve setting retrieval --- apps/system_manage/services/resource_mapping.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/system_manage/services/resource_mapping.py b/apps/system_manage/services/resource_mapping.py index 4462b489fc9..847126de10d 100644 --- a/apps/system_manage/services/resource_mapping.py +++ b/apps/system_manage/services/resource_mapping.py @@ -106,6 +106,12 @@ def get_workflow_resource(workflow, node_handle): lambda instance: [instance.long_term_model_id] if instance.long_term_model_id else [], lambda instance: [instance.tts_model_id] if instance.tts_model_id else [], lambda instance: [instance.stt_model_id] if instance.stt_model_id else [], + # 智能体/工作流各节点的默认模型(default_model_setting 中的 model_id) + lambda instance: [ + item.get("model_id") + for item in (instance.default_model_setting or {}).values() + if item and isinstance(item, dict) and item.get("model_id") + ], ], } knowledge_instance_field_call_dict = {