export function getOpenAiBaseUrl(): string {
  return (
    process.env.OPENAI_BASE_URL ??
    process.env.OPENAI_API_BASE ??
    "https://op.bz121.com/v1"
  );
}

export function getOpenAiModel(): string {
  return process.env.OPENAI_MODEL ?? "huihui_ai/gemma-4-abliterated:e4b";
}

export function getOpenAiApiKey(): string {
  const apiKey = process.env.OPENAI_API_KEY?.trim();
  if (!apiKey) {
    throw new Error(
      "未配置 OPENAI_API_KEY，请在 .env.local 或 Docker env_file 中设置",
    );
  }
  return apiKey;
}
