From a8c739e466be85897a4ba12e7c2fa761a927e106 Mon Sep 17 00:00:00 2001 From: fengsilin Date: Thu, 4 Jun 2026 13:56:04 +0800 Subject: [PATCH] feat(ui): add extraText descriptions and fix placeholder for advanced ratios - Add extraText for cache read ratio and cache creation ratio fields - Update placeholder format to match channel pricing convention - Add missing i18n translations for extraText and new placeholders Co-Authored-By: Claude Sonnet 4.6 --- web/src/i18n/locales/en.json | 7 ++++++- web/src/i18n/locales/zh-CN.json | 7 ++++++- .../Setting/Ratio/ModelSettingsVisualEditor.jsx | 12 +++++++----- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/web/src/i18n/locales/en.json b/web/src/i18n/locales/en.json index d11bb9f..a27dcbe 100644 --- a/web/src/i18n/locales/en.json +++ b/web/src/i18n/locales/en.json @@ -3130,5 +3130,10 @@ "音频输入倍率": "Audio Input Ratio", "音频输出倍率": "Audio Output Ratio", "默认值:1.0": "Default: 1.0", - "默认值:1.25": "Default: 1.25" + "默认值:1.25": "Default: 1.25", + "全局默认值(1.0)": "Global default (1.0)", + "全局默认值(1.25)": "Global default (1.25)", + "全局默认值": "Global default", + "缓存命中时输入价格的倍率。0.5 = 缓存命中的 token 按输入价格的一半计费,留空使用全局默认值 1.0": "Multiplier for cache-hit input price. 0.5 = cache-hit tokens billed at half the input price. Leave empty for global default 1.0", + "写入缓存的 token 按此倍率 × 输入价格计费。默认 1.25(5分钟 TTL);超过 1 小时自动按 1.6x 计费,留空使用全局默认值": "Cache-write tokens billed at this ratio × input price. Default 1.25 (5min TTL); over 1h auto-billed at 1.6x. Leave empty for global default" } diff --git a/web/src/i18n/locales/zh-CN.json b/web/src/i18n/locales/zh-CN.json index 4ca0bda..f6394f7 100644 --- a/web/src/i18n/locales/zh-CN.json +++ b/web/src/i18n/locales/zh-CN.json @@ -3107,5 +3107,10 @@ "音频输入倍率": "音频输入倍率", "音频输出倍率": "音频输出倍率", "默认值:1.0": "默认值:1.0", - "默认值:1.25": "默认值:1.25" + "默认值:1.25": "默认值:1.25", + "全局默认值(1.0)": "全局默认值(1.0)", + "全局默认值(1.25)": "全局默认值(1.25)", + "全局默认值": "全局默认值", + "缓存命中时输入价格的倍率。0.5 = 缓存命中的 token 按输入价格的一半计费,留空使用全局默认值 1.0": "缓存命中时输入价格的倍率。0.5 = 缓存命中的 token 按输入价格的一半计费,留空使用全局默认值 1.0", + "写入缓存的 token 按此倍率 × 输入价格计费。默认 1.25(5分钟 TTL);超过 1 小时自动按 1.6x 计费,留空使用全局默认值": "写入缓存的 token 按此倍率 × 输入价格计费。默认 1.25(5分钟 TTL);超过 1 小时自动按 1.6x 计费,留空使用全局默认值" } diff --git a/web/src/pages/Setting/Ratio/ModelSettingsVisualEditor.jsx b/web/src/pages/Setting/Ratio/ModelSettingsVisualEditor.jsx index eefa794..f3f6128 100644 --- a/web/src/pages/Setting/Ratio/ModelSettingsVisualEditor.jsx +++ b/web/src/pages/Setting/Ratio/ModelSettingsVisualEditor.jsx @@ -802,35 +802,37 @@ export default function ModelSettingsVisualEditor(props) { label={t('缓存读取倍率')} min={0} step={0.01} - placeholder={t('默认值:1.0')} + placeholder={t('全局默认值(1.0)')} + extraText={t('缓存命中时输入价格的倍率。0.5 = 缓存命中的 token 按输入价格的一半计费,留空使用全局默认值 1.0')} />