M0-11 Quota, Billing & Cost 基础版 #11
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
目标
设计知习后端额度、计费与成本模块,为全系统提供用户会员额度管理、AI 调用成本记录和服务商账单追踪能力。
本 Issue 只做架构设计,不直接实现代码。
背景说明
知习的 AI 调用(DeepSeek、硅基流动、百度 OCR)、文件存储(COS)、Embedding 生成都是有成本的。需要精确记录每次消耗、按用户/模块/服务商维度汇总成本,为定价决策和成本优化提供数据支撑。
Quota 管"用户有没有额度可用",Cost 管"每次调用花了多少钱"。两者必须联动但不能混成一个模块。
模块职责
本模块负责:
本模块不负责:
候选数据对象
基础设施依赖判断
API 设计
Internal Provider(供其他模块调用):
CAPI:
AAPI:
Domain Event 设计
Admin 视图设计
交付检查
验收标准
禁止事项
不建议当前阶段实现