initProfile() 生成的 profile manifest 缺少 version,导致 DeepSeek 官方线路所有请求失败(REQUEST_EXTENSION) #7678
Replies: 3 comments
|
Confirmed — your chain is exactly right, and it is the newest member of a family with eight reports. Two links your write-up does not name are worth having, because they decide what a fix has to look like; and there is a stopgap you can mount today. The chain, anchored at
|
|
同样中招,补充一个桌面端 / rc.2 的数据点,并附上源码级修复。 环境
命中的是同一条链与 @yaoqian139 的分析完全一致,但触发者是桌面 profile 自己的 manifest:
源码级修复(已在本地验证)
附带一点
|
|
补一组「对照组」数据点,以及三点在本机桌面端源码里验证过的细节。 对照组:同一台机器上的两个 profile
两者喂给 另一个旁证:web 的 manifest 还带 三点验证1. 桌面端不会自愈。 2. 桌面端拿不到 cause 是结构性的,不是渲染遗漏。 3. 改成绝对路径不能绕过。 附带一个当前可用的落点: EN — a control case, plus three desktop-side details verified locally on 0.1.7-rc.2. Control: two profiles on one machine.
The only differing input at Side note: the web manifest also carries 1. The desktop app never heals an existing profile. 2. The missing 3. An absolute path does not help. One placement that works today: |
Uh oh!
There was an error while loading. Please reload this page.
环境
0.1.7-rc.1(全局 npm 安装)v22.23.2dsh web由 systemd user service 托管现象
在 profile 里使用 DeepSeek 官方线路(
deepseek-official/*)时,每一轮对话都失败:同一 profile 下切到 pi-ai 承载的路由(例如
opencode-go)则完全正常。根因
1. profile manifest 本身缺
version@deepseek-ai/dsh-app-boot的initProfile()(lib/index.js约 561–572 行)创建 profile 时写的是:没有
version字段。2. 采集器对「有 name 无 version」的 manifest 直接抛错
@deepseek-ai/dsh-plugin-package-inventory-deepseek在每次请求前重新采集dsh_plugin_packages,对每个活跃入口解析「最近的 manifest」,并要求有name的 manifest 必须同时声明非空version:其 README 也写明:"A named package manifest must also declare a non-empty
version, and malformed package metadata fails request preparation."3. 相对路径模块入口会命中这条校验
profile 里的相对路径入口(例如
- insert: [{ id: x, name: './x.mjs' }])会「向上找到最近的 manifest」,也就是这个 profile 自己的package.json—— 于是直接命中第 2 步的校验。4. 异常被包装成顶层错误
@deepseek-ai/dsh-llm-deepseek里:最小复现
任何由
initProfile()创建、且含相对路径模块入口的 profile 都会中招 —— 新用户第一次用官方线路就会遇到。影响
dsh_plugin_packages只是请求诊断用的元数据,却让整轮请求硬失败。建议修法
initProfile()写入version: "0.0.0"(一行的事)。name但缺version」按 loose module 处理(不贡献 package identity),而不是让请求准备失败 —— 一个诊断字段不该让整轮对话失败。本地绕过方式(供遇到同样问题的人参考)
给 profile 的
package.json补上版本号:{ "name": "dsh-profile-web", "version": "0.0.0", "private": true }或者在 profile 的
cordis.patch.yml里关掉该采集器:另一个观察(可选,单独讨论)
用户 patch 层(
cordis.patch.yml)对已存在入口的config是整体替换,而不是深合并。实测:基础 bundle 里
permission入口带有完整的presets表,用户层只写则
dsh --profile web --dump-config显示组合结果里presets表整张消失(必须把整份 config 重写一遍才正确)。如果这是有意设计,能否在文档里明确写出来?目前cordis.patch.yml顶部的注释只说「id-targeted config overrides」,容易让人以为会合并。All reactions