dsh-gateway-billing: Display self-hosted gateway conversation costs below the DSH input bar.

dsh-gateway-billing is a DSH client plugin maintained by YaoleWu (MIT, v0.1.2) that aggregates the costs of each model call per conversation below the Web chat input bar. It fetches New API / One API compatible pricing tables from your configured gateway (refreshing every 10 minutes), iterates through the model invocation nodes in the current conversation, calculates the total cost based on input/output/cache tokens, and supports two billing modes: quota_type=0 and quota_type=1. It displays different prompts when the pricing URL is not configured or fetching fails, and highlights unpriced models separately. The README provides two installation methods: cloning the repository under the profile, modifying `cordis.patch.yml` and `package.json`, and running `pnpm install`; or using the `dsh plugin add` command (marked as available after publishing to npm). The only configuration option is `pricingUrl`. Before use, note that the plugin runs with the privileges of the dsh process, so you should first review the source code and license.

Read More