Composer model selector grouped by provider: pick a provider card, then drill into that provider to choose a model, with cross-provider search and Reasoning Effort kept.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-model-block-picker
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:liu19666/dsh-model-block-picker
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
English | 中文
A DeepSeek Harness (DSH) plugin — a composer model selector that groups models by provider.
It replaces the stock selector (one long flat list of every model) with a two-level structure: pick a provider block first, then drill into that block to choose a model. Search, Reasoning Effort and model-availability handling are fully preserved.
Preview
Clicking the model seat at the right of the composer no longer opens a long flat list — it opens a card grid grouped by provider:

- ① Global search — type
v3/sonnet/r1at the top to fuzzy-match across all providers; Enter selects the first hit. - ② Grouped by provider — one card per channel, showing "N models" and an "Enter →" affordance; hold a card to drag it into a new position (one gesture can cross several cards).
- ③ "Current" badge — the provider in use gets a highlighted outline and a corner badge.
- ④ Reasoning effort colour slider — a draggable Low → Max gradient slider; clicking a tick label jumps straight to that level.
- ⑤ Speed / output verbosity — shown only when the selected model supports them; the whole row is hidden otherwise.
Provider names in the screenshots are pixelated.
Dark mode uses the same theme tokens with --dsw-alias-link (#7aaaff) as the accent, so no more
white-on-white text:

The ⚙ button left of the search box opens display settings: toggle whole providers or individual models, rename a provider with the row's ✎, drag model rows to reorder them, and push the names into the model registry with sync everywhere:

The trigger itself matches the neighbouring screenshot / microphone icons (theme stroke and text):

Features
- Grouped by provider: DeepSeek Account, DeepSeek API, and third-party channels (CodeBuddy / Qoder / TRAE …) each become a card showing the channel name, model count, and a "current" badge when active.
- Two-level drill-down: click a card → a list containing only that channel's models;
← All providersorEscgoes back. - Global search: type
v3/sonnet/r1to fuzzy-match across all providers, Enter selects the first hit; clearing the box returns to the grouped view. - Reasoning Effort as a colour slider: when the selected model supports reasoning, a draggable gradient slider (Low → Max stops, glowing thumb, clickable tick labels) appears at the bottom of the popover in the style of the OpenAI Codex settings sliders, together with a "restore provider default" action.
- Adaptive speed / output-verbosity rows: providers that expose those preferences (for example
dsh-codex-subscription/openai-codex) getSpeed(standard / fast / ultrafast) andOutput verbosity(default / concise / balanced / detailed) segmented controls. Each row is shown only when the currently selected model actually supports it, so no dead switches appear. - Visibility settings panel: the round ⚙ button left of the search box opens a panel where whole providers and individual models can be toggled off; expanding a provider also exposes a ✎ rename button and lets you drag its model rows into your own order.
- Provider renaming (aliases): hit ✎ on a provider row and type any name (for example, turn
"ChatGPT subscription" into "ChatGPT sub"). The name is written into the host model registry, so the
grouped panel, the drill-down list and the stock
/modelpopover all show it — not just this plugin. It persists inaliases.jsonunder the DSH state directory and is replayed whenever the registry re-registers its adapters and shortly after startup; the panel's top bar offers 同步到全部界面 (re-apply now) and 恢复默认 (drop the alias). - Drag reordering (providers and models): hold a card and drag — it can cross several cards in one gesture, the drop position is where it lands, and the cards in between shift over (dropping onto the neighbouring card is a plain swap). Inside an expanded provider in the settings panel, model rows drag the same way and their order is stored per provider. A 6 px threshold separates a drag from a tap, and a 260 ms post-drop cooldown keeps the release from also drilling down.
- Preference persistence: order, hidden providers and hidden models live in
localStorage(dsh-model-block-picker.prefs.v1) and stale ids are pruned automatically. - Theme-aware: light and dark both use real DSH theme tokens. Accent colour is
--dsw-alias-link(#7aaaffin dark) — not--dsw-alias-brand-primary, which inverts to near-white in dark mode.
Install
From a local directory (development / personal use)
Tell the DSH Agent:
Install the plugin located at
<path to this repo>
The Agent runs plugin_manager(action: 'install_bundle', target: '<absolute path>').
Then fully quit and relaunch DSH Desktop (the client bundle has a startup baseline cache; a page refresh alone may not load the new code).
To uninstall: plugin_manager(action: 'remove_bundle', target: 'dsh-model-block-picker') — the stock
selector comes back.
How it works
1. Shadowing the stock selector
The composer model seat is a public named slot: conversation.input.model (kind: "single",
session scope).
- The stock implementation registers at priority
-10; - A dynamically installed plugin registering the same slot gets a lower number = higher priority;
- This plugin registers
priority: -20, so it wins and shadows the built-in component. Uninstalling restores it automatically.
A
singleslot requires a unique priority, so a negative priority is mandatory — otherwise it throwssingle slot already has a registration.
2. Reusing the official data service
No custom backend calls. It uses ctx.modelDirectories:
const directory = models.directoryFor(sessionId);
directory.store // snapshot: { groups: [{ id, name, models: [...] }], current: { provider, model, reasoningEffort } }
directory.load() // fetch the catalog
directory.select({ provider, model, reasoningEffort }) // commit a selection
It shares the same per-session directory as the /model command popover, so a switch made in
either entry is immediately visible in the other.
3. Dark-mode white comes from the theme, not hardcoded values
Early versions hardcoded fallback colors like #1c1f23, which do not invert in dark mode and turned
text/arrows dark grey. Everything now uses real tokens:
| Purpose | Token | Dark value |
|---|---|---|
| Primary text | --dsw-alias-label-primary |
#f9fafb (off-white, not pure white) |
| Border | --dsw-alias-border-l1 |
#ffffff0f |
| Background | --dsw-alias-bg-layer-1/2, --dsw-alias-bg-overlay |
— |
| Brand | --dsw-alias-brand-primary |
— |
In dark mode, body[data-ds-dark-theme] additionally sets the trigger to a .5px stroke with that
token — the same stroke weight as the screenshot plugin
(color: var(--dsw-alias-label-primary) + fill:none stroke=currentColor stroke-width=1).
Gotcha: do not invent CSS variable names. These do not exist in DSH:
--dsw-alias-text-regular,--dsw-alias-border-subtle,--dsw-alias-surface-overlay,--dsw-alias-primary. They silently fall back to whatever you wrote — fine in light mode, broken in dark. Query real tokens withcordis_inspect_query(platform: 'client', provider: 'Theme', method: 'listTokens').
Layout
dsh-model-block-picker/
├── package.json # manifest: dsh.bundle.patch + dsh.client declaration
├── cordis.patch.yml # Loader patch: inserts this package into the profile roster
├── index.js # host half (/diag diagnostics + /aliases rename persistence)
├── client.js # browser half: React component + styles + slot registration
├── CHANGELOG.md
├── LICENSE
└── README.md
Diagnostics
- Host log prefix:
[dsh-model-block-picker](search your DSH log for it). - Aliases:
GET /plugins/dsh-model-block-picker/aliasesreturns{ ready, store, aliases, providers }whereproviders[].baseis the registry name andnameis what is currently applied;ready:falsemeans the model service is not up yet. - The browser half reports lifecycle stages to
/plugins/dsh-model-block-picker/diag:module-evaluated→apply-called→slot-inject-triggered→registered-success. Stopping atregister-errormeans a slot/priority conflict;apply-errorusually means a service was read without declaring it ininject.
Second gotcha: the client sandbox whitelists service access. With
inject: ['slots','modelDirectories']you must not readctx.sessionsdirectly — it throwsservice "sessions" is not declaredand crashes the plugin on the spot.
Known limitations
- It replaces the composer model seat only; the
/modelcommand popover keeps its stock look (they share one directory, so selections stay in sync). - Addressed subagent sessions expose no model selection (same as stock behavior).
- Group order: defaults to DeepSeek Account → DeepSeek official → the rest by name; drag the cards in
the panel to set your own order (persisted in
localStorage). - Speed / output verbosity depend on what the provider exposes: only providers implementing those
preferences (currently
dsh-codex-subscription'sopenai-codex) are recognised; other providers simply do not show those rows. - Renaming is a global change to the model registry (the stock
/modelpopover renames too) stored instate/dsh-model-block-picker/aliases.jsonunder the DSH home — not the browser profile — and it stops being replayed once the plugin is uninstalled. - Preferences (order, hidden items) are stored in browser
localStorage, so they are per browser profile and do not sync across machines.
License
MIT
Links
More in this category
zhu1090093659/dsh-web#packages/dsh-task-board★ 10703
Task board for the dsh web GUI: a sidebar multi-column kanban whose cards run in real DSH agent sessions and can also be scheduled with cron expressions, executed host-side even with the browser closed.
zhu1090093659/dsh-web#packages/dsh-web-all★ 10703
Plugin and skin collection for the DSH Web UI: task board, Git graph, right-side panel, remote mobile UI, pet, live token stats, and a skin center.
ccch1mneyyy/dsh-TUI★ 8557
Claude Code-style full-screen terminal UI: pixel-whale header, live status line, and streaming thought expansion.
MeteorNOX/DeepSeek-Balance-Whale-Widget★ 7523
A fixed-corner whale widget for the DSH web GUI — balance, today's usage and per-turn cost with peak/off-peak pricing, editable balance-alert and daily-budget bubbles, a module-based custom bubble queue with A/B weighted choices and random lines or images, 30+ vendor templates (OpenAI, OpenRouter, Kimi, SiliconFlow, Ark, Zhipu, MiniMax and more) with per-model balance and subscription quota, plus task-end sound, imported audio, custom roles and a resource manager. Local-only, no telemetry.
omdsh-dev/DSH-better-sidebar★ 5405
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
omdsh-dev/dsh-genui★ 1091
Interactive UI components rendered inline in replies: layout, charts, forms, quizzes, mermaid, 3D scenes, and an action event loop back to the model.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.