fix(plugins): accept media-understanding id hints

This commit is contained in:
Peter Steinberger 2026-03-23 02:08:45 +00:00
parent 9aafff7378
commit 74cb08bede
2 changed files with 19 additions and 1 deletions

View File

@ -503,6 +503,23 @@ describe("loadPluginManifestRegistry", () => {
);
});
it("accepts media-understanding-style id hints without warning", () => {
const dir = makeTempDir();
writeManifest(dir, { id: "groq", configSchema: { type: "object" } });
const registry = loadRegistry([
createPluginCandidate({
idHint: "groq-media-understanding",
rootDir: dir,
origin: "bundled",
}),
]);
expect(registry.diagnostics.some((diag) => diag.message.includes("plugin id mismatch"))).toBe(
false,
);
});
it("still warns for unrelated id hint mismatches", () => {
const dir = makeTempDir();
writeManifest(dir, { id: "openai", configSchema: { type: "object" } });

View File

@ -146,7 +146,8 @@ function isCompatiblePluginIdHint(idHint: string | undefined, manifestId: string
return (
normalizedHint === `${manifestId}-provider` ||
normalizedHint === `${manifestId}-plugin` ||
normalizedHint === `${manifestId}-sandbox`
normalizedHint === `${manifestId}-sandbox` ||
normalizedHint === `${manifestId}-media-understanding`
);
}