import "./chunk-BT06e5E1.js";
import "./logger-BudIH0qK.js";
import "./esm-C5zIToiC.js";
import "./pythonUtils-BiVLWZ6g.js";
import "./types-Cg21S-St.js";
import "./util-BaEBV99n.js";
import "./fetch-D70iPJNm.js";
import "./cache-BNI_7DxT.js";
import "./genaiTracer-C6LxD3Ij.js";
import { t as OpenAiChatCompletionProvider } from "./chat-F6Hy65LQ.js";
import "./transform-kOrXspJM.js";
import "./openai-0a7Nnw31.js";
import "./util-CnHd9JAv.js";

//#region src/providers/quiverai.ts
const QUIVERAI_API_BASE_URL = "https://api.quiver.ai/v1";
/**
* QuiverAI chat provider extends OpenAI chat completion provider.
* QuiverAI's chat API is OpenAI-compatible and excels at SVG generation.
*/
var QuiverAiChatProvider = class extends OpenAiChatCompletionProvider {
	constructor(modelName, providerOptions = {}) {
		const config = providerOptions.config || {};
		super(modelName, {
			...providerOptions,
			config: {
				...config,
				apiBaseUrl: config.apiBaseUrl || QUIVERAI_API_BASE_URL,
				apiKeyEnvar: "QUIVERAI_API_KEY"
			}
		});
	}
	id() {
		return `quiverai:${this.modelName}`;
	}
	toString() {
		return `[QuiverAI Provider ${this.modelName}]`;
	}
	getApiUrlDefault() {
		return QUIVERAI_API_BASE_URL;
	}
};
function createQuiverAiProvider(providerPath, providerOptions = {}, env) {
	const splits = providerPath.split(":");
	const modelType = splits[1];
	const effectiveEnv = env || providerOptions.env;
	return new QuiverAiChatProvider((modelType === "chat" ? splits.slice(2) : splits.slice(1)).join(":") || "arrow-0.5", {
		...providerOptions,
		env: effectiveEnv
	});
}

//#endregion
export { createQuiverAiProvider };
//# sourceMappingURL=quiverai-XBvXxc7a.js.map