From c868b8854e1ae6bd3a8ba99728ff87cb0484e329 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sat, 5 Sep 2026 23:28:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(platform):=20=E6=8F=90=E4=BA=A4=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E5=A4=8D=E7=94=A8=E6=9F=A5=E8=AF=A2=E6=8E=92=E9=99=A4?= =?UTF-8?q?query/download=E6=AD=A5=E9=AA=A4=E6=A8=A1=E6=9D=BF(=E8=AF=AF?= =?UTF-8?q?=E9=80=89=E8=87=B4=E6=8F=90=E4=BA=A4=E6=89=93=E5=88=B0=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2path=E2=86=92404);base=5Furl=E6=8F=90=E5=8F=96?= =?UTF-8?q?=E8=A7=84=E5=88=99=E7=A6=81=E8=A3=B8=E5=9F=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pipeline_platform/platform_ability.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pipeline_platform/platform_ability.py b/pipeline_platform/platform_ability.py index 72245a2..69d3fbd 100644 --- a/pipeline_platform/platform_ability.py +++ b/pipeline_platform/platform_ability.py @@ -323,7 +323,7 @@ _EXTRACT_PROMPT = """你是大模型 API 配置专家。通读下面这份模型 只输出一个 JSON 对象(不要 markdown 代码块),字段: { "vendor_name": "供应商名称", - "base_url": "API 基础地址(如 https://dashscope.aliyuncs.com/compatible-mode/v1)", + "base_url": "API 基础地址——必须取文档示例请求 URL 中除接口路径外的完整前缀(含 /api/v1 或 /compatible-mode/v1 等路径段,如 https://dashscope.aliyuncs.com/api/v1)。禁止只填裸域(如 https://dashscope.aliyuncs.com)——裸域拼接口路径必 404", "protocol": "openai_compat | dashscope_async | custom(能走 /chat/completions 的填 openai_compat)", "endpoints": [{"base_url": "...", "region": "domestic|international", "timeout": 60}], "chat_path": "对话接口路径(如 /chat/completions)", @@ -578,11 +578,15 @@ async def _h_apply_llm_config(sor, params, ctx): tpl_notes = [] caps = sorted(set((m.get("capability") or "t2t") for m in models)) for cap in caps: + # 名称过滤必须加(2026-09-05 e2e 实测 bug):查询/下载步骤模板同库同协议 + # 同能力,不加过滤会被「最新优先」误选为提交模板 → 提交打到查询 path → 404 recs = await sor.sqlExe( "SELECT id, request_template, response_template FROM llm_api_profile " "WHERE protocol=${p}$ AND capability=${c}$ AND status='active' " + "AND name NOT LIKE ${l1}$ AND name NOT LIKE ${l2}$ " "ORDER BY created_at DESC LIMIT 1", - {"p": protocol, "c": cap}) + {"p": protocol, "c": cap, + "l1": "%-query-%", "l2": "%-download-%"}) await sor.sqlExe("COMMIT", {}) if recs: pid_old = getattr(recs[0], "id", "")