Commit 266e272e by Calcium-Ion Committed by GitHub

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

fix: claude cache price render
parents 52936929 5acab8fb
...@@ -1795,10 +1795,13 @@ export function renderClaudeModelPrice( ...@@ -1795,10 +1795,13 @@ export function renderClaudeModelPrice(
// Calculate effective input tokens (non-cached + cached with ratio applied + cache creation with ratio applied) // Calculate effective input tokens (non-cached + cached with ratio applied + cache creation with ratio applied)
const nonCachedTokens = inputTokens; const nonCachedTokens = inputTokens;
const legacyCacheCreationTokens = hasSplitCacheCreation
? 0
: cacheCreationTokens;
const effectiveInputTokens = const effectiveInputTokens =
nonCachedTokens + nonCachedTokens +
cacheTokens * cacheRatio + cacheTokens * cacheRatio +
cacheCreationTokens * cacheCreationRatio + legacyCacheCreationTokens * cacheCreationRatio +
cacheCreationTokens5m * cacheCreationRatio5m + cacheCreationTokens5m * cacheCreationRatio5m +
cacheCreationTokens1h * cacheCreationRatio1h; cacheCreationTokens1h * cacheCreationRatio1h;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment