dshbase

插件目录 / Developer / dsh-model-modes

dsh-model-modes

已验证 · 实测可装 DTSFO

✓ 持续维护 基于 12 个官方 DSH 包

查看 GitHub ↗ ← 返回插件目录

2Stars
0Forks
0未关闭 issue
JavaScript语言
2026-08-15最近推送
跨平台平台

功能简介

dsh-model-modes — DSH 插件(模型)

✅
我们的评价
可用 — 实测通过,早期项目

dsh-model-modes — DSH 插件(模型) 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

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 provider pi-ai API Fast wire parameter Default policy
openai OpenAI Responses / Chat Completions service_tier: "fast" Exact official model allowlist
openai-codex openai-codex-responses service_tier: "fast" Exact Codex allowlist: GPT-5.6 Luna/Sol/Terra, GPT-5.5, and GPT-5.4
xai OpenAI Responses / Chat Completions service_tier: "priority" All text models on this exact provider
google google-generative-ai config.serviceTier: "priority" Exact Gemini Developer API allowlist
openrouter OpenAI-compatible text APIs service_tier: "fast" All models on this exact provider; upstream may fall back to Standard
minimax / minimax-cn anthropic-messages service_tier: "priority" Exact MiniMax model allowlist
vercel-ai-gateway anthropic-messages providerOptions.gateway.speed: "fast" plus allowFallbackFromFast: false Exact live Fast-model intersection; fast-or-fail, with no silent Standard fallback
fireworks anthropic-messages / openai-completions service_tier: "priority" Exact nine-model allowlist; request-level Priority, not a Fireworks *-fast router/model switch
azure-openai-responses azure-openai-responses service_tier: "priority" Explicit opt-in only: deployment, API version, SKU, and region are not visible to the matcher
google-vertex google-vertex X-Vertex-AI-LLM-Shared-Request-Type: priority Explicit opt-in only: Priority PayGo requires a supported model and the global endpoint
amazon-bedrock bedrock-converse-stream serviceTier: { 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 selection Final provider wire value
Max max
Ultra ultra

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

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-model-modes」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:DTSFO/dsh-model-modes

Headless(CLI)profile:

dsh plugin --profile headless add github:DTSFO/dsh-model-modes

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

使用场景

扩展 agent 的编码能力面——给它一个新工具、工作流或集成,让它接手以前做不了的开发任务。

适合谁

想让 dsh 在真实代码库上像队友一样干活的开发者——能改、能跑、能验证,而不只是回答问题。

二次开发建议

工具/命令面就是缝:暴露更多 SDK 能力、加更聪明的上下文接线,或收紧改代码与验证之间的循环。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7797 个插件 →