dsh-client-ui-model-reasoning
v0.1.0
Published
Graphical reasoning-effort editor for third-party models in the DeepSeek Harness Web UI: configure a pi-ai provider model's selectable thinking levels (off/minimal/low/medium/high/xhigh/max) without editing settings.yaml by hand.
Downloads
112
Readme
dsh-client-ui-model-reasoning
Graphical reasoning-effort editor for third-party models in the DeepSeek Harness Web UI.
The Web UI's built-in model form deliberately has no reasoning-effort control (effort is a per-model capability), so third-party models added through the Models page cannot declare thinking levels without hand-editing $DSH_HOME/settings.yaml. This plugin adds a Model reasoning settings section that edits llm-pi-ai model reasoningEfforts graphically — one card per provider, one row per model, with an offer checkbox and a wire-value input for each of the seven thinking levels (off / minimal / low / medium / high / xhigh / max).
How it works
- The section is registered into the existing
settings.sectionslot (no changes to the built-in Models page or any host package). - It reads and writes the
llm-pi-aisettings namespace through the standardsettings.describe/settings.mutatewire calls. - Validation happens in the
llm-pi-aiadapter'sassertServiceableat write time: an unserviceable value is refused withsettings-rejectednaming the route and model, so the plugin needs no duplicate validator. - Declared levels surface in the composer's model picker (
Default / Off / High / Max… exactly what you declare), because the adapter'sresolveModel()reports them back through the LLM capability metadata.
Install on a user machine (no source checkout)
Requires an installed dsh (any install form). The plugin's lib/client.js ships prebuilt in the package; the browser half is discovered from the package dsh.client declaration.
# From npm
dsh plugin --profile web add dsh-client-ui-model-reasoning
# Or from a tarball
dsh plugin --profile web add ./dsh-client-ui-model-reasoning-0.1.0.tgzThen restart the web server:
dsh webOpen http://127.0.0.1:3080, go to Settings → Model reasoning, pick the levels per model, and save. The model picker now offers those levels for the configured third-party models.
To remove:
dsh plugin --profile web remove dsh-client-ui-model-reasoningBuild and publish
The package depends on @deepseek-ai/dsh-client-* packages published at 0.1.0-rc.6 — use the matching ^0.1.0-rc.6 range in peerDependencies/devDependencies so the browser loader resolves platform modules from the installed dsh's module table instead of bundling duplicates.
npm install # or pnpm install
npm run build # tsc types + tsdown → lib/index.js, lib/invariant.js, lib/client.js
npm pack # produce the publishable tarball
npm publish # publish (npm login first)For a git-hosted install, the package needs a prepare script that builds lib/ from source (a git install fetches sources, not built artifacts); a prebuilt tarball or npm publish needs none.
Requirements
- The target models must be on an
llm-pi-aiprovider (the generic OpenAI-compatible / pi-ai adapter). Models on the officialdeepseek-officialroute already expose thinking throughllm-deepseekand need no declaration. - The section is read-only when the settings provider is read-only; it always loads even when
llm-pi-aiis not mounted (it then shows the empty state and no providers).
Development notes
- Node half (
src/index.ts) is deliberately empty: this plugin contributes only a settings section. - The client bundle is built with the same closure-factory format as the in-repo
packages/client/tsdown.client.tspreset (window.__ModuleLoader__.load({id, factory}), CSS Modules inlined with lightningcss). - Platform modules (
react,@deepseek-ai/cordis,@deepseek-ai/dsh-client-web-react, slot/locale/runtime contracts, …) stay external and resolve from the host's module table at runtime.
Known limitations
- Writes replace the whole declared dict per model (declared levels are the complete offer; undeclared levels become unsupported). Existing hand-written
reasoningEffortsinsettings.yamlare shown and editable, but a save rewrites the dict from the form. - Catalog-route models are listed under
modelOverrides; a model id that collides with a hand-declaredmodelsentry on the same route appears twice (two distinct rows).
