mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-10-07 15:38:22 +08:00
fix(billing): gofmt channel.go and drop the redundant response-model hint
- channel.go: 常量块里插入注释后 gofmt 会把 BillingModelSourceResponse 单独成组, 原写法沿用了上一组的对齐空格,CI 的 gofmt 检查因此失败 (internal/service/channel.go:45: File is not properly formatted)。 - 撤掉渠道表单里新加的那条提示:说明本就多余,且"只降不升"只在"相对基线收费" 这个口径下成立,容易被读成"上游返回更贵的模型也不会多收",反而误导。
This commit is contained in:
@@ -42,7 +42,7 @@ const (
|
||||
// BillingModelSourceResponse bills by a trusted model declaration observed
|
||||
// in the successful upstream response. It is deliberately distinct from
|
||||
// "upstream", which means the model sent to the provider.
|
||||
BillingModelSourceResponse = "response_model"
|
||||
BillingModelSourceResponse = "response_model"
|
||||
)
|
||||
|
||||
// Channel 渠道实体
|
||||
|
||||
@@ -144,8 +144,6 @@ export default {
|
||||
billingModelSourceRequested: 'Bill by requested model',
|
||||
billingModelSourceUpstream: 'Bill by final upstream model',
|
||||
billingModelSourceResponse: 'Bill by upstream response model',
|
||||
billingModelSourceResponseWarning:
|
||||
'Pricing follows the model declared by the upstream response. It can only lower the charge, never raise it — only enable this for upstreams you trust.',
|
||||
billingModelSourceHint: 'Controls which model name is used for pricing lookup',
|
||||
selectedCount: '{count} selected',
|
||||
searchGroups: 'Search groups...',
|
||||
|
||||
@@ -144,7 +144,6 @@ export default {
|
||||
billingModelSourceRequested: '以请求模型计费',
|
||||
billingModelSourceUpstream: '以最终模型计费',
|
||||
billingModelSourceResponse: '按上游响应模型计费',
|
||||
billingModelSourceResponseWarning: '计费基准以上游响应自报的模型为准。该模式只会降低费用、不会抬高,但请仅对可信的上游启用。',
|
||||
billingModelSourceHint: '控制使用哪个模型名称进行定价查找',
|
||||
selectedCount: '已选 {count} 个',
|
||||
searchGroups: '搜索分组...',
|
||||
|
||||
@@ -226,9 +226,6 @@
|
||||
<p class="mt-1 text-xs text-gray-400">
|
||||
{{ t('admin.channels.form.billingModelSourceHint', 'Controls which model name is used for pricing lookup') }}
|
||||
</p>
|
||||
<p v-if="form.billing_model_source === 'response_model'" class="mt-1 text-xs text-amber-500">
|
||||
{{ t('admin.channels.form.billingModelSourceResponseWarning', 'Pricing follows the model declared by the upstream response. It can only lower the charge, never raise it — only enable this for upstreams you trust.') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<!-- Platform Management -->
|
||||
|
||||
Reference in New Issue
Block a user