Repository navigation
feat: 模型广场支持客户价与官方价独立配置币种 - #980
Merged
ranxi2001 merged 4 commits intoNov 21, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
解决的问题与行为变化
模型广场原先把站内额度和官方美元参考价都标为
$。本次让站点管理员配置客户折后价、官方默认价及平台/模型例外的展示币种,每个金额和列标题明确使用 CNY/¥ 或 USD/$。默认保持通用美元口径:1 站内额度参考价值为 1 USD,客户价和官方价都显示 USD,没有任何内置“国产模型”或站点名单。管理员可以将额度参考价值设为 1 CNY、客户币种设为 CNY,并为自行指定的平台或模型设置 CNY 官方参考价,其余保持 USD。模型完整 ID 规则优先于平台规则,再使用默认币种;大小写和首尾空白归一化。
USD/CNY 固定展示参考汇率默认 7.00,管理员可调。客户价按配置的额度参考价值换算;官方价从 USD 目录换算。额度估值不读取或修改充值倍率、订阅汇率、渠道价、分组倍率及实扣。配置结果直接展示给访客,不要求访客猜币种。
关联记录与来源
production,准备基线ee260eb01c83d30bfe1e95dc62b2fb4f23e1c4af;已读取贡献指南、模板和 CI。管理员新功能提示
model-plaza-display-currency-20261121(NEW_FEATURE_NOTICES.modelPlazaCurrency)。复现与验收
deepseek→ CNY。混合分组中客户价统一 ¥,DeepSeek 官方价 ¥,其他平台官方价 $。回归:币种规则及保存、公开响应、设置接口契约、混合币种及原价保留、管理员编辑、媒体/分时/阶梯价格、通知 ID。广场用例已纳入主前端 CI。
协议、调度或传输补充
仅
/api/v1/model-plaza增加usd_to_cny_rate和currency元数据;既有价格字段含义不变。无模型请求、调度、重试、流式、凭据或幂等变化。实际验证
git diff --check833f5941114dbb840aa3dc3f028e0cb8b269a48f的 CI最终核对:
production已前进到8e7a233de514f1d1ec49509d666d834540998206(#979 官方参考价别名修复),审查其两文件增量后,git merge-tree --write-tree origin/production HEAD无冲突,整合树为32df7b9154880e36a0433e7f9e4c388b01d03136。最终 head 的 CI 已通过;无生产部署或配置写入。页面证据
真实 Vue 组件、本机 Vite、虚构分组与价格。修改前取自基线
ee260eb01;修改后为dd54ff6a6。后台截图为币种设置组件,未冒充完整设置页或保存到生产的验证。修改前(两栏均使用
$):配置示例:客户统一人民币,DeepSeek 官方参考价人民币,其他模型官方参考价美元:
管理员可编辑的额度参考价值、客户币种、官方默认币种与覆盖规则:
兼容性与运行影响
model_plaza_usd_to_cny_rate默认 7,model_plaza_currency默认 USD/1、空覆盖规则;使用已有 settings 存储,无数据库迁移。文档与用户可见变化
后台字段说明默认值、完整匹配优先级和仅展示边界;广场明确金额币种、参考汇率与额度参考价值。用法见
docs/model-plaza-currency.md。PR 合并不代表生产已部署。Agent 使用声明
提交前自查