mirror of
https://github.com/lukaszraczylo/traefik-llmgateway.git
synced 2026-11-26 10:06:31 +00:00
feat(pricing): price cached and cache-write input tokens
Cost now prices cache-read and cache-write prompt tokens at their own rates. A model without a cache price keeps the input rate, so cost does not change. The cache shares are clamped to the prompt, so odd usage cannot give a negative cost. LiteLLM field names cache_read_input_token_cost and cache_creation_input_token_cost were confirmed in the fetched source. The pricing-sync tool reads both fields. The table regeneration is a separate commit.
This commit is contained in:
@@ -16,7 +16,7 @@ var nonSecretConfigKeys = map[string]bool{
|
||||
"openDuration": true, "passthroughPaths": true, "path": true, "pathBaseUrls": true,
|
||||
"probeInterval": true, "providers": true, "requestTimeout": true,
|
||||
"ttl": true, "type": true,
|
||||
"defaultTier": true, "toolsMinTier": true, "classifier": true, "shadowClassifier": true, "intentTiers": true, "keywords": true, "selection": true, "tier": true, "header": true, "mode": true, "firstByteTimeout": true, "provider": true, "timeout": true,
|
||||
"cachedInputPerM": true, "cacheWritePerM": true, "defaultTier": true, "toolsMinTier": true, "classifier": true, "shadowClassifier": true, "intentTiers": true, "keywords": true, "selection": true, "tier": true, "header": true, "mode": true, "firstByteTimeout": true, "provider": true, "timeout": true,
|
||||
}
|
||||
|
||||
func collectStringKeys(t reflect.Type, seen map[reflect.Type]bool, out map[string]bool) {
|
||||
|
||||
Reference in New Issue
Block a user