mirror of
https://github.com/router-for-me/Cli-Proxy-API-Management-Center.git
synced 2026-02-02 19:00: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:
@@ -521,8 +521,9 @@
|
||||
"model_price_model_label": "选择模型",
|
||||
"model_price_select_placeholder": "选择模型",
|
||||
"model_price_select_hint": "模型列表来自使用统计明细",
|
||||
"model_price_prompt": "提示价格 ($/1M tokens)",
|
||||
"model_price_completion": "补全价格 ($/1M tokens)",
|
||||
"model_price_prompt": "提示价格",
|
||||
"model_price_completion": "补全价格",
|
||||
"model_price_cache": "缓存价格",
|
||||
"model_price_save": "保存价格",
|
||||
"model_price_empty": "暂未设置任何模型价格",
|
||||
"model_price_model": "模型",
|
||||
|
||||
Reference in New Issue
Block a user