export const DEFAULT_GEMINI_TRANSCRIPTION_MODEL = "gemini-2.5-flash";
export const GEMINI_TRANSCRIPTION_MODEL_ENV = "SUMMARIZE_GEMINI_TRANSCRIPTION_MODEL";
export const DEFAULT_DEEPGRAM_TRANSCRIPTION_MODEL = "nova-3";
export const DEEPGRAM_TRANSCRIPTION_MODEL_ENV = "SUMMARIZE_DEEPGRAM_TRANSCRIPTION_MODEL";
export const TRANSCRIPTION_PROVIDER_ENV_LIST = [
    "GROQ_API_KEY",
    "ASSEMBLYAI_API_KEY",
    "GEMINI_API_KEY",
    "OPENAI_API_KEY",
    "FAL_KEY",
    "DEEPGRAM_API_KEY",
];
export const TRANSCRIPTION_PROVIDER_ENV_LABEL = "GROQ_API_KEY, ASSEMBLYAI_API_KEY, GEMINI_API_KEY, OPENAI_API_KEY, FAL_KEY, or DEEPGRAM_API_KEY";
export function normalizeApiKey(raw) {
    const trimmed = typeof raw === "string" ? raw.trim() : "";
    return trimmed.length > 0 ? trimmed : null;
}
export function resolveGeminiApiKey({ env, geminiApiKey, }) {
    const explicit = normalizeApiKey(geminiApiKey);
    if (explicit)
        return explicit;
    const source = env ?? process.env;
    return (normalizeApiKey(source.GEMINI_API_KEY) ??
        normalizeApiKey(source.GOOGLE_GENERATIVE_AI_API_KEY) ??
        normalizeApiKey(source.GOOGLE_API_KEY));
}
export function resolveGroqApiKey({ env, groqApiKey, }) {
    const explicit = normalizeApiKey(groqApiKey);
    if (explicit)
        return explicit;
    const source = env ?? process.env;
    return normalizeApiKey(source.GROQ_API_KEY);
}
export function resolveAssemblyAiApiKey({ env, assemblyaiApiKey, }) {
    const explicit = normalizeApiKey(assemblyaiApiKey);
    if (explicit)
        return explicit;
    const source = env ?? process.env;
    return normalizeApiKey(source.ASSEMBLYAI_API_KEY);
}
export function resolveDeepgramApiKey({ env, deepgramApiKey, }) {
    const explicit = normalizeApiKey(deepgramApiKey);
    if (explicit)
        return explicit;
    const source = env ?? process.env;
    return normalizeApiKey(source.DEEPGRAM_API_KEY);
}
export function resolveElevenLabsApiKey({ env, elevenlabsApiKey, }) {
    const explicit = normalizeApiKey(elevenlabsApiKey);
    if (explicit)
        return explicit;
    const source = env ?? process.env;
    return normalizeApiKey(source.ELEVENLABS_API_KEY);
}
export function resolveOpenAiTranscriptionApiKey({ env, openaiApiKey, }) {
    const explicit = normalizeApiKey(openaiApiKey);
    if (explicit)
        return explicit;
    const source = env ?? process.env;
    return normalizeApiKey(source.OPENAI_API_KEY);
}
export function resolveFalApiKey({ env, falApiKey, }) {
    const explicit = normalizeApiKey(falApiKey);
    if (explicit)
        return explicit;
    const source = env ?? process.env;
    return normalizeApiKey(source.FAL_KEY);
}
export function resolveGeminiTranscriptionModel(env) {
    const source = env ?? process.env;
    return source[GEMINI_TRANSCRIPTION_MODEL_ENV]?.trim() || DEFAULT_GEMINI_TRANSCRIPTION_MODEL;
}
export function resolveDeepgramTranscriptionModel(env) {
    const source = env ?? process.env;
    return source[DEEPGRAM_TRANSCRIPTION_MODEL_ENV]?.trim() || DEFAULT_DEEPGRAM_TRANSCRIPTION_MODEL;
}
export function buildMissingTranscriptionProviderMessage() {
    return `No transcription providers available (install whisper-cpp or set ${TRANSCRIPTION_PROVIDER_ENV_LABEL})`;
}
export function buildMissingTranscriptionProviderNote() {
    return `Missing transcription provider (install whisper-cpp or set ${TRANSCRIPTION_PROVIDER_ENV_LIST.join("/")})`;
}
//# sourceMappingURL=provider-setup.js.map