Back to home@hrhgit

dsh-model-manager

Model tags, reasoning capabilities, image routing, and vision proxy support for DeepSeek Harness

Stars
0
Language
TypeScript
Created
Aug 14, 2026
Updated
Aug 31, 2026
GitHub repo

Introduction

dsh-model-manager

中文 | English

dsh-model-manager provides the product's unified Model Center: Base URL/API-key connections and OAuth accounts are peer entries, and both lead to the same model-detail surface after setup. The Host-native Models page remains only as a direct-configuration compatibility page.

Features

  • Adds case-insensitive model tags while preserving the first entered display spelling.
  • Presents direct connections and OAuth accounts as flat entry cards in Settings → Model Center, without a provider-to-account navigation layer.
  • Uses one model-detail surface for every entry: tags and vision proxies write manager metadata, while reasoning, image input, context, and output limits appear only when the entry target supports them and write back to the original runtime owner.
  • Configures off, minimal, low, medium, high, xhigh, and max reasoning levels through the official reasoningEfforts field.
  • Edits official image-input capability through the model input field.
  • Assigns an exact, natively image-capable proxy model to a text-only model.
  • Filters the official model selector by one or more tags using OR matching.
  • Shares image-proxy results between prompt transcription and read_image calls with the same session, image, route, focus, and prompt-template version.

The host's model-discovery dialog starts every newly discovered model unchecked and provides Select all and Clear actions. Those controls belong to the compatible host build, not to this plugin's stored metadata.

Compatibility

This plugin requires a DeepSeek Harness build that provides ctx.imageInput, the public ctx.modelEntryRegistry, the keyed settings.modelCenter.entry Slot, and model-selection filters. Older hosts without those APIs are incompatible. The Host service requires imageInput, attachments, and llm, so Cordis will not activate it without the required public services.

Evolution boundary

The Model Center owns only tag and image-routing metadata. Runtime directories, Base URL/API keys, OAuth tokens, and provider protocols remain with their Host, LLM, or OAuth owners. Cross-plugin composition uses only the Host's plain-data modelEntryRegistry; setup UI travels through the keyed Slot instead of importing another loader-wrapped plugin client.

The page subscribes to settings, credential, LLM-adapter, and entry-source invalidations. If external data changes while a draft is dirty, saving pauses in an explicit “changed elsewhere” state. The user must load the latest state or explicitly reapply local edits; the page never silently overwrites.

Image routing

Native image capability always wins. For a text-only source model, the plugin uses only its explicitly configured proxy. The proxy target must exist, be different from the source, and directly declare image input; proxy chaining and fallback searches are not performed.

Uploaded images remain unchanged in the durable user message. Before the provider request, the plugin records a replayable proxy observation and removes image blocks only from the outgoing copy consumed by the text-only model. read_image accepts an optional focus string and returns the proxy observation instead of injecting the original image into that model's context.

Proxy requests use the Harness LLM and credential services. Cancellation propagates from the active turn, and proxyTimeoutMs adds an upper bound. A failed proxy request fails explicitly and is not retried with another model.

Configuration

- insert:
    - id: dsh-model-manager
      name: dsh-model-manager
      config:
        proxyTimeoutMs: 60000
        # metadataPath: D:/dsh/model-manager.json
        # dshHome: D:/dsh-home

By default, metadata is stored at <DSH_HOME>/plugins/dsh-model-manager/config.json. Writes use an atomic replacement and a monotonic revision; a stale page is rejected instead of overwriting a newer page.

Browser persistence

The tag filter, expanded rows, and non-secret model-detail draft are normal UI state stored under versioned dsh.model-manager.selector.global.tags.v1 and dsh.model-center.global.*.v1 keys. A stale restored draft enters conflict state before it can save. API keys and OAuth tokens never enter browser storage; busy, error, and conflict notices are transient.

Development

pnpm run typecheck
pnpm test
pnpm run build
pnpm run pack:check