From ae7c55db4890f0f0ed2a3298ce7eba3bd3c36e20 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 17 Aug 2026 13:22:26 +0800 Subject: [PATCH] =?UTF-8?q?fix(llm):=20=E6=A8=A1=E5=9E=8B=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E4=B8=A5=E6=A0=BC=E6=9C=AC=E6=9C=BA=E6=9E=84=E9=9A=94?= =?UTF-8?q?=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/api/agent_model_options.dspy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wwwroot/api/agent_model_options.dspy b/wwwroot/api/agent_model_options.dspy index 0a855b2..535a197 100644 --- a/wwwroot/api/agent_model_options.dspy +++ b/wwwroot/api/agent_model_options.dspy @@ -1,6 +1,6 @@ # agent_model_options.dspy - 返回 active 模型列表(供 AgentIO 模型选择下拉) # llm 表是 pipeline 库的通用配置,产线无关 -# org_id 多租户隔离:非系统级机构只看到「本机构 + 系统级(org_id='0')」的模型 +# org_id 多租户隔离:非系统级机构只看到本机构的模型(不含系统级兜底) dbname = get_module_dbname('pipeline_core') org_id = (await get_userorgid()) or '' @@ -9,9 +9,9 @@ async with DBPools().sqlorContext(dbname) as sor: sql = "SELECT id, name, provider, model_id, capabilities FROM llm WHERE status='active'" params = {} if org_id and org_id != '0': - sql += " AND (org_id=${org}$ OR org_id='0')" + sql += " AND org_id=${org}$" params['org'] = org_id - sql += " ORDER BY (org_id='0') ASC, name" + sql += " ORDER BY name" recs = await sor.sqlExe(sql, params) rows = []