From 12a6e1a8e28c1fa6777c4546841915f850e36b9c Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sat, 5 Sep 2026 20:22:06 +0800 Subject: [PATCH] =?UTF-8?q?docs(skill):=20model-auto-config=E5=AE=9A?= =?UTF-8?q?=E4=BB=B7=E6=96=B0=E6=A8=A1=E5=BC=8F(=E4=B8=80=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B=E4=B8=80=E6=96=B9=E6=A1=88/=E6=97=A0model=E7=BB=B4?= =?UTF-8?q?=E5=BA=A6/=E6=97=A0filters=E5=B9=B3=E9=93=BA/=E5=87=BA=E5=A4=84?= =?UTF-8?q?URL=E5=BF=85=E7=95=99)+=E8=AE=B0=E8=B4=A6=E4=B8=89=E6=80=81+?= =?UTF-8?q?=E6=96=B0=E5=B7=A5=E5=85=B7apply=5Fmodel=5Fpricing/check=5Fmode?= =?UTF-8?q?l=5Faccounting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/model-auto-config/SKILL.md | 31 ++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/skills_library/pipelines/platform_general/common/model-auto-config/SKILL.md b/skills_library/pipelines/platform_general/common/model-auto-config/SKILL.md index 5f15c63..8324294 100644 --- a/skills_library/pipelines/platform_general/common/model-auto-config/SKILL.md +++ b/skills_library/pipelines/platform_general/common/model-auto-config/SKILL.md @@ -39,18 +39,35 @@ tools: [fetch_model_doc, extract_llm_api_spec, apply_llm_config, platform_llm_st `apply` 返回的 `runtime_note` 必须如实转告用户。 - **端点去重**:同供应商已有端点不重复添加(apply 内部已合并,确认时留意新增数)。 -## 定价(2026-09-04 起:模型表不存单价) +## 定价(2026-09-05 新模式:一模型一方案,无 model 维度,无 filters) llm_model 的 price_input/price_output/cost_input/cost_output 四字段已删除。 定价统一走定价平台:模型挂 `ppid`(pricing_program),售价/成本由定价引擎 按 ppid 计算(product_interface.calculate_product_cost / 异步出账循环)。 -文档里的价格信息 → 在定价平台配对应 pricing_program 并挂到模型 ppid, -**不再写进模型表**;未挂 ppid 的模型展示「未挂定价方案」,出账链路会报 -「模型未挂定价方案」并置 failed(不静默)。 -按秒/按次计费的视频、图像模型:定价 YAML 用「模板1 简单按量」形态 -(price_factors: duration 或 flat,分辨率等做 filter 维度);价格照文档原文 -记录,禁止换算推导(详见定价数据格式技能)。 +**新模式铁律(2026-09-05 用户定夺)**: +1. **一个定价方案只服务一个模型**——YAML 里禁止 model 维度;定价完全相同的 + 多个模型共享同一 ppid(不是往定价里加 model 过滤) +2. **不用 filters 子结构**——影响价格的维度(resolution 等)直接平铺在定价项: + ```yaml + pricings: + - price_factors: duration + unit_prices: 1.2 + unit: 秒 + resolution: 1080P + ``` + 维度键必须在 fields 定义(role: filter),引擎对非保留键做 AND 匹配。 +3. **出处必留**:pricing_program.description 写「定价出处:<文档URL> | 文档原文:<逐字定价句>」; + llm_model.description 尾部加 `[出处:<文档URL>]`。 +4. 价格/单位照文档原文记录禁止换算(详见定价数据格式技能);每条价格必须有 + doc_quote(文档原文定价句),缺则 apply_model_pricing 拒绝落库。 + +内部助手工具 `apply_model_pricing` 自动执行以上全部(幂等:已有 ppid 拉链更新时序)。 + +**记账三态(2026-09-05)**:llm_usage.accounting_status = created(待记账)→ +accounted(成功)/ failed(失败)。出账前置:模型有产品映射(product.resource_ref_id) ++ 挂 ppid,缺一出账置 failed 并写明原因。非 token 计价因子存 llm_usage.usages。 +内部助手工具 `check_model_accounting` 检查三态并对 accounted 流水独立复算金额。 ## 媒体转换铁律(2026-09-05 用户定夺——每个 llm_api_profile 配置必查)