Chuyển đến nội dung chính

dsh-session-cost-statusline

Đã xác minh

@yfzhou/dsh-session-cost-statusline · v0.1.8 · MIT · Giao diện web

Shows the current session's estimated monetary cost in CNY as the leading item in the DeepSeek Harness status line.

Cài đặt

dsh plugin add @yfzhou/dsh-session-cost-statusline

Xác nhận layer đã áp bằng dsh --profile default --dump-config — xem hướng dẫn cài plugin.

Mã nguồn

Thẻ

Tác giả

Readme

@yfzhou/dsh-session-cost-statusline

Adds an estimated session cost in CNY before the standard DSH composer statistics. A durable host projection folds every logged request step and prices each usage record using the model from its own request header, so totals replay for existing sessions and stay correct across model switches. Usage from an unrecognized model is omitted rather than priced with an unrelated fallback, making the figure a lower-bound estimate, not billing authority.

Install

dsh plugin --profile web add @yfzhou/dsh-session-cost-statusline

The package supplies its own DSH bundle row; do not add a separate cordis.patch.yml entry.

Pricing

Selected DeepSeek V4 and GPT-5.6 models are recognized, including deepseek-v4-flash-vision-exp; DeepSeek ids carrying a build tag (e.g. deepseek-v4-flash-ga-260731) are normalized to their family. DeepSeek V4 is always counted at the published off-peak/normal rate. Per million tokens (uncached input / cache-hit input / output):

Model Rate
Flash ¥1.50 / ¥0.05 / ¥4.50
Pro ¥4.50 / ¥0.15 / ¥13.50

Rates change; check the embedded table before relying on the number.

Tested with DSH 0.1.0-rc.6. Requires the sessionProjections host service, the slots client service, and the conversation.composer.dock slot.

License

MIT