import { t as definePluginEntry } from "../../plugin-entry-CeANVrRz.js";
import { t as buildOpenAICodexCliBackend } from "../../cli-backend-oPoPneuK.js";
import { t as buildOpenAIImageGenerationProvider } from "../../image-generation-provider-BdBFCHMe.js";
import { n as openaiCodexMediaUnderstandingProvider, r as openaiMediaUnderstandingProvider } from "../../media-understanding-provider-DnJ7pUrN.js";
import { t as buildOpenAICodexProviderPlugin } from "../../openai-codex-provider-_Xmy-_V6.js";
import { t as buildOpenAIProvider } from "../../openai-provider-DwZANXDg.js";
import { a as resolveOpenAISystemPromptContribution, i as resolveOpenAIPromptOverlayMode } from "../../prompt-overlay-WZZfPDJN.js";
import { t as buildOpenAIRealtimeTranscriptionProvider } from "../../realtime-transcription-provider-DBLLy4t4.js";
import { t as buildOpenAIRealtimeVoiceProvider } from "../../realtime-voice-provider-DjboeHsR.js";
import { t as buildOpenAISpeechProvider } from "../../speech-provider-UqQ53N2l.js";
import { t as buildOpenAIVideoGenerationProvider } from "../../video-generation-provider-C4Mp2eXV.js";
//#region extensions/openai/index.ts
var openai_default = definePluginEntry({
	id: "openai",
	name: "OpenAI Provider",
	description: "Bundled OpenAI provider plugins",
	register(api) {
		const promptOverlayMode = resolveOpenAIPromptOverlayMode(api.pluginConfig);
		const buildProviderWithPromptContribution = (provider) => ({
			...provider,
			resolveSystemPromptContribution: (ctx) => resolveOpenAISystemPromptContribution({
				mode: promptOverlayMode,
				modelProviderId: provider.id,
				modelId: ctx.modelId
			})
		});
		api.registerCliBackend(buildOpenAICodexCliBackend());
		api.registerProvider(buildProviderWithPromptContribution(buildOpenAIProvider()));
		api.registerProvider(buildProviderWithPromptContribution(buildOpenAICodexProviderPlugin()));
		api.registerImageGenerationProvider(buildOpenAIImageGenerationProvider());
		api.registerRealtimeTranscriptionProvider(buildOpenAIRealtimeTranscriptionProvider());
		api.registerRealtimeVoiceProvider(buildOpenAIRealtimeVoiceProvider());
		api.registerSpeechProvider(buildOpenAISpeechProvider());
		api.registerMediaUnderstandingProvider(openaiMediaUnderstandingProvider);
		api.registerMediaUnderstandingProvider(openaiCodexMediaUnderstandingProvider);
		api.registerVideoGenerationProvider(buildOpenAIVideoGenerationProvider());
	}
});
//#endregion
export { openai_default as default };
