fix(platform): 提交模板排除条件补legacy命名(-query/-download结尾)——i2v实测旧命名查询模板happyhorse-1.1-i2v-query漏网被误选为提交模板(空schema无hard违规静默误挂)
This commit is contained in:
parent
b635a3cdb4
commit
a24a2320de
@ -581,14 +581,21 @@ async def _h_apply_llm_config(sor, params, ctx):
|
||||
for cap in caps:
|
||||
# 名称过滤必须加(2026-09-05 e2e 实测 bug):查询/下载步骤模板同库同协议
|
||||
# 同能力,不加过滤会被「最新优先」误选为提交模板 → 提交打到查询 path → 404
|
||||
# 两种命名都要排(2026-09-06 i2v 实测漏网):
|
||||
# 共享命名 {protocol}-{purpose}-{path} → 含中缀 -query-
|
||||
# legacy 命名 {vmid}-{purpose} → 以 -query 结尾(无后置短横)
|
||||
# 只排中缀时 legacy 查询模板会被当成提交模板挂到模型上(schema 为空
|
||||
# 过不了体检门禁也不报错——空 schema 无 hard 违规,静默误挂)
|
||||
recs = await sor.sqlExe(
|
||||
"SELECT id, request_template, response_template, param_schema "
|
||||
"FROM llm_api_profile "
|
||||
"WHERE protocol=${p}$ AND capability=${c}$ AND status='active' "
|
||||
"AND name NOT LIKE ${l1}$ AND name NOT LIKE ${l2}$ "
|
||||
"AND name NOT LIKE ${l3}$ AND name NOT LIKE ${l4}$ "
|
||||
"ORDER BY created_at DESC LIMIT 1",
|
||||
{"p": protocol, "c": cap,
|
||||
"l1": "%-query-%", "l2": "%-download-%"})
|
||||
"l1": "%-query-%", "l2": "%-download-%",
|
||||
"l3": "%-query", "l4": "%-download"})
|
||||
await sor.sqlExe("COMMIT", {})
|
||||
if recs:
|
||||
pid_old = getattr(recs[0], "id", "")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user