Plugins: sync contract registry image providers
This commit is contained in:
parent
86e9dcfc1b
commit
13f396b395
@ -171,6 +171,7 @@ describe("plugin contract registry", () => {
|
||||
});
|
||||
|
||||
it("keeps bundled image-generation ownership explicit", () => {
|
||||
expect(findImageGenerationProviderIdsForPlugin("fal")).toEqual(["fal"]);
|
||||
expect(findImageGenerationProviderIdsForPlugin("google")).toEqual(["google"]);
|
||||
expect(findImageGenerationProviderIdsForPlugin("openai")).toEqual(["openai"]);
|
||||
});
|
||||
@ -187,6 +188,13 @@ describe("plugin contract registry", () => {
|
||||
});
|
||||
|
||||
it("tracks speech registrations on bundled provider plugins", () => {
|
||||
expect(findRegistrationForPlugin("fal")).toMatchObject({
|
||||
providerIds: ["fal"],
|
||||
speechProviderIds: [],
|
||||
mediaUnderstandingProviderIds: [],
|
||||
imageGenerationProviderIds: ["fal"],
|
||||
webSearchProviderIds: [],
|
||||
});
|
||||
expect(findRegistrationForPlugin("google")).toMatchObject({
|
||||
providerIds: ["google", "google-gemini-cli"],
|
||||
speechProviderIds: [],
|
||||
@ -214,12 +222,13 @@ describe("plugin contract registry", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("tracks every provider, speech, media, or web search plugin in the registration registry", () => {
|
||||
it("tracks every provider, speech, media, image, or web search plugin in the registration registry", () => {
|
||||
const expectedPluginIds = [
|
||||
...new Set([
|
||||
...providerContractRegistry.map((entry) => entry.pluginId),
|
||||
...speechProviderContractRegistry.map((entry) => entry.pluginId),
|
||||
...mediaUnderstandingProviderContractRegistry.map((entry) => entry.pluginId),
|
||||
...imageGenerationProviderContractRegistry.map((entry) => entry.pluginId),
|
||||
...webSearchProviderContractRegistry.map((entry) => entry.pluginId),
|
||||
]),
|
||||
].toSorted((left, right) => left.localeCompare(right));
|
||||
|
||||
@ -59,7 +59,7 @@ const BUNDLED_MEDIA_UNDERSTANDING_PLUGIN_IDS = [
|
||||
"openai",
|
||||
"zai",
|
||||
] as const;
|
||||
const BUNDLED_IMAGE_GENERATION_PLUGIN_IDS = ["google", "openai"] as const;
|
||||
const BUNDLED_IMAGE_GENERATION_PLUGIN_IDS = ["fal", "google", "openai"] as const;
|
||||
|
||||
export const providerContractRegistry: ProviderContractEntry[] = [];
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user