import { n as resolveRemoteEmbeddingClient, t as createRemoteEmbeddingProvider } from "./memory-core-host-engine-embeddings-B8_WUbIx.js";
import { t as DEEPINFRA_BASE_URL } from "./provider-models-Bd_NumK6.js";
import { p as normalizeDeepInfraModelRef, t as DEEPINFRA_EMBED_FALLBACK_MODELS } from "./media-models-Ce5nzTT7.js";
//#region extensions/deepinfra/embedding-provider.ts
const DEFAULT_DEEPINFRA_EMBEDDING_MODEL = DEEPINFRA_EMBED_FALLBACK_MODELS[0];
async function createDeepInfraEmbeddingProvider(options) {
	const defaultModel = options.defaultModel ?? DEFAULT_DEEPINFRA_EMBEDDING_MODEL;
	const client = await resolveRemoteEmbeddingClient({
		provider: "deepinfra",
		options: {
			...options,
			model: normalizeDeepInfraModelRef(options.model, defaultModel)
		},
		defaultBaseUrl: DEEPINFRA_BASE_URL,
		normalizeModel: (model) => normalizeDeepInfraModelRef(model, defaultModel)
	});
	return {
		provider: createRemoteEmbeddingProvider({
			id: "deepinfra",
			client,
			errorPrefix: "DeepInfra embeddings API error"
		}),
		client
	};
}
//#endregion
export { createDeepInfraEmbeddingProvider as n, DEFAULT_DEEPINFRA_EMBEDDING_MODEL as t };
