From 18b84566c3f247e7e592d75e4b7fef502a8f8849 Mon Sep 17 00:00:00 2001 From: RockChinQ Date: Sat, 12 Sep 2026 01:04:03 +0800 Subject: [PATCH] fix(models): flag models without pricing --- .../LangBotModelMetadata.tsx | 91 +++++++++++-------- web/src/i18n/locales/en-US.ts | 2 +- web/src/i18n/locales/es-ES.ts | 3 +- web/src/i18n/locales/ja-JP.ts | 2 +- web/src/i18n/locales/ru-RU.ts | 2 +- web/src/i18n/locales/th-TH.ts | 2 +- web/src/i18n/locales/vi-VN.ts | 2 +- web/src/i18n/locales/zh-Hans.ts | 2 +- web/src/i18n/locales/zh-Hant.ts | 2 +- 9 files changed, 60 insertions(+), 48 deletions(-) diff --git a/web/src/app/home/components/model-availability/LangBotModelMetadata.tsx b/web/src/app/home/components/model-availability/LangBotModelMetadata.tsx index 3cc60be6e..bd5d58c16 100644 --- a/web/src/app/home/components/model-availability/LangBotModelMetadata.tsx +++ b/web/src/app/home/components/model-availability/LangBotModelMetadata.tsx @@ -4,7 +4,7 @@ import { TooltipContent, TooltipTrigger, } from '@/components/ui/tooltip'; -import { Coins } from 'lucide-react'; +import { Coins, TriangleAlert } from 'lucide-react'; import { useTranslation } from 'react-i18next'; import ModelAvailabilityIndicator from './ModelAvailabilityIndicator'; @@ -42,46 +42,57 @@ export default function LangBotModelMetadata({ return ( - - - event.preventDefault()} - > - - {hasPricing - ? compact - ? t('models.pricing.compact', { input, output }) - : t('models.pricing.inline', { input, output }) - : compact - ? '—' - : t('models.pricing.unavailable')} - - - - {hasPricing ? ( -
-

{t('models.pricing.title')}

-

- {t('models.pricing.input', { - credits: input, - })} -

-

- {t('models.pricing.output', { - credits: output, - })} -

-
- ) : ( + {hasPricing ? ( + <> + + + event.preventDefault()} + > + + {compact + ? t('models.pricing.compact', { input, output }) + : t('models.pricing.inline', { input, output })} + + + +
+

{t('models.pricing.title')}

+

+ {t('models.pricing.input', { + credits: input, + })} +

+

+ {t('models.pricing.output', { + credits: output, + })} +

+
+
+
+ + + ) : ( + + + event.preventDefault()} + > + + + +

{t('models.pricing.unavailable')}

- )} -
-
- +
+
+ )}
); } diff --git a/web/src/i18n/locales/en-US.ts b/web/src/i18n/locales/en-US.ts index f96ea8681..cbcda3fb1 100644 --- a/web/src/i18n/locales/en-US.ts +++ b/web/src/i18n/locales/en-US.ts @@ -316,7 +316,7 @@ const enUS = { title: 'Credits per 1M tokens', input: 'Input: {{credits}} credits', output: 'Output: {{credits}} credits', - unavailable: 'No current price', + unavailable: 'No price found. The model may have been removed.', }, langbotModels: 'LangBot Models', spaceTrialTooltip: diff --git a/web/src/i18n/locales/es-ES.ts b/web/src/i18n/locales/es-ES.ts index 2b3271920..8165083b4 100644 --- a/web/src/i18n/locales/es-ES.ts +++ b/web/src/i18n/locales/es-ES.ts @@ -318,7 +318,8 @@ const esES = { title: 'Créditos por 1 M de tokens', input: 'Entrada: {{credits}} créditos', output: 'Salida: {{credits}} créditos', - unavailable: 'Sin precio actual', + unavailable: + 'No se encontró el precio. Es posible que el modelo haya sido retirado.', }, langbotModels: 'Modelos LangBot', spaceTrialTooltip: diff --git a/web/src/i18n/locales/ja-JP.ts b/web/src/i18n/locales/ja-JP.ts index e6c6de951..9154db1ac 100644 --- a/web/src/i18n/locales/ja-JP.ts +++ b/web/src/i18n/locales/ja-JP.ts @@ -321,7 +321,7 @@ const jaJP = { title: '100万トークンあたりのクレジット', input: '入力:{{credits}} クレジット', output: '出力:{{credits}} クレジット', - unavailable: '現在の価格なし', + unavailable: '価格が見つかりません。モデルが削除された可能性があります。', }, langbotModels: 'LangBot モデル', spaceTrialTooltip: diff --git a/web/src/i18n/locales/ru-RU.ts b/web/src/i18n/locales/ru-RU.ts index 480f1dfc9..e8d8af125 100644 --- a/web/src/i18n/locales/ru-RU.ts +++ b/web/src/i18n/locales/ru-RU.ts @@ -315,7 +315,7 @@ const ruRU = { title: 'Кредиты за 1 млн токенов', input: 'Ввод: {{credits}} кредитов', output: 'Вывод: {{credits}} кредитов', - unavailable: 'Нет актуальной цены', + unavailable: 'Цена не найдена. Возможно, модель была удалена.', }, langbotModels: 'Модели LangBot', spaceTrialTooltip: diff --git a/web/src/i18n/locales/th-TH.ts b/web/src/i18n/locales/th-TH.ts index 3f4912c61..cb6f6f3a6 100644 --- a/web/src/i18n/locales/th-TH.ts +++ b/web/src/i18n/locales/th-TH.ts @@ -304,7 +304,7 @@ const thTH = { title: 'เครดิตต่อ 1 ล้านโทเค็น', input: 'อินพุต: {{credits}} เครดิต', output: 'เอาต์พุต: {{credits}} เครดิต', - unavailable: 'ไม่มีราคาปัจจุบัน', + unavailable: 'ไม่พบราคา โมเดลอาจถูกนำออกแล้ว', }, langbotModels: 'โมเดล LangBot', spaceTrialTooltip: diff --git a/web/src/i18n/locales/vi-VN.ts b/web/src/i18n/locales/vi-VN.ts index 1c7b7163e..000b89583 100644 --- a/web/src/i18n/locales/vi-VN.ts +++ b/web/src/i18n/locales/vi-VN.ts @@ -312,7 +312,7 @@ const viVN = { title: 'Tín dụng trên 1 triệu token', input: 'Đầu vào: {{credits}} tín dụng', output: 'Đầu ra: {{credits}} tín dụng', - unavailable: 'Chưa có giá hiện tại', + unavailable: 'Không tìm thấy giá. Mô hình có thể đã bị gỡ.', }, langbotModels: 'Mô hình LangBot', spaceTrialTooltip: diff --git a/web/src/i18n/locales/zh-Hans.ts b/web/src/i18n/locales/zh-Hans.ts index 7d4dade7f..3e53372b0 100644 --- a/web/src/i18n/locales/zh-Hans.ts +++ b/web/src/i18n/locales/zh-Hans.ts @@ -302,7 +302,7 @@ const zhHans = { title: '每 1M tokens 消耗积分', input: '输入:{{credits}} 积分', output: '输出:{{credits}} 积分', - unavailable: '暂无价格', + unavailable: '未查询到价格,模型可能已被下架', }, langbotModels: 'LangBot 模型', spaceTrialTooltip: diff --git a/web/src/i18n/locales/zh-Hant.ts b/web/src/i18n/locales/zh-Hant.ts index b39ad4d6e..0b5148655 100644 --- a/web/src/i18n/locales/zh-Hant.ts +++ b/web/src/i18n/locales/zh-Hant.ts @@ -293,7 +293,7 @@ const zhHant = { title: '每 1M tokens 消耗積分', input: '輸入:{{credits}} 積分', output: '輸出:{{credits}} 積分', - unavailable: '暫無價格', + unavailable: '未查詢到價格,模型可能已被下架', }, langbotModels: 'LangBot 模型', spaceTrialTooltip: