import { FREE_TRIAL_MODELS } from "./default.js";
export function setupApiKeysMode(config) {
    return {
        ...config,
        models: config.models.filter((model) => model.provider !== "free-trial"),
        tabAutocompleteModel: {
            title: "Tab Autocomplete",
            provider: "free-trial",
            model: "starcoder-7b",
        },
        embeddingsProvider: {
            provider: "free-trial",
        },
        reranker: {
            name: "free-trial",
        },
    };
}
export function setupOptimizedExistingUserMode(config) {
    return {
        ...config,
        tabAutocompleteModel: {
            title: "Tab Autocomplete",
            provider: "free-trial",
            model: "starcoder-7b",
        },
        embeddingsProvider: {
            provider: "free-trial",
        },
        reranker: {
            name: "free-trial",
        },
    };
}
export function setupLocalMode(config) {
    return {
        ...config,
        models: [
            {
                title: "Llama 3",
                provider: "ollama",
                model: "llama3",
            },
            {
                title: "Ollama",
                provider: "ollama",
                model: "AUTODETECT",
            },
            ...config.models.filter((model) => model.provider !== "free-trial"),
        ],
        tabAutocompleteModel: {
            title: "Starcoder 3b",
            provider: "ollama",
            model: "starcoder2:3b",
        },
        embeddingsProvider: {
            provider: "transformers.js",
        },
        reranker: undefined,
    };
}
export function setupFreeTrialMode(config) {
    return {
        ...config,
        models: [
            ...FREE_TRIAL_MODELS,
            ...config.models.filter((model) => model.provider !== "free-trial"),
        ],
        tabAutocompleteModel: {
            title: "Tab Autocomplete",
            provider: "free-trial",
            model: "starcoder-7b",
        },
        embeddingsProvider: {
            provider: "free-trial",
        },
        reranker: {
            name: "free-trial",
        },
    };
}
export function setupLocalAfterFreeTrial(config) {
    return {
        ...config,
        models: [
            {
                title: "Llama 3",
                provider: "ollama",
                model: "llama3",
            },
            {
                title: "Ollama",
                provider: "ollama",
                model: "AUTODETECT",
            },
            ...config.models.filter((model) => model.provider !== "free-trial"),
        ],
    };
}
