Преглед изворни кода

Merge pull request #2250 from seefs001/fix/claude-cache-price-render

fix: claude cache price render
Calcium-Ion пре 3 месеци
родитељ
комит
554b68484c
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;