docs(skill): model-auto-config定价新模式(一模型一方案/无model维度/无filters平铺/出处URL必留)+记账三态+新工具apply_model_pricing/check_model_accounting

This commit is contained in:
yumoqing 2026-09-05 20:22:06 +08:00
parent 2feed30b3b
commit 12a6e1a8e2

View File

@ -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 配置必查)