dsh-client-ui-model-selection/packages/client/ui-model-selection官方

175.3kStar19.0kFork0Issue752Watching

通过 /model 弹窗和 composer 控件为普通会话提供模型和 effort 两级选择,响应 adapters-updated 和 settings-updated 事件刷新目录,子代理不可用

机审证据安装命令仓库已核验dsh-plugin Topic许可证READMEAI 百科

此插件是大仓库 deepseek-ai/deepseek-harness 的子包,星数与活跃度统计的是整个仓库。

语言
TypeScript
License
MIT
分支
master
ai-agentscordisdshdsh-plugin

安装

$ dsh plugin --profile web add npm:@deepseek-ai/dsh-client-ui-model-selection

在终端中运行以上命令,通过 dsh CLI 安装此插件。可在右上角切换 Profile。 第一次用 dsh?看这篇新手教程

对话式安装

帮我安装 DeepSeek Harness 插件 deepseek-ai/deepseek-harness/packages/client/ui-model-selection:先查看仓库 https://github.com/deepseek-ai/deepseek-harness 确认安全性,然后执行安装命令并验证插件加载成功。

把这段指令粘贴给 DSH Web GUI 里的助手,由它代你完成安装与验证。

English | 中文

Model selection plugin, browser half: TWO entries over ONE per-session directory owned by ModelDirectoryResolver (ctx.modelDirectories). For ordinary sessions, the /model popupSelect contribution (registered through ctx.commandUi) and the composer's named conversation.input.model seat both load the session's advisory directory through session.models and submit through session.selectModel via the same ModelDirectory instance. The compact composer trigger opens a two-level Model/Effort menu: models stay provider-grouped, while the selected exact model supplies its adapter-owned effort names, descriptions, and default. /model applies the selected model's default effort, and the composer can then choose any advertised effort.

The Host-reported provider/model/reasoning ModelSelection is the single selection fact, but it is echoed only when the exact provider/model pair remains in the advertised groups; an absent catalog row leaves the routable selection intact while the trigger prompts Select model, no stale row is synthesized, and no Effort row is shown until the user picks an advertised model. Directory loads and selections share a generation counter so an older response never overwrites a newer one; a connection reset drops every resident projection and repulls the Host-restored selection before display. Provider-local metadata failures list inline while usable groups stay selectable, and selection failures retain the prior selection and directory.

When the Host reports that no adapter serves the session's route (session.models.routable), this plugin raises a composer block through ctx.conversation.blocks and the input goes inert with this plugin's own copy; recovering clears it without a reload. It follows routable and nothing else: a null — before the first load, or after one failed — never blocks, or a slow Host would lock a working composer, and catalog membership never blocks either, because a route serving a model it stopped advertising is missing from the groups yet perfectly usable. The trigger's own Select model fallback still covers that case, which is display, not a gate.

Directories are per-session, resolved lazily through ctx.modelDirectories.directoryFor(sessionId), and disposed with the session scope. Addressed subagent sessions expose neither entry, and their directory rejects loads, selections, and reconnect refreshes, because ordinary Agent-bound model RPCs would activate persisted child history outside the direct-parent continuation path.

Every resident directory refetches directly on forwarded llm/adapters-updated and settings/document-updated owner events. Provider topology, provider catalogs, and the default selection therefore converge without the Host or client runtime deriving a separate model-change alias.

The /client exports are the plugin body (apply/inject), ModelDirectoryResolver, ModelDirectory with its state fields, and the seat's injected face type.

Model Experience

Indirectly, through the session.selectModel RPC available to ordinary sessions, both entries submit the complete ModelSelection that the Host snapshots at the next prompt-assembly boundary, so the following request uses the selected provider, model, and effort while a running step keeps its assembled selection; the selection becomes durable only when the existing request header records a request that consumes it, and menu interaction adds no prompt content.

KV Cache effect

Switching the route can reduce or invalidate provider-side cache reuse for subsequent requests; the prompt prefix itself is untouched.

Known Limitations and Deferred Work

  • No create-time or addressed-subagent selection — both entries require an existing ordinary session's Agent; there is no draft-phase model choice to fold into session creation, and subagent continuation deliberately exposes no independent model-selection contract.
  • Directory names are presentation-only — selection and persistence use provider/model/effort ids; a provider whose catalog or exact-model metadata lookup fails lists as an unselectable failure row until reload.
  • No arbitrary effort input — the composer offers only the exact model's adapter-advertised levels; an adapter without reasoning metadata leaves the Effort row absent.

收录徽章

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/deepseek-ai/deepseek-harness/packages/client/ui-model-selection)

把这段 markdown 粘贴到你的 GitHub README,链接回本插件详情页。徽章只声明已被本站收录,不代表安全认证。

返回插件目录
dsh-client-ui-model-selection/packages/client/ui-model-selection — DeepSeek Harness 插件 | deepseek-plugin.org