import { p as createModelCatalogPresetAppliers } from "./provider-onboard-DF3popM3.js";
import { S as QWEN_STANDARD_GLOBAL_BASE_URL, b as QWEN_OAUTH_PROVIDER_ID, f as QWEN_CN_BASE_URL, g as QWEN_GLOBAL_BASE_URL, h as QWEN_DEFAULT_MODEL_REF, x as QWEN_STANDARD_CN_BASE_URL, y as QWEN_OAUTH_DEFAULT_MODEL_REF } from "./models-di-VE2Fd.js";
import { n as buildQwenOAuthProvider, r as buildQwenProvider } from "./provider-catalog-C7PiwNXj.js";
//#region extensions/qwen/onboard.ts
const qwenPresetAppliers = createModelCatalogPresetAppliers({
	primaryModelRef: QWEN_DEFAULT_MODEL_REF,
	resolveParams: (_cfg, baseUrl) => {
		const provider = buildQwenProvider({ baseUrl });
		return {
			providerId: "qwen",
			api: provider.api ?? "openai-completions",
			baseUrl,
			catalogModels: provider.models ?? [],
			aliases: [...(provider.models ?? []).flatMap((model) => [`qwen/${model.id}`, `modelstudio/${model.id}`]), {
				modelRef: QWEN_DEFAULT_MODEL_REF,
				alias: "Qwen"
			}]
		};
	}
});
const qwenOAuthPresetAppliers = createModelCatalogPresetAppliers({
	primaryModelRef: QWEN_OAUTH_DEFAULT_MODEL_REF,
	resolveParams: () => {
		const provider = buildQwenOAuthProvider();
		return {
			providerId: QWEN_OAUTH_PROVIDER_ID,
			api: provider.api ?? "openai-completions",
			baseUrl: provider.baseUrl,
			catalogModels: provider.models ?? [],
			aliases: [...(provider.models ?? []).map((model) => `qwen-oauth/${model.id}`), {
				modelRef: QWEN_OAUTH_DEFAULT_MODEL_REF,
				alias: "Qwen OAuth"
			}]
		};
	}
});
function applyQwenProviderConfig(cfg) {
	return qwenPresetAppliers.applyProviderConfig(cfg, QWEN_GLOBAL_BASE_URL);
}
function applyQwenProviderConfigCn(cfg) {
	return qwenPresetAppliers.applyProviderConfig(cfg, QWEN_CN_BASE_URL);
}
function applyQwenConfig(cfg) {
	return qwenPresetAppliers.applyConfig(cfg, QWEN_GLOBAL_BASE_URL);
}
function applyQwenConfigCn(cfg) {
	return qwenPresetAppliers.applyConfig(cfg, QWEN_CN_BASE_URL);
}
function applyQwenStandardProviderConfig(cfg) {
	return qwenPresetAppliers.applyProviderConfig(cfg, QWEN_STANDARD_GLOBAL_BASE_URL);
}
function applyQwenStandardProviderConfigCn(cfg) {
	return qwenPresetAppliers.applyProviderConfig(cfg, QWEN_STANDARD_CN_BASE_URL);
}
function applyQwenStandardConfig(cfg) {
	return qwenPresetAppliers.applyConfig(cfg, QWEN_STANDARD_GLOBAL_BASE_URL);
}
function applyQwenStandardConfigCn(cfg) {
	return qwenPresetAppliers.applyConfig(cfg, QWEN_STANDARD_CN_BASE_URL);
}
function applyQwenOAuthConfig(cfg) {
	return qwenOAuthPresetAppliers.applyConfig(cfg);
}
const applyModelStudioProviderConfig = applyQwenProviderConfig;
const applyModelStudioProviderConfigCn = applyQwenProviderConfigCn;
const applyModelStudioConfig = applyQwenConfig;
const applyModelStudioConfigCn = applyQwenConfigCn;
const applyModelStudioStandardProviderConfig = applyQwenStandardProviderConfig;
const applyModelStudioStandardProviderConfigCn = applyQwenStandardProviderConfigCn;
const applyModelStudioStandardConfig = applyQwenStandardConfig;
const applyModelStudioStandardConfigCn = applyQwenStandardConfigCn;
//#endregion
export { applyModelStudioStandardConfig as a, applyModelStudioStandardProviderConfigCn as c, applyQwenOAuthConfig as d, applyQwenStandardConfig as f, applyModelStudioProviderConfigCn as i, applyQwenConfig as l, applyModelStudioConfigCn as n, applyModelStudioStandardConfigCn as o, applyQwenStandardConfigCn as p, applyModelStudioProviderConfig as r, applyModelStudioStandardProviderConfig as s, applyModelStudioConfig as t, applyQwenConfigCn as u };
