"use strict";
/**
 * Routes workspace AI chat to Gemini or an OpenAI-compatible API (e.g. DeepSeek).
 *
 * Env:
 *   VIBN_CHAT_PROVIDER=gemini | deepseek | openai_compatible
 *
 * Default: gemini (requires GOOGLE_API_KEY / studio key + VIBN_CHAT_MODEL).
 *
 * DeepSeek / OpenAI-compat:
 *   DEEPSEEK_API_KEY (or VIBN_OPENAI_COMPATIBLE_API_KEY)
 *   Optional: VIBN_OPENAI_COMPATIBLE_CHAT_URL (default https://api.deepseek.com/chat/completions)
 *   Optional: VIBN_OPENAI_COMPATIBLE_MODEL (default deepseek-chat)
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.callVibnChat = callVibnChat;
const gemini_chat_1 = require("./gemini-chat");
const openai_compatible_chat_1 = require("./openai-compatible-chat");
async function callVibnChat(opts) {
    const p = (process.env.VIBN_CHAT_PROVIDER || 'gemini').toLowerCase().trim();
    if (p === 'deepseek' || p === 'openai_compatible') {
        return (0, openai_compatible_chat_1.callOpenAiCompatibleChat)(opts);
    }
    return (0, gemini_chat_1.callGeminiChat)(opts);
}
