返回目录
其他 待识别

dsh-usage-stats

hyl64/dsh-usage-stats

该仓库暂未提供项目说明。

Stars
0
Forks
0
Issues
0
更新
2 天前

PROJECT TOPICS

项目标签

PROJECT README

README

dsh-usage-stats

A local plugin for DeepSeek Harness that aggregates token usage and estimated cost across all of your sessions, broken down by day, week, model/provider, workspace, and session.

It scans the per-session logs directly and is fully local and offline — no network calls, no telemetry, nothing sent anywhere.

Community project, not affiliated with DeepSeek. DSH is in developer preview and may change; this targets 0.1.0-rc.6 (and later rc.6-based releases).

What it gives you

A single model-facing tool, usage_stats, returns a table like:

### By day         in           cr          cw        out     total     cost
2026-08-14   in= 12,509,564 cr=856,513,536 cw=0 out= 2,246,292  tot=871,269,392  cost=$13.67
### By model
opencode-go/deepseek-v4-flash ... cost=$6.67
yes/deepseek-v4-pro             ... cost=$1.58
### By workspace  /  ### By session (top 8)

Fields: in (uncached input), cr (cache read), cw (cache write), out (output). Cost is an estimate from a configurable price table (default: DeepSeek API list prices per 1M tokens).

Install

Clone or copy this repo, then place it on your DSH profile patch. Add one row to cordis.patch.yml under the profile's - insert: list:

- id: dsh-usage-stats
  name: './dsh-usage-stats/lib/index.mjs'

Restart DeepSeek Harness (dsh web). In a new session the model can call usage_stats.

Prerequisites

  • Node.js with zstd on PATH (apt install zstd on Debian/Ubuntu).

Configuration

Price overrides (USD per 1M tokens) go in the plugin config: — keys match the model name or its provider/model form, or fall back by the model suffix:

- id: dsh-usage-stats
  name: './dsh-usage-stats/lib/index.mjs'
  config:
    costs:
      'my-gateway/deepseek-v4-flash': { input: 0.15, cacheRead: 0.005, output: 0.45 }

If a model has no entry it falls back to the model suffix, then to unknown.

License

MIT.

CLASSIFICATION EVIDENCE

分类依据

项目类型待识别
功能分类其他
规则置信度

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。