refactor(plugins): unify explicit provider ownership loading

This commit is contained in:
Peter Steinberger
2026-04-05 09:32:56 +01:00
parent f9f44b9b96
commit 647fc7bfec
5 changed files with 106 additions and 84 deletions

View File

@@ -589,7 +589,30 @@ describe("resolvePluginProviders", () => {
}),
);
});
it("activates owning plugins for explicit provider refs", () => {
setOwningProviderManifestPlugins();
resolvePluginProviders({
config: {},
providerRefs: ["openai-codex"],
activate: true,
});
expect(resolveRuntimePluginRegistryMock).toHaveBeenCalledWith(
expect.objectContaining({
onlyPluginIds: ["openai"],
activate: true,
config: expect.objectContaining({
plugins: expect.objectContaining({
allow: ["openai"],
entries: {
openai: { enabled: true },
},
}),
}),
}),
);
});
it.each([
{
provider: "minimax-portal",