New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

dsh-model-filter

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dsh-model-filter

DSH (DeepSeek Harness) web client plugin: adds a type-to-filter search box to the composer model dropdown so you can find any model in a huge provider catalog in seconds.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

dsh-model-filter

A client plugin for DeepSeek Harness (DSH) that adds a type-to-filter search box to the composer's inline model dropdown — the one that used to show hundreds of models with no way to search them.

┌  Select model            ┐
│  ┌────────────────────┐  │
│  │ Type to filter…    │  │   ← new: type "v4pro", "flash", "0813"…
│  └────────────────────┘  │
│  openrouter              │
│  ┌────────────────────┐  │
│  │ DeepSeek V4 Pro 0813│ │   ← only matching rows stay visible
│  │ DeepSeek V4 Flash   │ │
│  └────────────────────┘  │
└──────────────────────────┘

Why you need it

  • OpenRouter-style catalogs put hundreds of models into a single provider group in the inline "Select model" menu — with no search box.
  • The /model command popup already ships its own search input; the inline seat does not. This plugin adds search exactly there.

Features

  • 🔎 Filter as you type — start typing in the box, the model list narrows instantly.
  • 🧩 Fuzzy-ish matching — whitespace/punctuation insensitive, so v4pro finds "DeepSeek V4 Pro 0813", flash finds every Flash model, 0813 finds every August-13 release.
  • 🎯 Only touches the model menu — it matches menus by their ARIA structure (role=menu → role=group → role=menuitemradio), so slash-command menus, effort pickers, settings lists and other menus are never affected.
  • 🕵️ Self-healing — the menu is re-created on every open and its list re-renders on selection; the plugin re-injects the search box automatically.
  • ⏎ Enter to pick — pressing Enter selects the first visible match.
  • 🌗 Theme-aware — styled with the DSH design-token CSS variables, so it matches light/dark/custom themes.
  • Zero configuration — install, restart, hard-refresh, done.

Requirements

  • DSH web profile (any recent release; tested on 0.1.0-rc.6).
  • The browser tab must be hard-refreshed after restarting dsh with the plugin installed — the app bundle is cached, and a plain refresh may keep the old UI.

Installation

There are three equivalent ways to install. Pick one.

# installs the package into the web profile's dependencies
dsh plugin --profile web add dsh-model-filter

# then add the loader row to the profile patch file:
#   ~/.dsh/profiles/web/cordis.patch.yml

Append to ~/.dsh/profiles/web/cordis.patch.yml:

- insert:
    - id: model-filter
      name: 'dsh-model-filter'

2. From a local tarball (private distribution)

dsh plugin --profile web add file:/path/to/dsh-model-filter-0.1.0.tgz

…then the same cordis.patch.yml insert row as above.

3. From the GitHub Release (no npm account needed)

dsh plugin --profile web add https://github.com/xielk/dsh-model-filter/releases/download/v0.1.0/dsh-model-filter-0.1.0.tgz

…then the same cordis.patch.yml insert row as above. (Browse all releases at https://github.com/xielk/dsh-model-filter/releases.)

4. Manual

  • Add to ~/.dsh/profiles/web/package.json:

    "dependencies": {
      "dsh-model-filter": "^0.1.0"
    }
    
  • pnpm install in ~/.dsh/profiles/web.

  • Append the cordis.patch.yml insert row (same as method 1).

Activate

dsh web      # restart the GUI server (web profile)

Then hard-refresh the browser tab (Cmd+Shift+R / Ctrl+Shift+R), or close and reopen the tab. The search box appears when you open the composer's "Select model" dropdown and click Model.

Usage

  • Click the model trigger under the input ("Select model, current …").
  • Click the Model row.
  • Type in the "Type to filter models…" box at the top of the list.
  • Click a row to select it (or press Enter to pick the first match). Escape closes the menu as usual.

The /model command popup already has its own search box at the top of the card — this plugin is what gives the inline dropdown the same ability.

How it works

dsh-model-filter is a standard DSH client plugin (dual-face package):

FileRole
package.jsonDeclares dsh.client.platform: "web" and the ./client bundle export.
index.jsHost-side carrier. DSH only scans active loader fibers for client plugins, so this no-op host plugin is what makes the browser half get mounted and served.
client.jsBrowser bundle in DSH's window.__ModuleLoader__.load({ id, factory }) format. Its apply(ctx) runs once the web UI boots: it watches the DOM with a MutationObserver and, whenever a model-list menu appears, injects the filter input and wires up row/group filtering.
test.htmlStandalone test harness (no server needed) — 9 assertions covering injection, filtering, clearing, Enter-to-pick and non-interference.

No build step is required for this package — client.js is authored directly in the loader bundle format, and the DSH host serves it dynamically over /plugins/dsh-model-filter/client.js.

Compatibility & known limitations

  • Targets the composer model seat only (@deepseek-ai/dsh-client-ui-model-selection's ModelSelect). The /model popup and other menus are intentionally untouched.
  • The search box is a DOM enhancement, not a React component — React doesn't track it, which is exactly why the plugin re-injects it when the menu re-renders. Occasional re-render churn may briefly re-add the box; selection is unaffected.
  • Matching is against the models' visible names (and title), not hidden model ids — id-style searches such as v4pro-0813 work because punctuation/whitespace are ignored (v4pro0813 → matches V4 Pro 0813).

Development

# edit client.js (browser half) / index.js (host carrier)
# quick behavior test: open test.html in any browser, read the #report output
python3 -m http.server 8791   # serve the dir, then open http://127.0.0.1:8791/test.html

To test against a real DSH instance, install the package into the web profile, restart dsh web, and hard-refresh.

Publishing

npm pack                # build dsh-model-filter-0.1.0.tgz and inspect its contents
npm publish             # publish to the npm registry (run `npm login` first)

Publishing checklist: set version, add an author and a repository field if you want attribution, then npm pack → npm publish.

Uninstall

  • Remove the - insert: id: model-filter … block from ~/.dsh/profiles/web/cordis.patch.yml.
  • dsh plugin --profile web remove dsh-model-filter (or drop it from package.json and run pnpm install).
  • Restart dsh web and hard-refresh the tab.

License

MIT

Keywords

dsh

FAQs

Package last updated on 17 Aug 2026

Related posts