package org.jabref.model.ai.llm;

public enum PredefinedChatModel {
    // OpenAI
    GPT_5_5_PRO(AiProvider.OPEN_AI, "gpt-5.5-pro", 1050000),
    GPT_5_5(AiProvider.OPEN_AI, "gpt-5.5", 1050000),
    GPT_5_4_PRO(AiProvider.OPEN_AI, "gpt-5.4-pro", 1050000),
    GPT_5_4(AiProvider.OPEN_AI, "gpt-5.4", 1050000),
    GPT_5_4_MINI(AiProvider.OPEN_AI, "gpt-5.4-mini", 400000),
    GPT_4O_MINI(AiProvider.OPEN_AI, "gpt-4o-mini", 128000),
    GPT_4O(AiProvider.OPEN_AI, "gpt-4o", 128000),
    GPT_4(AiProvider.OPEN_AI, "gpt-4", 8192),
    GPT_4_TURBO(AiProvider.OPEN_AI, "gpt-4-turbo", 128000),
    GPT_3_5_TURBO(AiProvider.OPEN_AI, "gpt-3.5-turbo", 16385),

    // Mistral AI
    MISTRAL_LARGE_3(AiProvider.MISTRAL_AI, "mistral-large-3", 128000),
    MISTRAL_SMALL_4(AiProvider.MISTRAL_AI, "mistral-small-4", 128000),
    MISTRAL_MEDIUM_3_5(AiProvider.MISTRAL_AI, "mistral-medium-3.5", 128000),
    OPEN_MISTRAL_NEMO(AiProvider.MISTRAL_AI, "open-mistral-nemo", 128000),
    OPEN_MISTRAL_7B(AiProvider.MISTRAL_AI, "open-mistral-7b", 32000),
    // "mixtral" is not a typo.
    OPEN_MIXTRAL_8X7B(AiProvider.MISTRAL_AI, "open-mixtral-8x7b", 32000),
    OPEN_MIXTRAL_8X22B(AiProvider.MISTRAL_AI, "open-mixtral-8x22b", 64000),

    // Gemini
    GEMINI_3_5_FLASH(AiProvider.GEMINI, "gemini-3.5-flash", 2097152),
    GEMINI_3_1_PRO(AiProvider.GEMINI, "gemini-3.1-pro", 2097152),
    GEMINI_3_PRO(AiProvider.GEMINI, "gemini-3-pro", 2097152),
    GEMINI_3_FLASH(AiProvider.GEMINI, "gemini-3-flash", 1048576),
    GEMINI_2_5_PRO(AiProvider.GEMINI, "gemini-2.5-pro", 2097152),
    GEMINI_2_5_FLASH(AiProvider.GEMINI, "gemini-2.5-flash", 1048576),
    GEMINI_1_5_FLASH(AiProvider.GEMINI, "gemini-1.5-flash", 1048576),
    GEMINI_1_5_PRO(AiProvider.GEMINI, "gemini-1.5-pro", 2097152),
    GEMINI_1_0_PRO(AiProvider.GEMINI, "gemini-1.0-pro", 32000),

    // Dummy variant for Hugging Face models.
    // Blank entry is used for cases where the model name is not specified.
    BLANK_HUGGING_FACE(AiProvider.HUGGING_FACE, "", 0);

    private final AiProvider aiProvider;
    private final String name;
    private final int contextWindowSize;

    PredefinedChatModel(AiProvider aiProvider, String name, int contextWindowSize) {
        this.aiProvider = aiProvider;
        this.name = name;
        this.contextWindowSize = contextWindowSize;
    }

    public AiProvider getAiProvider() {
        return aiProvider;
    }

    public String getName() {
        return name;
    }

    public int getContextWindowSize() {
        return contextWindowSize;
    }

    public String toString() {
        return aiProvider.toString() + " " + name;
    }
}
