//#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 Promise.resolve().then(() => require("./video-V2NK6P-3.cjs"));
			return new GoogleVideoProvider(splits.slice(2).join(":"), {
				...providerOptions,
				id: providerPath,
				config: {
					...providerOptions.config,
					vertexai: true
				}
			});
		}
		const { VertexChatProvider, VertexEmbeddingProvider } = await Promise.resolve().then(() => require("./vertex-DW4sDd4h.cjs")).then((n) => n.vertex_exports);
		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 Promise.resolve().then(() => require("./live-Pk4FSKN0.cjs"));
				return new GoogleLiveProvider(modelName, providerOptions);
			} else if (serviceType === "image") {
				const { GoogleImageProvider } = await Promise.resolve().then(() => require("./image-N5ySu-xP.cjs"));
				return new GoogleImageProvider(modelName, providerOptions);
			} else if (serviceType === "video") {
				const { GoogleVideoProvider } = await Promise.resolve().then(() => require("./video-V2NK6P-3.cjs"));
				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 Promise.resolve().then(() => require("./ai.studio-zk6xWk1G.cjs")).then((n) => n.ai_studio_exports);
				return new AIStudioEmbeddingProvider(modelName, providerOptions);
			}
		}
		const modelName = splits[1];
		if (modelName.includes("-image")) {
			const { GeminiImageProvider } = await Promise.resolve().then(() => require("./gemini-image-B9yzvwAa.cjs"));
			return new GeminiImageProvider(modelName, providerOptions);
		}
		const { AIStudioChatProvider } = await Promise.resolve().then(() => require("./ai.studio-zk6xWk1G.cjs")).then((n) => n.ai_studio_exports);
		return new AIStudioChatProvider(modelName, providerOptions);
	}
}];
//#endregion
exports.googleProviderFactories = googleProviderFactories;

//# sourceMappingURL=google-B3pao8gX.cjs.map