DeepSeek Harness Source
Default location
Section titled “Default location”$DSH_HOME/sessions/*/session-*/session.v3.jsonl.zstd~/.dsh/sessions/*/session-*/session.v3.jsonl.zstd
The adapter reads any committed log name the harness writes: session.jsonl or session.vN.jsonl, plain or with .zstd.
$DSH_HOME is the harness home; when it is unset or blank the adapter falls back to ~/.dsh. Each session-* directory holds one session log.
Override
Section titled “Override”llm-usage daily --source dsh --dsh-dir /path/to/.dsh/sessionsdsh is directory-backed, so generic source directory overrides also work:
llm-usage daily --source-dir dsh=/path/to/.dsh/sessionsParsing notes
Section titled “Parsing notes”DeepSeek Harness appends one independently zstd-compressed frame per flush, so the adapter decodes the log frame by frame instead of once for the whole file: a single whole-file decode would stop at the first frame and hide most of a session. A torn final frame from an interrupted append is reported as undecodable_jsonl_frame and never discards the frames before it.
- Each
assistant/messagerecord that carries ausageblock becomes one event. inputTokensis already the uncached prompt size, so it maps directly to input tokens;cacheReadTokensandcacheWriteTokensare preserved as separate buckets.reasoningTokensis a subset ofoutputTokensand is carried for cache and reasoning reporting without being billed twice.sessionIdcomes from the session header,repoRootfrom itscwd, and provider/model from the message source, falling back to the route recorded bysession/title-llm-requestwhen a message omits them.- Tool calls, step boundaries, and other lifecycle records carry no usage and are skipped silently.
Only the session log is read. The harness projection cache under ~/.dsh/storages holds session totals rather than per-request usage, so it is never used as an event source.
Pricing
Section titled “Pricing”The harness reports its default route as deepseek-flash. As checked on October 4, 2026, LiteLLM’s upstream catalog includes this key with DeepSeek’s peak rates. A refreshed pricing cache can therefore price it directly. The bundled snapshot also contains deepseek-flash, at the same peak rates ($0.30 input, $1.20 output, $0.006 cache read per million tokens), so offline runs price it without an override.
DeepSeek’s current pricing page lists these V4.1-Flash rates per million tokens:
| Window | Input (cache hit) | Input (cache miss) | Output |
|---|---|---|---|
| Off-peak | $0.003 | $0.15 | $0.60 |
| Peak | $0.006 | $0.30 | $1.20 |
Peak hours are 01:00–04:00 and 06:00–10:00 UTC on weekdays, excluding Chinese public holidays. Other hours use off-peak rates. Check the linked rate card before copying these values; prices can change.
Override a pricing tier
Section titled “Override a pricing tier”Use an override for offline pricing, a chosen tier, or historical rates. This example uses the peak tier:
{ "models": { "deepseek-flash": { "inputPer1MUsd": 0.3, "outputPer1MUsd": 1.2, "cacheReadPer1MUsd": 0.006 } }}Halve those rates to estimate an entirely off-peak workload. Neither constant tier reconstructs a mixed workload exactly.
llm-usage monthly --source dsh --pricing-overrides ./pricing-overrides.jsonOverrides match the event’s model name. Use the same override for every command whose costs you want to compare, or save it once:
[pricing]overridesPath = "/absolute/path/to/pricing-overrides.json"DeepSeek’s pricing page also says the legacy deepseek-v4-flash and deepseek-v4-flash-vision-exp names now route to V4.1-Flash and use its prices. The bundled snapshot prices deepseek-v4-flash and deepseek-v4-flash-vision-exp at the same peak rates as deepseek-flash. Add an override under the exact name present in your events if you want off-peak rates or rates for a different period. See Pricing for the full override shape.