Bug: dsh_plugin_packages — one unresolvable active package fails every deepseek-official request (REQUEST_EXTENSION) #6497
Replies: 3 comments
|
Confirmed against master (dsh-v0.1.5-rc.2-139-gc291e7961a; the three cited files are byte-identical to rc.1). Mechanism is real: a bare package name that can't resolve throws in PackageIdentityResolver.resolve (plugin-package-inventory-deepseek/src/index.ts:117, existsSync at :79); collectActivePluginPackages (deepseek-llm-api-extensions/src/index.ts:170-176) has no per-package try/catch and runs on every request, so one broken package fails the whole prepare; the adapter wraps it as REQUEST_EXTENSION before any fetch (llm-deepseek/src/adapter.ts:627-637 vs fetch at :651, pinned by adapter.spec.ts:211-232). This is the documented contract (docs/subsystems/llm-streaming.md:742), not a regression; the existing escape hatch is plugin-package-inventory-deepseek enabled:false (config-catalog.md:1689-1692). Two refinements: only bare-name entries throw - relative/absolute path mounts resolve via nearestManifest and are skipped silently when missing (index.ts:119-123); and a proper fix would be warn-and-omit, e.g. a catch+warn per package in collectActivePluginPackages (pattern at packages/llm/llm/src/index.ts:375), updating adapter.spec.ts:211 and llm-streaming.md:742 together. |
|
Confirmed — this is a real mechanism, and it is the documented contract rather than a regression. One broken active package does fail every Root cause (verified)The failure chain is:
So yes: the inventory runs on every request ( Impact scope (verified)
Diagnosis steps (for the reporter and future triagers)
Suggested fix directions
Unverified parts
|
|
Thanks @PerryLink — the confirmation is thorough, and the warn-and-omit direction plus the Real-world trigger, confirmed in production (2026-09-13): the "gutted directory" scenario is not hypothetical. On this deployment a third-party plugin updater did Adopted your narrow fix as a local patch: per-package try/catch → If upstream takes the fix, the test/doc touch points you listed ( |
Uh oh!
There was an error while loading. Please reload this page.
Symptom
When any active plugin package cannot be resolved to a readable
package.jsonon disk, every request to adeepseek-officialmodel fails with:The provider becomes completely unusable until the offending package is repaired — no request ever reaches the network.
Environment
DSH 0.1.5-rc.1 (the same code is still on
masteras of 2026-09-13).Root cause
packages/llm/plugin-package-inventory-deepseek/src/index.ts—PackageIdentityResolver.resolve:The throw propagates through
DeepSeekLlmApiExtensionRegistry.prepare()(Promise.allover the registered contributors) → the adapter wraps it asREQUEST_EXTENSION→ the whole model request dies before HTTP dispatch. There is no per-contributor isolation: one broken package poisons thedsh_plugin_packagesfield and therefore every official DeepSeek request.Reproduction
deepseek-officialmodel configured and any third-party plugin mounted from a directory.package.json— in our case a third-party plugin updater deleted the package contents and failed to restore them, leaving a gutted directory).Suggested fix
A diagnostic inventory field should never be able to take down a model request. Either:
collectActivePluginPackagesand log viactx.logger.warn, continuing with the resolvable packages; and/orprepare()treat a single contributor's rejection as "field omitted this request" (optionally with a warning), so one broken contributor cannot fail the others or the request itself.All reactions