feat: improve request pricing, model diagnostics, and client discovery

- Align response model handling with CPA-Manager-Plus and flag routing mismatches
- Add per-request costs and CSV export; fix mixed-context cost aggregation
- Display API-reported access types and move providers next to timestamps
- Use white table backgrounds and simplify cost and status displays
- Expand client discovery paths, validate executables, and prioritize installed clients
- Add model, pricing, client discovery, and UI regression tests
This commit is contained in:
lzt404 committed 2026-10-04 17:31:52 +08:00
1 parent 0e7437493d
commit dfba9b019f
20 files changed
+652 -152

No files matched your search

+11 -3
View File
@@ -731,8 +731,16 @@ export const jaOverrides = {
'usage.column.time': '日時',
'usage.column.model': 'モデル',
'usage.model.request': 'リクエストモデル',
'usage.model.upstream': '上流モデル',
'usage.model.response': '上流レスポンス',
'usage.model.upstream': 'ルーティングモデル',
'usage.model.response': '応答モデル',
'usage.column.cost': '今回の費用',
'usage.cost.estimate': '推定 · USD',
'usage.cost.unpriced': '価格未設定',
'usage.cost.hint': '現在の価格設定による USD 推定額。料金モデル:{model}。入力、出力、キャッシュ読み書き、サービス階層と長文ルールを含みます。実際の請求額ではありません。',
'usage.model.mismatch': 'モデル不一致',
'usage.model.responseHint': '使用量 API の response_model(上流が申告したモデル名であり、モデルの実体を検証したものではありません)。',
'usage.provider.hint': '使用量 API の provider と auth_type に基づく接続先と認証方式です。モデル名から提供元を推測しません。',
'usage.provider.unknownAccess': '接続方式の記録なし',
'usage.column.effort': '推論レベル',
'usage.column.request': 'リクエスト',
'usage.column.tokens': 'Token',
@@ -1089,7 +1097,7 @@ export const jaOverrides = {
'agents.clients.page': '{page} / {total} ページ',
'agents.clients.listed': 'クライアント {count} 件',
'agents.clients.manage': 'クライアントを管理',
'agents.clients.description': '一覧に残すクライアントを選択して保存します。順序は固定で、収まらない場合はページに分けて表示します。クライアントをクリックすると設定が開きます。',
'agents.clients.description': '一覧に残すクライアントを選択して保存します。インストール済みを先に表示し、各グループ内の順序は固定です。収まらない場合はページに分けて表示します。クリックすると設定が開きます。',
'agents.clients.search': 'クライアントを検索',
'agents.clients.selected': '{count} 件のクライアントを選択中',
'agents.clients.automatic': '自動表示に戻す',
+11 -3
View File
@@ -719,8 +719,16 @@ export const en: Record<MessageKey, string> = {
'usage.column.time': 'Time',
'usage.column.model': 'Model',
'usage.model.request': 'Requested model',
'usage.model.upstream': 'Upstream model',
'usage.model.response': 'Upstream response',
'usage.model.upstream': 'Routed model',
'usage.model.response': 'Response model',
'usage.column.cost': 'Request cost',
'usage.cost.estimate': 'Estimated · USD',
'usage.cost.unpriced': 'Unpriced',
'usage.cost.hint': 'Estimated USD using current pricing. Pricing model: {model}; includes input, output, cache reads and writes, service tier and long-context rules. Not an invoice.',
'usage.model.mismatch': 'Model mismatch',
'usage.model.responseHint': 'From usage API response_model: the model name declared upstream, not a verified model identity.',
'usage.provider.hint': 'From usage API provider and auth_type: the route and authentication method, not a vendor inferred from the model name.',
'usage.provider.unknownAccess': 'Access type unrecorded',
'usage.column.effort': 'Reasoning Effort',
'usage.column.request': 'Request',
'usage.column.tokens': 'Token',
@@ -1089,7 +1097,7 @@ export const en: Record<MessageKey, string> = {
'agents.clients.page': 'Page {page} / {total}',
'agents.clients.listed': '{count} clients',
'agents.clients.manage': 'Manage Clients',
'agents.clients.description': 'Choose the clients to keep in the list, then save. Clients stay in a fixed order across pages. Click a client to open its settings.',
'agents.clients.description': 'Choose the clients to keep in the list, then save. Installed clients come first, with a fixed order within each group across pages. Click a client to open its settings.',
'agents.clients.search': 'Search clients',
'agents.clients.selected': '{count} clients selected',
'agents.clients.automatic': 'Restore automatic display',
+11 -3
View File
@@ -718,8 +718,16 @@ export const zhCN = {
'usage.column.time': '时间',
'usage.column.model': '模型',
'usage.model.request': '请求模型',
'usage.model.upstream': '上游模型',
'usage.model.response': '上游响应',
'usage.model.upstream': '路由模型',
'usage.model.response': '响应模型',
'usage.column.cost': '本次费用',
'usage.cost.estimate': '估算 · USD',
'usage.cost.unpriced': '未定价',
'usage.cost.hint': '按当前价格统计配置估算(USD)。计价模型:{model};包含输入、输出、缓存读取及写入,应用服务层级与长上下文规则,非实际账单。',
'usage.model.mismatch': '模型不一致',
'usage.model.responseHint': '来自用量 API 的 response_model(上游声明的模型名,不代表已验证模型身份)。',
'usage.provider.hint': '来自用量 API 的 provider 与 auth_type,表示接入通道和认证方式,不按模型名推断厂商。',
'usage.provider.unknownAccess': '未记录接入方式',
'usage.column.effort': '推理强度',
'usage.column.request': '请求',
'usage.column.tokens': 'Token',
@@ -1088,7 +1096,7 @@ export const zhCN = {
'agents.clients.page': '第 {page} / {total} 页',
'agents.clients.listed': '{count} 个客户端',
'agents.clients.manage': '管理客户端',
'agents.clients.description': '勾选要保留在列表中的客户端,保存后生效。列表顺序固定,放不下时分页显示;点击客户端切换配置。',
'agents.clients.description': '勾选要保留在列表中的客户端,保存后生效。已安装的客户端优先,同组内顺序固定,放不下时分页显示;点击客户端切换配置。',
'agents.clients.search': '搜索客户端',
'agents.clients.selected': '已选择 {count} 个客户端',
'agents.clients.automatic': '恢复自动显示',