DeepSeek Harness 插件

dsh-model-modes

Capability-aware reasoning controls and an honest Fast routing mode for the DeepSeek Harness web composer(英文原文)

跳到安装方式

来源信息

GitHub 仓库
DTSFO/dsh-model-modes
最近更新
2026年8月16日
分类
模型与服务商
GitHub stars
3
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/DTSFO/dsh-model-modes
插件名:dsh-model-modes
作者:DTSFO

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

dsh-model-modes

Capability-aware reasoning profiles and provider-native Fast mode for the DeepSeek Harness web composer.

What it does

  • Keeps reasoning selection in DSH's official model selector.
  • Expands reasoningProfiles.provider: '*' to every llm-pi-ai provider that actually contains the exact model id; no myself hardcoding.
  • Exposes Max and Ultra as independent choices for gpt-5.6.
  • Adds a clearly differentiated Fast ON/OFF switch to the composer.
  • Applies the current provider's native fast/priority request parameter without lowering reasoning, changing model, or changing the DSH provider.
  • Tracks the official per-session ModelDirectory; unsupported routes are visibly unavailable and rejected by the Host.

Max + Fast and Ultra + Fast are both supported combinations.

Fast semantics

Fast is orthogonal to reasoning. It never selects a cheaper reasoning effort, a flash/turbo sibling model, or another DSH provider. Injection happens at the final llm-pi-ai Models.streamSimple() boundary and is isolated per concurrent session with AsyncLocalStorage.

Built-in provider contracts

DSH providerpi-ai APIFast wire parameterDefault policy
openaiOpenAI Responses / Chat Completionsservice_tier: "fast"Exact official model allowlist
openai-codexopenai-codex-responsesservice_tier: "fast"Exact Codex allowlist: GPT-5.6 Luna/Sol/Terra, GPT-5.5, and GPT-5.4
xaiOpenAI Responses / Chat Completionsservice_tier: "priority"All text models on this exact provider
googlegoogle-generative-aiconfig.serviceTier: "priority"Exact Gemini Developer API allowlist
openrouterOpenAI-compatible text APIsservice_tier: "fast"All models on this exact provider; upstream may fall back to Standard
minimax / minimax-cnanthropic-messagesservice_tier: "priority"Exact MiniMax model allowlist
vercel-ai-gatewayanthropic-messagesproviderOptions.gateway.speed: "fast" plus allowFallbackFromFast: falseExact live Fast-model intersection; fast-or-fail, with no silent Standard fallback
fireworksanthropic-messages / openai-completionsservice_tier: "priority"Exact nine-model allowlist; request-level Priority, not a Fireworks *-fast router/model switch
azure-openai-responsesazure-openai-responsesservice_tier: "priority"Explicit opt-in only: deployment, API version, SKU, and region are not visible to the matcher
google-vertexgoogle-vertexX-Vertex-AI-LLM-Shared-Request-Type: priorityExplicit opt-in only: Priority PayGo requires a supported model and the global endpoint
amazon-bedrockbedrock-converse-streamserviceTier: { type: "priority" }Explicit opt-in only: support varies by model card, inference profile, and region

Nested objects are merged immutably, preserving fields such as Google config.thinkingConfig, Bedrock siblings, existing OpenRouter routing configuration, and Vercel Gateway options such as only, order, and models.

The default OpenAI allowlist follows the current Fast table, including the GPT-5.6 family, supported GPT-5.x/GPT-4.x models, o3, o4-mini, and gpt-5.3-codex. The separate openai-codex route uses its own exact Codex allowlist and API contract. Google defaults only to the current Gemini Developer API text-model intersection and deliberately excludes gemini-3.7-flash; Vertex documents 3.7 separately but remains explicit opt-in. MiniMax defaults to its documented M2/M3 priority models.

Vercel AI Gateway Fast mode is configured as fast-or-fail: allowFallbackFromFast: false prevents an unavailable Fast route from silently becoming Standard. Its defaults are an exact intersection of pi-ai's catalog and Vercel's live Fast metadata; already-fast *-fast model slugs are excluded because choosing one would be a model change.

Fireworks exposes request-level Priority through service_tier: "priority". Fireworks also offers distinct Fast serving paths that require selecting a different router/model, but this plugin never changes the selected model or route. Consequently, the Composer's Fast switch means Provider-native Priority on the documented nine-model Fireworks allowlist, not an implicit switch to a *-fast model.

Capability is evaluated from the live llm-pi-ai route and the selected model's actual pi-ai API id. A matching name on another adapter, a wrong API, a bridge installation failure, or a route without a precise profile is shown as N/A and cannot be enabled.

These entries mean the request contract is known. Account entitlement, regional capacity, deployment support, fallback, and billing remain provider decisions.

Fail-closed in this release

The pi-ai 0.82.1 built-in provider set has 38 ids (37 static catalog providers plus the dynamic radius gateway), all classified by this release: nine have default profiles, three deployment-dependent providers are explicit opt-in only, and the remaining 26 are rejected by configuration validation. The rejected built-in ids are ant-ling, anthropic, cerebras, cloudflare-ai-gateway, cloudflare-workers-ai, deepseek, github-copilot, groq, huggingface, kimi-coding, mistral, moonshotai, moonshotai-cn, nvidia, opencode, opencode-go, qwen-token-plan, qwen-token-plan-cn, radius, together, xiaomi, xiaomi-token-plan-ams, xiaomi-token-plan-cn, xiaomi-token-plan-sgp, zai, and zai-coding-cn.

  • anthropic: native Fast requires speed: "fast" plus a Fast beta header. pi-ai 0.82.1 assembles other Anthropic beta tokens after the plugin header seam, so this version cannot safely preserve every token.
  • mistral: its latency tier uses service_tier: "auto", not OpenAI fast or generic priority; the current serializer boundary is not proven safe for this field.
  • groq: Performance Tier uses service_tier: "performance", with enterprise and model constraints; it is not the OpenAI Fast contract.
  • cerebras: priority uses service_tier: "priority" only on eligible dedicated endpoints and is currently private preview.
  • deepseek: its official API documents service_tier as ignored.
  • Unknown or self-hosted compatible gateways: API compatibility does not prove paid Fast support; use an exact provider/API profile only after verifying the upstream contract.

These rejected built-in providers cannot be enabled by assigning them a generic OpenAI-style or custom strategy. Unknown or self-hosted providers remain unsupported by default and require an exact verified provider/model/API profile.

Configuration

Built-in contracts are enabled by default. fastProfiles is an additive/override layer; later exact provider/model/API matchers win.

- id: dsh-model-modes
  config:
    includeDefaultFastProfiles: true
    fastProfiles:
      # A verified self-hosted gateway. Provider and API must be exact;
      # use model: '*' only if every model on that route has the same contract.
      - provider: your-gateway
        model: gpt-5.6
        api: openai-responses
        strategy: openai-fast

      # Vertex is explicit because the matcher cannot inspect endpoint location.
      - provider: google-vertex
        model: gemini-3.7-flash
        api: google-vertex
        strategy: vertex-priority

Known strategies:

  • openai-fast
  • openai-codex-fast
  • service-tier-priority
  • fireworks-priority
  • google-priority
  • vertex-priority
  • bedrock-priority
  • openrouter-fast
  • vercel-gateway-fast
  • custom

Set includeDefaultFastProfiles: false to use only explicit profiles.

Use custom only for a verified gateway-specific contract:

fastProfiles:
  - provider: your-gateway
    model: your-model
    api: openai-responses
    strategy: custom
    body:
      acceleration:
        tier: turbo
    headers:
      X-Gateway-Fast: "1"

To keep Fast orthogonal, custom patches cannot modify model, provider, reasoning, reasoning_effort, thinking, thinkingConfig, effort, and related fields.

Generic reasoning profiles

The default profile is:

reasoningProfiles:
  - provider: '*'
    model: gpt-5.6
    efforts:
      minimal: minimal
      low: low
      medium: medium
      high: high
      xhigh: xhigh
      max: max
      ultra: ultra

The provider wildcard expands to every llm-pi-ai provider that actually contains the exact gpt-5.6 model id, regardless of whether it is official, local, or user-defined; myself is not special-cased. An exact provider profile wins the same route. Unknown models, providers owned by another adapter, and providers without that model are left untouched.

DSH rc.6 exposes seven native transport effort ids. The plugin leaves every existing persisted native mapping intact, adding only profile-declared native keys that are missing, and appends Ultra to the public selector. Only an explicit Ultra request gets a request-local model clone whose temporary carrier maps to the configured Ultra wire value. Max, Off, Provider Default, and every ordinary request keep the original model and settings.

For the default gpt-5.6 profile:

Official UI selectionFinal provider wire value
Maxmax
Ultraultra

There is no persistent max -> ultra mapping: Max and Ultra are two independent public efforts and two independent final wire values. Version 0.1.2 also migrates the plugin's older generated max: ultra or off: ultra settings back to native mappings, so uninstalling or disabling the plugin cannot leave ordinary requests sending Ultra.

Existing manual reasoningEfforts remain authoritative for keys they already define. Profiles add only missing declared levels, so a provider-specific wire spelling is preserved while a route can gain an independent Ultra option. An exact provider/model profile may set overrideExisting: true to replace the complete map; wildcard provider profiles cannot, preventing accidental bulk takeover. Adapter-native capabilities remain authoritative unless an explicit model profile is needed.

Install

dsh plugin --profile web add \
  https://github.com/DTSFO/dsh-model-modes/archive/refs/tags/v0.1.3.tar.gz

Then run:

dsh web

Development:

pnpm install
pnpm run check
dsh plugin --profile web add /absolute/path/to/dsh-model-modes

Limitations

  • Fast state is process-local and defaults OFF after a Host restart. The final provider payload is not written back into session history.
  • Fast state is bound to the provider/model selected when enabled. A later selection refreshes capability; an in-flight iterable keeps its creation-time state.
  • Provider service tiers may require entitlement and additional billing.
  • The virtual Ultra and request bridge target DSH rc.6 / pi-ai 0.82.1; unsafe seams fail closed rather than lowering effort or changing route.

Provider references

MIT