dsh-model-latency-test: One-click testing of First Token Latency (TTFT) for various models in settings

Introduction

When configuring multiple model providers in DeepSeek Harness (DSH), the nominal latency in the documentation often doesn’t match what you experience on your local machine with your current network. When switching models, changing routes, or investigating “why is this particular request so slow,” relying solely on subjective perception or writing ad-hoc scripts to call the API is costly and doesn’t facilitate comparing all configured models within the same GUI.

Below is an introduction to the community plugin mdl-latency-test (repository name dsh-model-latency-test): it adds a “Model Test” page in Settings, which runs through registered models serially per provider and compares them horizontally using first-token latency (TTFT, in milliseconds). Maintained by Mo3ter, categorized under model inference; the current package version is 1.0.0, licensed under MIT.

What This Is

The DSH plugin mdl-latency-test registers same-origin HTTP routes on the host side (prefix /plugins/mdl-latency-test/api), and the client injects the settings page through settings.section. The page depends on the Settings UI, so it is visible in the DSH Web GUI and DSH Desktop; it does not appear in pure command-line environments without a client UI.

What it solves: on your already configured provider and model list, it sends a minimal streaming request using the same ctx.llm path as the Harness, measuring the elapsed time before the “first non-empty token” arrives—rather than doing load testing or generating evaluation reports for you.

Core Features

Settings Page and Interaction

  1. Open Settings → Model Test.
  2. Each provider corresponds to a collapsible card, with a “Test” button at the card header.
  3. After clicking, models under that provider are tested in order one by one, displaying xxx ms or “failed” in real-time on the interface.

Data Sources and Latency Metrics

  • Provider list: llm.listProviders().
  • Models under a provider: llm.listModels(provider).
  • Latency: time the llm.stream(...) call, taking the time difference until the first non-empty token appears, i.e., TTFT, in milliseconds.
  • If a model fails, it is marked as failed individually, and subsequent models continue to be tested.

Host API (Implementation Side)

The plugin exposes two same-origin routes on the host side (via ctx.llm and ctx.webServer):

  • GET /plugins/mdl-latency-test/api/list
  • POST /plugins/mdl-latency-test/api/test

The client settings page pulls the list and triggers tests through these interfaces.

Installation and Activation

Once included in the plugin marketplace, it can be installed in one click from the marketplace. Currently, to install from GitHub, you can use the command given in the README:

dsh plugin add github:Mo3ter/dsh-model-latency-test

If you already have the plugin directory locally (e.g., an extracted or synced dsh-model-latency-test folder), you can:

dsh plugin add file:./dsh-model-latency-test

The package requires Node.js >= 20. Before installation, it is recommended to browse the repository source code and confirm the MIT license; the plugin runs with the permissions of the current DSH process and will initiate real requests to each provider on your behalf.

Typical Usage

  1. Configure multiple LLM providers and models in DSH as usual (the same configuration as for daily conversations).
  2. Open Settings → Model Test in the Web GUI or Desktop.
  3. Click “Test” for the providers you care about and wait for serial results; record the TTFT of each model or repeat comparisons at different time intervals.

Each test sends one minimal real request to each model, consuming a small number of tokens; when there are many models under a provider, serial execution will require waiting for some time.

Use Cases and Notes

Suitable for: You have already configured multiple providers in DSH and want to quickly compare “which model is faster under this network + current time”; investigating whether a model occasionally times out or becomes noticeably slower; doing before-and-after comparisons after changing routes or proxies (cross-time-period comparisons are more meaningful than single readings).

Notes:

  • What is measured is TTFT, not throughput or end-to-end full-text latency; it cannot replace a formal benchmark suite.
  • Tests are serial and consume tokens; please test cautiously in production or quota-constrained environments.
  • The numbers vary with network and provider load; the README suggests comparing across days and time periods rather than trusting single results.
  • Environments without the Settings UI cannot use this page; please review the GitHub repository source code yourself before installation and operation.

Conclusion

mdl-latency-test brings “how fast each model’s first token is” into a single page operation within DSH Settings, using the same metrics as the Harness’s built-in LLM streaming path, facilitating comparison of configured models in the Web GUI and Desktop. Community catalog page: SkillHub - dsh-model-latency-test; source code and documentation: GitHub - Mo3ter/dsh-model-latency-test.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye