import { t as definePluginEntry } from "../../plugin-entry-D0csrIe8.js";
import { r as resolvePluginConfigObject } from "../../plugin-config-runtime-CDQnY9m5.js";
import { n as buildProviderToolCompatFamilyHooks } from "../../provider-tools-BOI1NgMZ.js";
import { t as buildOpenAIImageGenerationProvider } from "../../image-generation-provider-Z4JCL66I.js";
import { t as openaiMediaUnderstandingProvider } from "../../media-understanding-provider-Bbmc6M98.js";
import { t as openAiMemoryEmbeddingProviderAdapter } from "../../memory-embedding-adapter-Z8NJ5Uiq.js";
import { n as buildOpenAIProvider } from "../../openai-provider-DtnI8X57.js";
import { a as resolveOpenAISystemPromptContribution, i as resolveOpenAIPromptOverlayMode } from "../../prompt-overlay-BDR5M5n9.js";
import { t as buildOpenAIRealtimeTranscriptionProvider } from "../../realtime-transcription-provider-C_C8jodR.js";
import { t as buildOpenAIRealtimeVoiceProvider } from "../../realtime-voice-provider-C1xhsYAN.js";
import { t as buildOpenAISpeechProvider } from "../../speech-provider-DAF_Ftyg.js";
import { t as buildOpenAIVideoGenerationProvider } from "../../video-generation-provider-C5Xhmymp.js";
//#region extensions/openai/index.ts
var openai_default = definePluginEntry({
	id: "openai",
	name: "OpenAI Provider",
	description: "Bundled OpenAI provider plugins",
	register(api) {
		const openAIToolCompatHooks = buildProviderToolCompatFamilyHooks("openai");
		const buildProviderWithPromptContribution = (provider) => ({
			...provider,
			...openAIToolCompatHooks,
			resolveSystemPromptContribution: (ctx) => {
				const pluginConfig = resolvePluginConfigObject(ctx.config, "openai") ?? (ctx.config ? void 0 : api.pluginConfig);
				return resolveOpenAISystemPromptContribution({
					config: ctx.config,
					legacyPluginConfig: pluginConfig,
					mode: resolveOpenAIPromptOverlayMode(pluginConfig),
					modelProviderId: provider.id,
					modelId: ctx.modelId,
					trigger: ctx.trigger
				});
			}
		});
		api.registerProvider(buildProviderWithPromptContribution(buildOpenAIProvider()));
		api.registerMemoryEmbeddingProvider(openAiMemoryEmbeddingProviderAdapter);
		api.registerImageGenerationProvider(buildOpenAIImageGenerationProvider());
		api.registerRealtimeTranscriptionProvider(buildOpenAIRealtimeTranscriptionProvider());
		api.registerRealtimeVoiceProvider(buildOpenAIRealtimeVoiceProvider());
		api.registerSpeechProvider(buildOpenAISpeechProvider());
		api.registerMediaUnderstandingProvider(openaiMediaUnderstandingProvider);
		api.registerVideoGenerationProvider(buildOpenAIVideoGenerationProvider());
	}
});
//#endregion
export { openai_default as default };
