Introduction

When developing agents, you often encounter this situation: the model’s default temperature or maxTokens is unsuitable, and you want to make temporary changes to compare results. However, you have to modify the configuration file and restart the service every time. If you simply want to adjust the temperature from its default value to 0.2 for a single conversation, existing approaches either modify the global configuration, affecting all sessions, or provide no entry point for adjustment.

The philosophy of DeepSeek Harness (DSH) is “everything is a plugin,” and this requirement fits perfectly for a plugin. The dsh-sampling-sliders introduced below is such a plugin: it adds a “Sampling” button to the input bar. Clicking it opens a panel where you can adjust temperature and maxTokens using sliders, applying these settings to every model call.

What is this

dsh-sampling-sliders is a DSH plugin maintained by Semidia, currently at version 0.1.0, and is released under the MIT license. Its positioning can be summarized in one sentence: it pops up temperature and maxTokens sliders in the input bar’s “Sampling” button, fine-tuning the sampling parameters for every model call via the agent/request hook.

It operates on all Providers, including the official DeepSeek and third-party integrations, because the interception occurs before Provider routing—regardless of which model the request eventually routes to, the sampling parameters will be applied.

Core Features

The plugin’s verified capabilities are as follows:

  1. The “Sampling” button in the input bar, located in the conversation.input.right slot, clicking it pops up the sampling panel.

  2. Two sliders, each with a “Override” toggle:

    • temperature: range 0–2, step 0.05;
    • maxTokens: range 512–32768, step 256.

    When “Override” is not checked, the field follows the model’s default value and is not injected.

  3. Two modes: Hot Reload / Persistence:

    • Persistence: values are written to settings, taking effect long-term and persisting after restart;
    • Hot Reload: values only take effect during the current runtime and are automatically cleared on the next startup.

How it works

The plugin is divided into two parts: Host and Client.

Host (src/index.ts) injects settings via inject: ['settings'], registers a settings namespace named sampling-sliders with the schema { mode, temperature?, maxTokens? }. It also listens to the agent/request waterfall event: it first calls await next() to obtain the LlmCallConfig that the machine would originally use, and if there are values in the namespace, it merges them into the returned replacement config. On startup, if it detects residual mode: 'hot' values, it clears them—this is how the “automatically cleared on next startup” feature of the hot reload mode is implemented.

Client (dist/client.js) is a browser bundle injected via window.__ModuleLoader__.load({ id, factory }). It reads and writes the namespace through connection.api.settings.describe/update/replace and is responsible for rendering the button and popup layer.

The reason there are only two fields for the sliders, temperature and maxTokens, is that the LlmCallConfig abstraction layer only exposes temperature / maxTokens / stop, and does not include top_p. The plugin does not make guesses beyond the abstraction layer.

Installation and Activation

This is an Out-of-tree bundle; it can be installed directly from GitHub without requiring an npm account or npm publish. This package includes dsh.client metadata and exports["./client"]; the client bundle is automatically injected when the page loads.

The complete steps are as follows:

# 1. Build
npm install && npm run build

# 2. Add to profile (local directory method)
dsh plugin --profile web add link:D:/path/to/dsh-sampling-sliders

# 3. Combination mounting (choose either of the two)
#    a. Add to dsh.profile.bundles in profile package.json
#       (This applies the insert lines from this package's cordis.patch.yml)
#    b. Manually add in the profile's cordis.patch.yml:
#       - insert:
#           - id: sampling-sliders
#             name: dsh-sampling-sliders

# 4. Restart
dsh --profile web      # or restart the web service

Step 1 compiles the TypeScript source code into the Host build and generates the Client bundle; Step 2 links the local directory into the web profile; Step 3 has two methods with the same effect; choose either one; Step 4 restarts the service, and the plugin takes effect.

Typical Usage

After enabling, the usage process is simple:

  1. Find the “Sampling” button in the input bar and click to open the sampling panel.

  2. Drag the temperature or maxTokens slider to the desired value and check the corresponding “Override” toggle. You can override just one of the two fields; unchecked fields follow the model’s default.

  3. Select a mode: choose Hot Reload for temporary debugging (automatically cleared after restart), or choose Persistence if you want to use these parameters long-term. The values will be written to settings and remain effective after restart.

From then on, every model call will apply these parameters, regardless of which Provider the request routes to.

Use Cases and Notes

Suitable scenarios:

  1. During the debugging phase, you want to temporarily lower the temperature to observe output stability and discard the change afterward;
  2. Certain tasks indeed require a larger maxTokens limit, and you want it to take effect long-term;
  3. You are using both the official DeepSeek and third-party integrations simultaneously and want a set of sampling parameters to take effect uniformly across all Providers.

A few points to note before use:

  1. The interceptor only takes effect while the plugin is running. Values are persisted via settings, but after the plugin is uninstalled, they will not be injected, and the configuration will no longer work.

  2. The sliders only have temperature and maxTokens fields; this is the boundary of the LlmCallConfig abstraction layer, not a shortcut taken by the plugin.

  3. The plugin runs with the permissions of the current DSH process. Before installing a third-party plugin, it is recommended to read the source code first (the Host source code for this repository is in src/index.ts, allowing you to verify the interception logic described above line by line) to ensure the license is compatible with your use case.

Conclusion

dsh-sampling-sliders solves a specific problem: it turns adjusting sampling parameters from “modify config, restart” to “click button, drag slider,” and uses Hot Reload / Persistence modes to distinguish between temporary experimentation and long-term configuration needs. The interception point is selected before Provider routing, making it equally effective for mixed integration scenarios.