import { r as resolvePluginConfigObject } from "../../plugin-config-runtime-C_FXJyHv.js";
import { t as definePluginEntry } from "../../plugin-entry-E9E9OqOa.js";
import { r as buildProviderToolCompatFamilyHooks } from "../../provider-tools-BQnOftqT.js";
import { t as buildOpenAIImageGenerationProvider } from "../../image-generation-provider-mmsUg8Q6.js";
import { t as openaiMediaUnderstandingProvider } from "../../media-understanding-provider-R6NHpEDz.js";
import { t as openAiMemoryEmbeddingProviderAdapter } from "../../memory-embedding-adapter-RnzuG1Fc.js";
import { n as buildOpenAIProvider } from "../../openai-provider-B9G0R8Ma.js";
import { n as resolveOpenAISystemPromptContribution, t as resolveOpenAIPromptOverlayMode } from "../../prompt-overlay-D6_Od1XF.js";
import { t as buildOpenAIRealtimeTranscriptionProvider } from "../../realtime-transcription-provider-scGKgfFI.js";
import { t as buildOpenAIRealtimeVoiceProvider } from "../../realtime-voice-provider-BI7qhFG0.js";
import { t as buildOpenAISpeechProvider } from "../../speech-provider-DOzTDcyU.js";
import { t as buildOpenAIVideoGenerationProvider } from "../../video-generation-provider-DLn0qZQs.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 };
