Preface

DSH’s philosophy is “everything is a plugin”. When using DeepSeek Harness in practice, an LLM call within a session might involve cache-hit input, cache-miss input, and output; if peak/off-peak windows are enabled, cost calculation becomes more complex. For developers who need to manage DSH session costs, the problem is not just “how many calls were made”, but “how much was spent per model”, which calls have no price, and which calls fall within the peak/off-peak windows.

Below introduces yflmq001/dsh-cost-tracker. It is used to price finalized LLM calls on a per-model basis and publish per-session cost readouts.

What is this

yflmq001/dsh-cost-tracker is a DSH plugin for DeepSeek Harness, providing token cost tracking with per-model configurable pricing and peak/off-peak rates.

The repository address is https://github.com/yflmq001/dsh-cost-tracker under the MIT license.

It solves the problem of pricing completed LLM calls based on a model price list, and exposing session-level costs to the Web UI or the /cost command; for models without configured prices, they are marked as unconfigured rather than silently guessing prices.

Core Features

  • Pricing finalized LLM calls using assistant/message usage, based on the model’s configured price list.
  • Price fields include cache-hit input, cache-miss input, output, and optional peak-window rates.
  • Publishing per-session cost projections, including total, peak, off-peak, and per-model values.
  • Supporting the display of live session cost readouts in the Web UI.
  • Marking calls that fall within configured peak windows.
  • Displaying models without price entries as unconfigured, using a placeholder.
  • Pricing cache writes based on miss rate.
  • Cross-session global billing and the /cost command are available when marked in the documentation.

Installation and Enablement

The installation command provided in the documentation is:

dsh plugin --profile web add github:yflmq001/dsh-cost-tracker

This example uses --profile web. The documentation does not explicitly state if this installation method applies to all DSH profiles, so you should verify according to the actual profile name.

It is recommended to check the repository source code and license before installation. This plugin runs with the permissions of the current dsh process; once plugin code is added to a profile, it may affect that profile’s cost calculation and session display behavior.

Typical Usage

Start with an empty price table

After installation, price configuration starts with an empty table:

models: {}

Then manually fill in prices for models that are actually reachable. The documentation explicitly states: price unit is currency units per million tokens; non-DeepSeek models require manual configuration and do not have automatic price lookup.

Configuring deepseek-v4-flash

The configuration fields provided in the documentation include inputMiss, inputHit, output, and optional peak configuration. The peak/off-peak configuration includes hours, enabled, inputMiss, inputHit, and output.

Below is a field structure example; <Manually enter> is a placeholder, and this article does not provide unverified price numbers.

- id: cost-tracker
  config:
    models:
      deepseek-v4-flash:
        inputMiss: <Manually enter>
        inputHit: <Manually enter>
        output: <Manually enter>
        peak:
          hours: <Manually enter>
          enabled: true
          inputMiss: <Manually enter>
          inputHit: <Manually enter>
          output: <Manually enter>

Configuring other models

The other model example provided in the documentation is gpt-4o:

- id: cost-tracker
  config:
    models:
      gpt-4o:
        inputMiss: <Manually enter>
        output: <Manually enter>

Overriding defaults using profile’s cordis.patch.yml

If you need to override default configurations at the profile layer, add a cost-tracker row in the profile’s cordis.patch.yml. When overriding, you must locate the row using id, not name:

- id: cost-tracker
  config:
    models:
      deepseek-v4-flash:
        inputMiss: <Manually enter>
        output: <Manually enter>

The documentation explicitly states: override rows using name as the key will be silently discarded, and the price will remain as models: {}.

Storage and Billing

  • The documentation points out that cross-session global billing and the /cost command are available when marked.
  • Profiles without a storage backend only retain bills in memory.
  • Per-session costs are projections, used for cost readouts within a session.

Use Cases and Notes

Suitable for:

  • Users who need to see session-level cost readouts in the DSH Web UI.
  • Users who need to distinguish between total, peak, off-peak, and per-model costs.
  • Teams that need to explicitly mark unconfigured models.
  • DSH users who need to manually configure prices for non-DeepSeek models.

Notes:

  • Currently in developer preview.
  • assistant/message.usage may be missing when the adapter reports no accounting.
  • The session format has no compatibility promise.
  • Prices must be manually entered, in currency units per million tokens.
  • Override rows must use id: cost-tracker, not name.
  • The plugin runs with the permissions of the current dsh process; check source code and license before installation.
  • The DSH plugin ecosystem emphasizes “everything is a plugin”; the community directory is a separate site with no official affiliation with DeepSeek / Hypersphere, and this article does not state it is an official app store.

Conclusion

The value of yflmq001/dsh-cost-tracker lies in breaking down Token costs in DSH sessions into configurable model-level prices, peak/off-peak windows, and unconfigured model markers, avoiding silent pricing for unknown models.

GitHub repository: https://github.com/yflmq001/dsh-cost-tracker

The catalog page URL is not provided in the verified materials.