feat(billing): 统一计价与候选冻结估算
新增 effective-pricing-v2、9 位十进制定点计算、显式免费校验和结构化缺价错误。估价与生产预处理覆盖全部可用候选,并按最大候选费用冻结;规则优先级为平台模型、平台、基准模型。\n\n同步计价契约和 OpenAPI,补充 Token 参数别名、视频五秒向上取整及缺价回归测试。\n\n验证:go test ./...、pnpm openapi、Web 测试与构建通过。
This commit is contained in:
@@ -6017,6 +6017,12 @@
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
},
|
||||
"503": {
|
||||
"description": "Service Unavailable",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/httpapi.ErrorEnvelope"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11227,6 +11233,14 @@
|
||||
"httpapi.PricingEstimateResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"candidateCount": {
|
||||
"type": "integer",
|
||||
"example": 2
|
||||
},
|
||||
"currency": {
|
||||
"type": "string",
|
||||
"example": "resource"
|
||||
},
|
||||
"items": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -11234,9 +11248,25 @@
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"pricingVersion": {
|
||||
"type": "string",
|
||||
"example": "effective-pricing-v2"
|
||||
},
|
||||
"requestFingerprint": {
|
||||
"type": "string",
|
||||
"example": "76ef6a537de8e71bd1ca93acadc078dbdbfa9f17e45224e4f9df59f535d2886f"
|
||||
},
|
||||
"reservationAmount": {
|
||||
"type": "number",
|
||||
"example": 2.75
|
||||
},
|
||||
"resolver": {
|
||||
"type": "string",
|
||||
"example": "effective-pricing-v1"
|
||||
"example": "effective-pricing-v2"
|
||||
},
|
||||
"totalAmount": {
|
||||
"type": "number",
|
||||
"example": 1.25
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -13966,6 +13996,12 @@
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"effectiveFrom": {
|
||||
"type": "string"
|
||||
},
|
||||
"effectiveTo": {
|
||||
"type": "string"
|
||||
},
|
||||
"formulaConfig": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
@@ -13973,6 +14009,9 @@
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"isFree": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
@@ -14033,10 +14072,19 @@
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"effectiveFrom": {
|
||||
"type": "string"
|
||||
},
|
||||
"effectiveTo": {
|
||||
"type": "string"
|
||||
},
|
||||
"formulaConfig": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
},
|
||||
"isFree": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"additionalProperties": {}
|
||||
|
||||
Reference in New Issue
Block a user