import "./chunk-BYW8Mqxw.js";
import "./logger-CATn0kWr.js";
import "./esm-tl6dENiB.js";
import "./pythonUtils-D5rGzOeH.js";
import "./types-CHrVA-1r.js";
import "./util-B4XoCK-L.js";
import "./fetch-BhuDaSn5.js";
import "./cache-C2ESUUfo.js";
import { t as OpenAiChatCompletionProvider } from "./chat-CL4dYB-g.js";
import "./transform-BYdhQ9OB.js";
import "./openai-BH2FsThj.js";
import "./util-DUayzR6E.js";
import { t as OpenAiEmbeddingProvider } from "./embedding-Bo_7FjBa.js";
import { t as OpenAiCompletionProvider } from "./completion-CWcCXIZT.js";

//#region src/providers/aimlapi.ts
/**
* Factory for creating AI/ML API providers using OpenAI-compatible endpoints.
*/
function createAimlApiProvider(providerPath, options = {}) {
	const splits = providerPath.split(":");
	const type = splits[1];
	const modelName = splits.slice(2).join(":");
	const openaiOptions = {
		...options,
		config: {
			...options.config || {},
			apiBaseUrl: "https://api.aimlapi.com/v1",
			apiKeyEnvar: "AIML_API_KEY"
		}
	};
	if (type === "chat") return new OpenAiChatCompletionProvider(modelName, openaiOptions);
	else if (type === "completion") return new OpenAiCompletionProvider(modelName, openaiOptions);
	else if (type === "embedding" || type === "embeddings") return new OpenAiEmbeddingProvider(modelName, openaiOptions);
	return new OpenAiChatCompletionProvider(splits.slice(1).join(":"), openaiOptions);
}

//#endregion
export { createAimlApiProvider };
//# sourceMappingURL=aimlapi-BBOG8sbk.js.map