Ver código fonte

fix: claude cache price render

Seefs 3 meses atrás
pai
commit
563a426c00
1 arquivos alterados com 4 adições e 1 exclusões
  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;