Preface¶
In DeepSeek Harness (DSH), providers and models can be configured with reasoningEfforts, contextWindow, maxTokens, input, compat, headers, etc., but the configuration model does not have a temperature field. The pipeline itself supports passing GenerateOptions.temperature all the way to the pi-ai request body; what is missing is who writes this value into the agent request proposal. The seedConfig planted by the agent loop only carries provider, model, reasoningEffort, and maxTokens. Furthermore, the proposal handed to listeners in agent/request is deep-frozen, so it cannot be modified in place; a new object must be returned.
The following introduces the community plugin dsh-per-model-temperature (repository deepmean/dshModeltemperature): a settings page plus an agent/request listener that precisely matches by provider + model to inject or clean up temperature before the request is sent.
What is this¶
- Maintainer: deepmean
- Package Name:
dsh-per-model-temperature(package.jsonversion 1.1.0,private: true, not distributed on npm) - Positioning: Allows separate temperature configuration for each model routed via
llm-pi-aiin DSH, writing or removingtemperaturebefore every agent request - License: MIT
The DSH ecosystem emphasizes “everything is a plugin”; the SkillHub directory page is a community collection site with no official affiliation with DeepSeek / High-Flyer.
Core Behavior¶
The plugin uses exact matching based on provider + model and re-evaluates for every request:
| Scenario | Result |
|---|---|
| Match found, and temperature is configured | Inject the temperature |
| Match found, but temperature is left blank | Remove temperature, use upstream default |
| No match | Remove temperature, use upstream default |
The third row is intended to prevent the temperature left by a previous step from carrying over to a new model when switching models mid-session; it also ensures old values do not persist after the configuration is cleared.
This plugin only manages temperature. The README explains that top_p / top_k do not exist in the GenerateOptions, LlmCallConfig, and adapter chains, and since the proposal is deep-frozen before dispatch, the plugin cannot extend these fields. For reasoning levels and input modalities, use the provider’s native llm-pi-ai configuration entry.
Installation and Activation¶
This package is not on npm. It is distributed by cloning the repository and installing via a local file: path. The plugin runs with the permissions of the current DSH process; please review the source code and MIT license before installing.
New Environment (First-time Installation):
git clone https://github.com/deepmean/dshModeltemperature.git
dsh plugin --profile web add "file:/absolute/path/dshModeltemperature"
Replace /absolute/path/dshModeltemperature with the directory where you cloned the repository locally.
You can also do it manually in two steps:
- Add the dependency to the profile’s
package.json:
{ "dependencies": { "dsh-per-model-temperature": "file:/absolute/path/dshModeltemperature" } }
- Add the package name to the
dsh.profile.bundlesarray (the order is the loading order).
The plugin comes with cordis.patch.yml, which inserts its own configuration lines upon loading.
Compatibility (README): Declares >=0.2.0 for @deepseek-ai/dsh (optional peer); tested and passed on 0.2.1-alpha.4.
After updating dsh¶
It is recommended to run the following after every DSH update:
node scripts/check-compat.mjs
The script checks 23 upstream interface items; proceed only if all are green. This plugin relies on the legacy ctx.settings.register(); starting from dsh 0.2.1-alpha.5, upstream may no longer include this API, and some environments may need to restore it via the SETTINGS_LEGACY_API patch (#42) from dsh-purge. Updates may wipe patches or fail to restart the process, manifesting as no data in the settings page, listeners not hooking up, and potentially no obvious errors. See the repository README for fix steps: re-apply the patch, restart dsh, run node scripts/relink.mjs if using directory junctions, and then run check-compat.mjs.
If installed via file:, pnpm copies the source into storage; if you want source code changes to take effect immediately, you need to use a directory junction in node_modules pointing to the source directory, and the source directory must have its own node_modules (npm install --omit=dev). dsh update may replace the junction with a copy; you can restore it using node scripts/relink.mjs.
Typical Usage¶
- Find the per-model-temperature section in the DSH settings page.
- Each row has three controls:
- Provider: Options come from the activellm-pi-airouting table (the server also writes runtime-registered routes into the plugin settings document, supplemented by remote directories and static segments as fallbacks).
- Model: Filtered by provider; clears when the provider changes.
- Temperature: Presets0 / 0.2 / 0.3 / 0.5 / 0.7 / 0.9 / 1 / 1.2 / 1.5 / 2, or select “Custom…” to write after blur (losing focus). Leaving it blank means not sending the value, deferring to the upstream default. - After changing the temperature in the settings page, it takes effect on the next agent request without requiring a restart.
Note: Do not manually edit settings-legacy.yaml to change temperatures; the legacy document is only read into memory at startup. Manual edits may not be read and could be overwritten upon saving. Changes to the server-side index.js usually require copying to the profile copy and restarting, or relying on HMR during profile recombination, depending on your deployment method.
Use Cases and Caveats¶
Suitable for: Multiple llm-pi-ai routes and multiple models within the same DSH deployment, where you want to fix the creativity level per model (e.g., lower for code models, slightly higher for conversational models) without modifying the harness itself.
Notes:
- The installation command must use a
file:path. Do not fabricate commands likedsh plugin add github:owner/repo(unless upstream explicitly supports it in the future). - Environments relying on the legacy settings API must run
check-compat.mjsafter major DSH version upgrades. - The repository provides
npm test(chaining compat, client, and multiple probe scripts) for self-testing in environments without a browser.
Links¶
- Directory Page: https://www.skillhub.cn/plugins/deepmean/dshModeltemperature
- Source Code & Full Documentation: https://github.com/deepmean/dshModeltemperature