Просмотр исходного кода

fix: claude cache price render

Seefs 3 месяцев назад
Родитель
Сommit
563a426c00
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      web/src/helpers/render.jsx

+ 4 - 1
web/src/helpers/render.jsx

@@ -1795,10 +1795,13 @@ export function renderClaudeModelPrice(
 
     // Calculate effective input tokens (non-cached + cached with ratio applied + cache creation with ratio applied)
     const nonCachedTokens = inputTokens;
+    const legacyCacheCreationTokens = hasSplitCacheCreation
+      ? 0
+      : cacheCreationTokens;
     const effectiveInputTokens =
       nonCachedTokens +
       cacheTokens * cacheRatio +
-      cacheCreationTokens * cacheCreationRatio +
+      legacyCacheCreationTokens * cacheCreationRatio +
       cacheCreationTokens5m * cacheCreationRatio5m +
       cacheCreationTokens1h * cacheCreationRatio1h;