feat(google): add image generation provider

This commit is contained in:
Peter Steinberger
2026-03-16 23:20:27 -07:00
parent c1ef5748eb
commit 618d35f933
7 changed files with 359 additions and 1 deletions

View File

@@ -165,6 +165,7 @@ describe("plugin contract registry", () => {
});
it("keeps bundled image-generation ownership explicit", () => {
expect(findImageGenerationProviderIdsForPlugin("google")).toEqual(["google"]);
expect(findImageGenerationProviderIdsForPlugin("openai")).toEqual(["openai"]);
});
@@ -180,6 +181,13 @@ describe("plugin contract registry", () => {
});
it("tracks speech registrations on bundled provider plugins", () => {
expect(findRegistrationForPlugin("google")).toMatchObject({
providerIds: ["google", "google-gemini-cli"],
speechProviderIds: [],
mediaUnderstandingProviderIds: ["google"],
imageGenerationProviderIds: ["google"],
webSearchProviderIds: ["gemini"],
});
expect(findRegistrationForPlugin("openai")).toMatchObject({
providerIds: ["openai", "openai-codex"],
speechProviderIds: ["openai"],
@@ -245,6 +253,9 @@ describe("plugin contract registry", () => {
});
it("keeps bundled image-generation support explicit", () => {
expect(findImageGenerationProviderForPlugin("google").generateImage).toEqual(
expect.any(Function),
);
expect(findImageGenerationProviderForPlugin("openai").generateImage).toEqual(
expect.any(Function),
);

View File

@@ -131,7 +131,7 @@ const bundledMediaUnderstandingPlugins: RegistrablePlugin[] = [
zaiPlugin,
];
const bundledImageGenerationPlugins: RegistrablePlugin[] = [openAIPlugin];
const bundledImageGenerationPlugins: RegistrablePlugin[] = [googlePlugin, openAIPlugin];
function captureRegistrations(plugin: RegistrablePlugin) {
const captured = createCapturedPluginRegistration();