消费金额
--
/** * Static dashboard page for token-usage-stats. The page is deliberately * dependency-free: one HTML document fetches the sibling JSON endpoint and * renders cards, a series chart, a bucket breakdown, and a per-model table. * * @module @deepseek-ai/dsh-token-usage-stats-web/dashboard */ /** * HTML document rendered at `/token-usage-stats`. * @returns the complete self-contained dashboard document. */ export function renderUsageDashboard(): string { return `
| 模型 | Provider | 请求数 | 输入(未命中) | 输入(命中缓存) | 输出 | Tokens | 成本 |
|---|
| 会话 | 最后请求 | 请求数 | 输入(未命中) | 输入(命中缓存) | 输出 | Tokens | 成本 |
|---|
数据来自当前进程内的 ctx.tokenUsageStats,页面自动每 10 秒刷新一次。成本只有在配置了模型定价时才会显示。
自定义各模型的 Token 计费单价及高峰/闲时分时规则