import { w as requireActivePluginRegistry } from "./runtime-D0VWfhor.js";
import { n as getCoreEmbeddingProvider, t as CORE_EMBEDDING_PROVIDERS } from "./core-embedding-providers-Dtg40AdL.js";
//#region src/plugins/embedding-providers.ts
function getEmbeddingProviders() {
	return requireActivePluginRegistry().embeddingProviders.map((entry) => ({
		adapter: entry.provider,
		ownerPluginId: entry.pluginId || void 0
	}));
}
/** Looks up the registered embedding provider entry, including owner metadata. */
function getRegisteredEmbeddingProvider(id) {
	return getCoreEmbeddingProvider(id) ?? getEmbeddingProviders().find((entry) => entry.adapter.id === id);
}
/** Lists registered embedding providers with core defaults merged first. */
function listRegisteredEmbeddingProviders() {
	const merged = new Map(CORE_EMBEDDING_PROVIDERS.map((entry) => [entry.adapter.id, entry]));
	for (const entry of getEmbeddingProviders()) if (!merged.has(entry.adapter.id)) merged.set(entry.adapter.id, entry);
	return Array.from(merged.values());
}
//#endregion
export { listRegisteredEmbeddingProviders as n, getRegisteredEmbeddingProvider as t };
