diff --git a/web/src/components/table/usage-logs/UsageLogsColumnDefs.jsx b/web/src/components/table/usage-logs/UsageLogsColumnDefs.jsx index 61104d2252b..7ae04e2172c 100644 --- a/web/src/components/table/usage-logs/UsageLogsColumnDefs.jsx +++ b/web/src/components/table/usage-logs/UsageLogsColumnDefs.jsx @@ -418,6 +418,7 @@ function getUsageLogDetailSummary(record, text, billingDisplayMode, t) { segments: other?.claude ? renderModelPriceSimple( other.model_ratio, + other?.completion_ratio, other.model_price, other.group_ratio, other?.user_group_ratio, @@ -438,6 +439,7 @@ function getUsageLogDetailSummary(record, text, billingDisplayMode, t) { ) : renderModelPriceSimple( other.model_ratio, + other?.completion_ratio, other.model_price, other.group_ratio, other?.user_group_ratio, diff --git a/web/src/helpers/render.jsx b/web/src/helpers/render.jsx index 28da657f472..5b3bbef5d8f 100644 --- a/web/src/helpers/render.jsx +++ b/web/src/helpers/render.jsx @@ -1298,6 +1298,7 @@ function renderBillingArticle(lines, { showReferenceNote = true } = {}) { // Shared core for simple price rendering (used by OpenAI-like and Claude-like variants) function renderPriceSimpleCore({ modelRatio, + completionRatio, modelPrice = -1, groupRatio, user_group_ratio, @@ -1359,6 +1360,17 @@ function renderPriceSimpleCore({ }), }); + if (completionRatio) { + segments.push({ + tone: 'secondary', + text: i18next.t('补全 {{price}} / 1M tokens', { + price: formatCompactDisplayPrice( + modelRatio * 2.0 * Number(completionRatio), + ), + }), + }); + } + if (shouldShowCache) { segments.push({ tone: 'secondary', @@ -2210,6 +2222,7 @@ export function renderLogContent( export function renderModelPriceSimple( modelRatio, + completionRatio, modelPrice = -1, groupRatio, user_group_ratio, @@ -2230,6 +2243,7 @@ export function renderModelPriceSimple( ) { return renderPriceSimpleCore({ modelRatio, + completionRatio, modelPrice, groupRatio, user_group_ratio,