fix(platform): query_profile_ids更新加IF空保护——规格没带async_steps时空串覆盖会清空模型已挂查询模板→异步测试报未登记(2026-09-06 r2v实测)

This commit is contained in:
yumoqing 2026-09-06 13:34:43 +08:00
parent 9cc92dc84a
commit b635a3cdb4

View File

@ -673,10 +673,13 @@ async def _h_apply_llm_config(sor, params, ctx):
% (vmid, cur_vendor, vendor_name))
# profile_id 必须一并刷新2026-09-05 实测 bug模型原挂模板可能已被
# 弃用重建(旧骨架自愈),不刷新则运行时仍指 deprecated 模板→必崩
# query_profile_ids 同理要 IF 保护2026-09-06 实测 bug本次规格没带
# async_steps 时空串覆盖会把模型已挂好的查询模板清空 → 异步测试报
# 「未登记查询步骤模板」。空值=没提取到,不是「要清除」。
new_pid = profile_ids.get(cap, "")
await sor.sqlExe(
"UPDATE llm_model SET description=${d}$, "
"sync_mode=${sm}$, query_profile_ids=${q}$, "
"sync_mode=${sm}$, query_profile_ids=IF(${q}$='', query_profile_ids, ${q}$), "
"profile_id=IF(${p}$='', profile_id, ${p}$), updated_at=NOW() "
"WHERE id=${i}$",
{"d": desc, "sm": sync_mode, "q": query_ids_json,