#!/usr/bin/env node
//#region src/providers/families/google.ts
const googleProviderFactories = [{
	test: (providerPath) => providerPath.startsWith("vertex:"),
	create: async (providerPath, providerOptions) => {
		const splits = providerPath.split(":");
		const firstPart = splits[1];
		if (firstPart === "video") {
			const { GoogleVideoProvider } = await import("./video-CESvZJ-a.js");
			return new GoogleVideoProvider(splits.slice(2).join(":"), {
				...providerOptions,
				id: providerPath,
				config: {
					...providerOptions.config,
					vertexai: true
				}
			});
		}
		const { VertexChatProvider, VertexEmbeddingProvider } = await import("./vertex-Dgl-D-x7.js");
		if (firstPart === "chat") return new VertexChatProvider(splits.slice(2).join(":"), providerOptions);
		if (firstPart === "embedding" || firstPart === "embeddings") return new VertexEmbeddingProvider(splits.slice(2).join(":"), providerOptions);
		return new VertexChatProvider(splits.slice(1).join(":"), providerOptions);
	}
}, {
	test: (providerPath) => providerPath.startsWith("google:") || providerPath.startsWith("palm:"),
	create: async (providerPath, providerOptions) => {
		const splits = providerPath.split(":");
		if (splits.length >= 3) {
			const serviceType = splits[1];
			const modelName = splits.slice(2).join(":");
			if (serviceType === "live") {
				const { GoogleLiveProvider } = await import("./live-Bznmeuzy.js");
				return new GoogleLiveProvider(modelName, providerOptions);
			} else if (serviceType === "image") {
				const { GoogleImageProvider } = await import("./image-DZlnqSlt.js");
				return new GoogleImageProvider(modelName, providerOptions);
			} else if (serviceType === "video") {
				const { GoogleVideoProvider } = await import("./video-CESvZJ-a.js");
				return new GoogleVideoProvider(modelName, {
					...providerOptions,
					id: providerPath
				});
			} else if (serviceType === "embedding" || serviceType === "embeddings") {
				if (!modelName) throw new Error(`Missing model name for ${providerPath}. Use e.g. google:embedding:gemini-embedding-001.`);
				const { AIStudioEmbeddingProvider } = await import("./ai.studio-DIAE9Lpc.js");
				return new AIStudioEmbeddingProvider(modelName, providerOptions);
			}
		}
		const modelName = splits[1];
		if (modelName.includes("-image")) {
			const { GeminiImageProvider } = await import("./gemini-image-D8-wZ_WD.js");
			return new GeminiImageProvider(modelName, providerOptions);
		}
		const { AIStudioChatProvider } = await import("./ai.studio-DIAE9Lpc.js");
		return new AIStudioChatProvider(modelName, providerOptions);
	}
}];
//#endregion
export { googleProviderFactories };

//# sourceMappingURL=google-bIqsV9i4.js.map