mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-05-06 05:59:35 +00:00
Merge pull request #2250 from seefs001/fix/claude-cache-price-render
fix: claude cache price render
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user