diff --git a/pipeline_core/init.py b/pipeline_core/init.py index ee2d421..62992e5 100644 --- a/pipeline_core/init.py +++ b/pipeline_core/init.py @@ -47,3 +47,10 @@ def load_pipeline_core(): debug(f'[{MODULE_NAME}] module loaded') return True + + +# 产品类别/产品导入接口 —— 供 product_management 经 +# importlib.import_module('pipeline_core.init') + getattr(mod, 'load_product_category_product') +# 访问(照 account_resource/storage_resource 的同名约定,模块级必须可见, +# 只在 env.product_interface 字典里注册不够)。 +from .product_interface import load_product_category_product # noqa: E402 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 51271c3..9739445 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 @@ -170,10 +170,14 @@ llm_model 的 price_input/price_output/cost_input/cost_output 四字段已删除 内容有变且当前行今天启用 → 原地更新(同日替换不留零宽死行);当前行是历史 日期 → 才拉链(关旧行+插新行)。重复执行禁止堆历史行。 -**记账三态(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 定夺;2026-09-06 补 NULL 语义)**: +- `llm_usage.status` 统一枚举:**SUCCEEDED**(成功)/**FAILED**(失败)/**PENDING**(等待)/**RUNNING**(运行),其他=recharge(充值对账行)。各家模型最后都归一到这套值。 +- `accounting_status` 记账三态:created(待记账)→ accounted(成功)/ failed(失败)。 +- **铁律:只有 status='SUCCEEDED' 才有记账意义**——只有 SUCCEEDED 行写 accounting_status='created';status≠SUCCEEDED 的行 accounting_status 保持 **NULL**(不是 created,不再冒充待记账)。出账循环扫 `accounting_status='created' AND status='SUCCEEDED'`。 +- 出账前置:模型有产品映射(product.resource_ref_id)+ 挂 ppid,缺一出账置 failed 并写明原因。非 token 计价因子存 llm_usage.usages。 +内部助手工具 `check_model_accounting` 检查三态并对 accounted 流水独立复算金额;NULL 行报「不计费流水」。 + +**method 独立列(2026-09-06 用户定夺)**:`llm_api_profile.method`(GET/POST,默认 POST)是独立列,**不塞 request_template JSON**。运行时读 profile.method 决定 HTTP 动词;存量行从 request_template 的 $.method 回填(m0012)。 ## 媒体转换铁律(2026-09-06 用户定夺三数组契约——对齐 sage/llmage)