Skip to content
This repository was archived by the owner on Nov 9, 2026. It is now read-only.

v0.8.9-rc.2 — 未知模型可手动归类 + 参数面板 (preview)

Pre-release
Pre-release

Choose a tag to compare

@xia-sc xia-sc released this 14 Sep 05:36
· 3 commits to main since this release

v0.8.9-rc.2 — 未知模型可手动归类 + 参数面板

Pre-release(预览版)。在 v0.8.9-rc.1 的 #3 修复之上,收录
#4:官方目录只给 id,新上线的模型
归类为 unknown,于是既选不了思考等级、也定不了多模态 —— 现在可以在设置卡里按模型手填。

新功能(#4)

  • modelCaps 新增三个可选字段:surface(chat / responses / messages)、image
    (布尔)、efforts(档位 id 列表)。能力解析收拢到一处真源 capabilitiesOf():
    用户声明 > 内置表 > 保守 unknown,未知 id 在没有声明时行为完全不变。
  • 端面决定路由,也决定档位词表:stream() 按声明的端面发请求;词表随端面走 ——
    chat 落 reasoning_effort、responses 落 reasoning.effort、messages 没有档位词汇,
    所以设置卡里的档位选项会跟着端面变化,不会给你一个该端面收不了的档位。
  • 声明 image 会同时改写图片准入判定:给一个内置表里 text-only 的 id 声明
    image: true 后,runtime 会凭同一声明把图片放行,插件侧的准入检查不会再反手报
    UNSUPPORTED_CONTENT(那正是 #3 那类「自己把自己打死」)。
  • 设置卡改成折叠面板:每行一行(勾选 + 模型名 + 标签 + 手填内容摘要 + 「参数」),
    点开后在该行下方展开带标签的网格面板(端面 / 思考档位 / 多模态 / 上下文 / 输出上限)。
    展开时会把该行带进视野(模型列表自己有滚动区)。
  • 新增 models/known 端点:把内置表对已勾选模型的静态归类(含你的覆盖)返回给设置卡,
    不要 key、不联网。这样即使不点「刷新目录」(或刷新联网失败),标签与档位词表也
    和实际请求路径一致 —— 否则卡里会把未知端面猜成 chat,给 responses 模型列出含 Max 的
    chat 档位,存下去被宿主拒掉。

收录 v0.8.9-rc.1

  • #3:user 消息里的 harness 注解块(reasoning / tool-call 等)不再让整条请求在
    组装阶段抛 UNSUPPORTED_CONTENT。子代理结算通知会把子会话最后的 assistant 内容整段
    展开进 user 消息,而该块是持久历史 —— 原来一旦污染,该会话之后每一轮都失败且不自愈。
    现在三端面统一「带得了的带、带不了的丢」,image 仍硬报错;assistant 侧同样处理,
    并修掉 messages 端面「纯 reasoning 的 assistant 轮产出空 content: []」的问题。

验证

  • node test/smoke.mjs:51 项,50 pass + 1 skip(无 key 的活探针)。本版新增:
    能力解析与校验、端面覆盖真的改路由、models/known(并断言它不碰网络)、
    modelCaps 新字段过 Config 往返,以及一个用 stub React 驱动客户端 bundle 的用例
    (逐行展开/收起、按端面给词表、efforts: []/image: false 这类「有含义的空值」不被
    当成重置、清空最后一个字段会删掉条目)。
  • npm run build:client:lib/client.js 与 src/client/* 同步(测试里也有断言守卫)。
  • 真机 GUI 核对(客户端部分):面板排布、间距、展开自动进入视野,以及刷新目录后
    responses 模型只给 responses 档位词表(不再出现 Max)。

已知 / 未覆盖

  • messages 端面:持久化的 tool-call arguments 不是合法 JSON 时仍抛
    PROVIDER_PROTOCOL_ERROR(与 #3 同类的「一条历史打死整会话」)。它有现存测试刻意断言
    (宁可响也不降级),本版未改动。
  • 「空文本块」在 responses / messages 上游是否被接受,未做真机实测(探针需要 key)。

升级

宿主侧改动需要重启 dsh web 才生效(插件的主进程代码在启动时加载);客户端 bundle
刷新页面即可。

dsh plugin --profile web add github xia-sc/dsh-opencode-go
# 然后重启 dsh web,刷新页面

用法:在设置卡里勾选模型 → 点该行「参数」→ 手填端面 / 思考档位 / 多模态;
留空即跟随默认。标签为 unknown 的模型就是服务端没给归类的那些。


v0.8.9-rc.2 — describe an unclassified model by hand, plus an options panel

Pre-release. On top of the #3 fix in v0.8.9-rc.1, this carries
#4: the operator's catalog discloses ids
only, so a newly served model classifies as unknown — no reasoning level and no modality can be
set for it. The settings card now lets you state both by hand.

New (#4)

  • Three optional modelCaps fields: surface (chat / responses / messages), image
    (boolean) and efforts (level ids). Capability resolution now has a single source of truth,
    capabilitiesOf(): user override > static table > conservative unknown, so an id you say
    nothing about behaves exactly as before.
  • The surface drives routing and the level vocabulary: stream() sends to the declared
    surface, and the picker offers that surface's vocabulary — chat sends reasoning_effort,
    responses sends reasoning.effort, messages has none — so you cannot be offered a level the
    surface would reject.
  • A declared image also rewrites the image-admission check: declare image: true on an id
    the table calls text-only and the runtime passes images through on the strength of that same
    declaration, so the plugin's own guard no longer fails the request (the #3 class of
    self-inflicted failure).
  • The settings card is now a collapsible panel: one line per model (checkbox, id, tags, a
    summary of what you set, and an "options" toggle) that opens a labelled grid underneath
    (surface / levels / modality / context / max output). Opening a row scrolls it into view, since
    the model list is its own scroll box.
  • New models/known endpoint: hands the card the static classification (plus your overrides)
    for the enabled ids — no key, no network — so tags and level presets match the request path
    even without a catalog refresh (or when that refresh fails). Without it the card guessed the
    surface as chat, offered a responses model the chat preset including Max, and the host then
    refused the saved value.

Carried over from v0.8.9-rc.1

  • #3: harness annotation blocks (reasoning / tool-call) in a user message no longer make
    request assembly throw UNSUPPORTED_CONTENT. A settled subagent expands the child's final
    assistant content into a user-role notice, and that block is durable history — so a single
    settled subagent used to fail every later turn, unrecoverably. All three surfaces now carry
    what they can and drop what they cannot; image still fails loudly. The assistant side got the
    same treatment, and the messages surface no longer emits an empty content: [] for a
    reasoning-only assistant turn.

Verified

  • node test/smoke.mjs: 51 tests, 50 pass + 1 skip (live probe needs a key). This release
    adds coverage for capability resolution and validation, the surface override actually changing
    the routed endpoint, models/known (asserting it never touches the network), the new
    modelCaps fields through a Config round-trip, and a client case that drives the built bundle
    with a stub React (opening/closing a row, per-surface presets, meaningful empties like
    efforts: [] and image: false not being treated as resets, and clearing an entry's last field
    dropping it).
  • npm run build:client: lib/client.js is in sync with src/client/* (a test asserts this).
  • Checked live in the GUI (client half): panel layout and spacing, scroll-into-view on open,
    and — after a catalog refresh — a responses model offering only the responses vocabulary.

Known / not covered here

  • Messages surface: stored tool-call arguments that are not valid JSON still throw
    PROVIDER_PROTOCOL_ERROR (the same "one history entry kills the conversation" class). An
    existing test deliberately asserts that throw, so this release leaves it alone.
  • Whether responses / messages upstreams accept an empty text block was not verified live.

Upgrade

Host-side changes need a dsh web restart (the plugin's main-process code loads at startup);
the client bundle only needs a page refresh.

dsh plugin --profile web add github xia-sc/dsh-opencode-go
# then restart dsh web and refresh the page

Usage: tick a model in the settings card, open its "options", and set surface / levels / modality
by hand; empty means follow the default. Rows tagged unknown are the ones the server did not
classify.