[Bug] Local file plugins in a profile make every official DeepSeek request fail with REQUEST_EXTENSION (profile package.json must declare non-empty name and version) #5844
Replies: 2 comments
|
中文摘要 问题:在 profile 的 原因:每次请求前,默认开启的 建议修复:① 生成 profile 容器 临时绕过:给 profile 的 |
|
Confirmed on master Your anchors check out (line numbers drift slightly in master):
Known family (5 prior threads, same root): #5172 / #5173 / #5196 / #5439 / #5683 — On your two proposed fixes:
Plugin-surface note: this gap is in the core request-extension prep (it consumes Loader entries); the file-path plugin is an innocent victim — a local plugin must never be able to break every official request. Worth archiving as an upstream-fix candidate with the two-line degrade direction. If you want a workaround today: give your |
Uh oh!
There was an error while loading. Please reload this page.
Bug report (issues are disabled on this repo, posting here per README)
Describe the bug
Adding a local file-path plugin to a profile (
cordis.patch.ymlinsert with an absolute.tspath) makes every request to the official DeepSeek provider fail before any HTTP is sent withDeepSeek request extension preparation failed/REQUEST_EXTENSION. The plugin itself loads fine; the failure happens in the default-onplugin-package-inventory-deepseekrequest extension.To reproduce
Run from source or npm:
pnpm dsh web(dsh 0.1.3-alpha.1, commitd347e70390). Profile root:~/.dsh/profiles/web/.Add a local file plugin in
~/.dsh/profiles/web/cordis.patch.yml:(
plugins/has nopackage.jsonof its own.)Start a session with the official DeepSeek model (e.g.
deepseek-v4-flash) and send any message. The UI shows本轮运行失败/DeepSeek request extension preparation failed/REQUEST_EXTENSIONimmediately — 0 LLM time, no HTTP request observed.Root cause
plugin-package-inventory-deepseek'sPackageIdentityResolver.resolve(packages/llm/plugin-package-inventory-deepseek/src/index.ts:104) resolves every active loader entry on each request. For a file-path module it callsnearestManifest()(index.ts:86), which walks up from the plugin file to the nearestpackage.json— here~/.dsh/profiles/web/package.json, the containerpackage.jsongenerated by the profile bootstrap withname/privatebut noversion.identityFromManifest()(index.ts:61) then throwsplugin-package-inventory-deepseek: <path> must declare non-empty name and version, which surfaces asREQUEST_EXTENSION. The real cause (with the offending path) is not visible in the UI or session log — only via server-side instrumentation.The same version-less generated container exists for headless profiles (
~/.dsh/profiles/{web,headless}/package.json), so any file-path plugin there hits the same path. Bundled plugins are unaffected because they are bare-package entries that resolve to real packages.Expected behavior
Local file plugins that happen to sit under a profile container
package.jsonshould not fail every request. Options: (a) generate the containerpackage.jsonwith aversion, or (b) treat a nearest manifest withoutversionas an anonymous loose module whenallowAnonymousis set (skip it) instead of throwing.Workaround
Add
"version": "0.1.0"to the profilepackage.json, or place file plugins in a subdirectory with its ownpackage.json(name + version). Both fixes verified locally.Environment: macOS, Node v24, dsh 0.1.3-alpha.1 (source HEAD
d347e70390); profile bundles: dsh-base + dsh-web-app + a third-party tgz bundle (dsh-worktable 0.2.3).All reactions