/**
 * 百度文心 (ERNIE)
 *
 * - 官网：https://cloud.baidu.com/product/wenxinworkshop
 * - 控制台 / API key：https://console.bce.baidu.com/qianfan/ais/console/applicationConsole/application/v2
 * - API 文档：https://cloud.baidu.com/doc/WENXINWORKSHOP/index.html
 */
import type { InkosEndpoint } from "../types.js";

export const WENXIN: InkosEndpoint = {
  id: "wenxin",
  label: "文心一言 (千帆)",
  group: "china",
  api: "openai-completions",
  baseUrl: "https://qianfan.baidubce.com/v2",
  checkModel: "ernie-3.5-8k",
  temperatureRange: [0, 1],
  defaultTemperature: 0.95,
  writingTemperature: 0.95,
  models: [
    { id: "ernie-5.0-thinking-latest", maxOutput: 65536, contextWindowTokens: 131072, enabled: true, releasedAt: "2025-11-12" },
    { id: "ernie-5.0-thinking-preview", maxOutput: 65536, contextWindowTokens: 131072, releasedAt: "2025-11-12" },
    { id: "ernie-4.5-turbo-128k", maxOutput: 12288, contextWindowTokens: 131072, enabled: true },
    { id: "ernie-4.5-turbo-128k-preview", maxOutput: 12288, contextWindowTokens: 131072 },
    { id: "ernie-4.5-turbo-32k", maxOutput: 12288, contextWindowTokens: 32768 },
    { id: "ernie-4.5-turbo-latest", maxOutput: 12288, contextWindowTokens: 131072 },
    { id: "ernie-speed-pro-128k", maxOutput: 4096, contextWindowTokens: 131072 },
    { id: "ernie-lite-pro-128k", maxOutput: 4096, contextWindowTokens: 131072 },
    { id: "ernie-char-8k", maxOutput: 2048, contextWindowTokens: 8192 },
    { id: "ernie-char-fiction-8k", maxOutput: 2048, contextWindowTokens: 8192 },
    { id: "ernie-char-fiction-8k-preview", maxOutput: 2048, contextWindowTokens: 8192 },
    { id: "ernie-novel-8k", maxOutput: 2048, contextWindowTokens: 8192 },
    { id: "ernie-4.5-0.3b", maxOutput: 8192, contextWindowTokens: 131072 },
    { id: "ernie-4.5-21b-a3b", maxOutput: 8192, contextWindowTokens: 131072 },
    { id: "ernie-4.5-21b-a3b-thinking", maxOutput: 8192, contextWindowTokens: 131072 },
    { id: "ernie-4.5-vl-28b-a3b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "qianfan-8b", maxOutput: 16384, contextWindowTokens: 32768 },
    { id: "qianfan-70b", maxOutput: 16384, contextWindowTokens: 32768 },
    { id: "qianfan-agent-intent-32k", maxOutput: 4096, contextWindowTokens: 32768 },
    { id: "qianfan-agent-lite-8k", maxOutput: 2048, contextWindowTokens: 8192 },
    { id: "ernie-4.5-turbo-vl-preview", maxOutput: 16384, contextWindowTokens: 131072 },
    { id: "ernie-4.5-turbo-vl", maxOutput: 16384, contextWindowTokens: 131072 },
    { id: "ernie-4.5-turbo-vl-32k", maxOutput: 12288, contextWindowTokens: 32768 },
    { id: "ernie-4.5-turbo-vl-32k-preview", maxOutput: 16384, contextWindowTokens: 32768 },
    { id: "ernie-4.5-turbo-vl-latest", maxOutput: 16384, contextWindowTokens: 131072 },
    { id: "ernie-4.5-8k-preview", maxOutput: 2048, contextWindowTokens: 8192 },
    { id: "ernie-x1.1", maxOutput: 65536, contextWindowTokens: 65536, enabled: true },
    { id: "ernie-x1.1-preview", maxOutput: 65536, contextWindowTokens: 65536 },
    { id: "ernie-x1-turbo-32k", maxOutput: 28160, contextWindowTokens: 32768 },
    { id: "ernie-x1-turbo-32k-preview", maxOutput: 28160, contextWindowTokens: 32768 },
    { id: "qianfan-composition", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "qianfan-check-vl", maxOutput: 131072, contextWindowTokens: 131072 },
    { id: "qianfan-multipicocr", maxOutput: 32768, contextWindowTokens: 131072 },
    { id: "qianfan-vl-70b", maxOutput: 28672, contextWindowTokens: 32768 },
    { id: "qianfan-vl-8b", maxOutput: 28672, contextWindowTokens: 32768 },
    { id: "qianfan-llama-vl-8b", maxOutput: 16384, contextWindowTokens: 32768 },
    { id: "qianfan-qi-vl", maxOutput: 131072, contextWindowTokens: 131072 },
    { id: "qianfan-engcard-vl", maxOutput: 4000, contextWindowTokens: 4096 },
    { id: "qianfan-singlepicocr", maxOutput: 4096, contextWindowTokens: 4096 },
    { id: "internvl3-38b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "internvl3-14b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "internvl3-1b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "internvl2.5-38b-mpo", maxOutput: 4096, contextWindowTokens: 32768 },
    { id: "qwen3-vl-32b-instruct", maxOutput: 32768, contextWindowTokens: 131072 },
    { id: "qwen3-vl-32b-thinking", maxOutput: 32768, contextWindowTokens: 131072 },
    { id: "qwen3-vl-8b-instruct", maxOutput: 32768, contextWindowTokens: 131072 },
    { id: "qwen3-vl-8b-thinking", maxOutput: 32768, contextWindowTokens: 131072 },
    { id: "qwen3-vl-30b-a3b-instruct", maxOutput: 32768, contextWindowTokens: 131072 },
    { id: "qwen3-vl-30b-a3b-thinking", maxOutput: 32768, contextWindowTokens: 131072 },
    { id: "qwen3-vl-235b-a22b-instruct", maxOutput: 32768, contextWindowTokens: 131072 },
    { id: "qwen3-vl-235b-a22b-thinking", maxOutput: 32768, contextWindowTokens: 131072 },
    { id: "qwen2.5-vl-32b-instruct", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "qwen2.5-vl-7b-instruct", maxOutput: 4096, contextWindowTokens: 16384 },
    { id: "glm-4.5v", maxOutput: 16384, contextWindowTokens: 65536 },
    { id: "deepseek-vl2", maxOutput: 2048, contextWindowTokens: 4096 },
    { id: "deepseek-vl2-small", maxOutput: 2048, contextWindowTokens: 4096 },
    { id: "deepseek-v3.2-think", maxOutput: 32768, contextWindowTokens: 144000 },
    { id: "deepseek-v3.1-think-250821", maxOutput: 32768, contextWindowTokens: 144000 },
    { id: "deepseek-r1-250528", maxOutput: 32768, contextWindowTokens: 144000 },
    { id: "deepseek-r1", maxOutput: 32768, contextWindowTokens: 144000 },
    { id: "deepseek-r1-distill-qianfan-70b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "deepseek-r1-distill-qianfan-8b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "deepseek-r1-distill-qianfan-llama-70b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "deepseek-r1-distill-llama-70b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "deepseek-r1-distill-qwen-32b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "deepseek-r1-distill-qwen-14b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "deepseek-r1-distill-qwen-7b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "deepseek-r1-distill-qwen-1.5b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "qwen3-next-80b-a3b-thinking", maxOutput: 32768, contextWindowTokens: 131072 },
    { id: "qwen3-235b-a22b-thinking-2507", maxOutput: 32768, contextWindowTokens: 131072 },
    { id: "qwen3-30b-a3b-thinking-2507", maxOutput: 32768, contextWindowTokens: 131072 },
    { id: "qwq-32b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "kimi-k2-instruct", maxOutput: 32768, contextWindowTokens: 131072 },
    { id: "qwen3-coder-480b-a35b-instruct", maxOutput: 65536, contextWindowTokens: 131072 },
    { id: "qwen3-235b-a22b-instruct-2507", maxOutput: 32768, contextWindowTokens: 131072 },
    { id: "qwen3-30b-a3b-instruct-2507", maxOutput: 32768, contextWindowTokens: 131072 },
    { id: "qwen3-30b-a3b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "qwen3-32b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "qwen3-14b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "qwen3-8b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "qwen3-4b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "qwen3-1.7b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "qwen3-0.6b", maxOutput: 8192, contextWindowTokens: 32768 },
    { id: "qwen2.5-7b-instruct", maxOutput: 8192, contextWindowTokens: 32768 },
  ],
};
