mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-30 01:58:44 +00:00
fix: strip -plugin suffix in deriveIdHint to match manifest ids (#85170)
The deriveIdHint function already strips -provider from unscoped package names (@openclaw/anthropic-provider -> anthropic) but does not strip -plugin (@openclaw/xai-plugin -> xai-plugin instead of xai). This causes ~30 spurious 'plugin id mismatch' warnings on gateway startup for built-in plugins whose package names end in -plugin. Closes #85048
This commit is contained in:
@@ -550,7 +550,9 @@ function deriveIdHint(params: {
|
||||
const normalizedPackageId =
|
||||
unscoped.endsWith("-provider") && unscoped.length > "-provider".length
|
||||
? unscoped.slice(0, -"-provider".length)
|
||||
: unscoped;
|
||||
: unscoped.endsWith("-plugin") && unscoped.length > "-plugin".length
|
||||
? unscoped.slice(0, -"-plugin".length)
|
||||
: unscoped;
|
||||
|
||||
if (!params.hasMultipleExtensions) {
|
||||
return normalizedPackageId;
|
||||
|
||||
Reference in New Issue
Block a user