mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-19 11:10:49 +08:00
feat: add cache token pricing support in usage calculation
- Add cache price field to ModelPrice interface - Support both cached_tokens and cache_tokens fields for compatibility - Separate prompt, cache, and completion pricing in cost calculation - Deduct cached tokens from input tokens before prompt pricing - Refactor getApiStats/getModelStats to reuse calculateCost function - Update i18n labels for model pricing
This commit is contained in:
@@ -511,8 +511,9 @@
|
||||
"model_price_model_label": "Model",
|
||||
"model_price_select_placeholder": "Choose a model",
|
||||
"model_price_select_hint": "Models come from usage details",
|
||||
"model_price_prompt": "Prompt price ($/1M tokens)",
|
||||
"model_price_completion": "Completion price ($/1M tokens)",
|
||||
"model_price_prompt": "Prompt price",
|
||||
"model_price_completion": "Completion price",
|
||||
"model_price_cache": "Cache price",
|
||||
"model_price_save": "Save Price",
|
||||
"model_price_empty": "No model prices set",
|
||||
"model_price_model": "Model",
|
||||
|
||||
Reference in New Issue
Block a user