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", "")